1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - GET Requests
Open navigation

GET/call/history

Function


The GET/call/history method returns a list of all calls made or received for a particular telephone line with each call  containing the following fields of information:


  • Callid- a unique identification number for the specific call.
  • calluid - an extension of the callid field used for indicating separate call flow segments of a call. The calluid field differentiates the segments by adding a number sequence at the end -  001,002, 003 etc.
  • start- the start time of the call given in a Unix time stamp format.
  • end - the end time of the call given in a Unix time stamp format.
  • totaltime - the total time of the call, including ringing or hold time, given in second.
  • talktime - the total talk  time of the call given in seconds
  • status - an indication for the status of the call. It can be either answered - "answer", or unanswered - "miss".
  • direction - an indication of the direction of the call. It can be either inbound - "in", or outbound - "out".
  • stype - the type of device used by the sender (caller) to make the call. It can be either a "phone" or some "external" VoIP or traditional telephony device.
  • snumber - the phone number of the sender (caller).
  • dtype - the type of destination where the call was received. It can be either a "phone" or "mailbox".
  • dnumber - the phone number of the destination where the call was received. This can actually be specified with the name of a PBX user.
  • dnumber_no - if a PBX user was used for dnumberthan here the extension number of the destination will be given.

Parameters


All parameters go in the header.


Parameter
Type
Operation
Phone
string
The phone line for which the list of calls history list is requested.

*start
string
The starting time for displaying the fax documents, specified in Unix time.
*endstring
The ending time for displaying the messages, specified in Unix time.
descendingBooleanUse this to sort the list -  1 to sort in descending order, 0 not to.
limitintegerSpecify the number of records to be returned by the request.
offsetintegerSpecify the first record to display. For example an offset of 3 will start the list on the 3rd record. If left empty the default will be the first record. 

* Use start=0 and end=-1 to display all voicemails.


Example


HTTPS method: GET


To get the details of list of calls for Phone line 1-646-741-5360 with an offset of 3 and a limit of 4 use the following syntax: 


webserv.telebroad.com/api/teleconsole/rest/call/history?descending=1&end=-1&phone=1113840&start=0&limit=4&offset=3


Response:


{

"error": null,
    "result":[
        {
        "callid": "1513710832.1408716",
        "calluid": "1513710832.1408716003",
        "start": "1513710832",
        "end": "1513710844",
        "totaltime": "12",
        "talktime": "12",
        "status": "miss",
        "direction": "in",
        "stype": "phone",
        "snumber": "Dorothy Grubbs",
        "snumber_no": "1113840",
        "dtype": "mailbox",
        "dnumber": "Dorothy Grubbs",
        "dnumber_no": "1113840"
    },
    {
        "callid": "1513710982.1403116",
        "calluid": "1513710982.1403116002",
        "start": "1513710982",
        "end": "1513710996",
        "totaltime": "14",
        "talktime": "14",
        "status": "answer",
        "direction": "in",
        "stype": "external",
        "snumber": "17202875362",
        "snumber_no": "17202875362",
        "dtype": "phone",
        "dnumber": "Dorothy Grubbs",
        "dnumber_no": "1113840"
    },
    {
        "callid": "1513352916.574350",
        "calluid": "1513352916.5743500002",
        "start": "1513352916",
        "end": "1513352934",
        "totaltime": "18",
        "talktime": "18",
        "status": "answer",
        "direction": "in",
        "stype": "external",
        "snumber": "18668812228",
        "snumber_no": "18668812228",
        "dtype": "phone",
        "dnumber": "Dorothy Grubbs",
        "dnumber_no": "1113840"
    }
    ]
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article