GET/call/logs

Function


The  GET/call/logs request will return a detailed log of calls and call flow segments performed or received by a user based on the login credentials provided.


The returned list is contains more response parameters than the list returned by GET/call/history and returns the entire logs for a user rather than just a particular phone line. 


The response  includes the following fields of information: 


  • server - the Telebroad server used for making or receiving the call.
  • uniqueid - a unique ID for the particular call log created by combining its start time, direction and other values.
  • callid - an ID for the call itself. Note that some response results will have the same callid value because they are call flow segments of the same call.
  • status - indication of the final status of the call in terms of connection between the caller and recipient. Possible responses include "answer","noanswer" (by the recipient), "cancel" (by the caller), "congestion" (too much traffic preventing a connection), "busy" (the recipient is on another call), or "chanunavail" - the destination communication channel is unavailable or the requested peer is not be registered.
  • start - the start time for the call, in Unix time format.
  • end -  the start time for the call, in Unix time format.
  • media - the media for the call, usually "voice". Other possible options are "fax", and "message".
  • totaltime - the total time, in seconds, for the call since it was initiated.
  • talktime - the talk time, in seconds, for the call since it was answered.
  • scustomer - an ID given to the source customer (caller) of the call.
  • stype - a definition for the type of source point - where the call or call flow segment started. This will always be "external" for an inbound call from an outside source. Otherwise it can be any of numerous points on the PBX - "ivr", "accessmenu, "queue", "extension" etc. 
  • snumber -  the phone number of the source customer that initiated the call. This can be either an internal extension or a full telephone number, depending on the direction of the call.
  • spresent - indicates that the presentation of the source call supports the ISDN format.  Integrated Services Digital Network a communication standards for simultaneous transmission of voice, video, data, and other communication services over a single traditional phone line. 
  • sname - a name identified for the source customer by the system, either based on  internal PBX information or caller ID.
  • ctype -  a definition for the type of called point, where the source customer originally dialed. The system can have records of this only for internal calls. 
  • cnumber - the phone number that the source customer called. 
  • dcustomer -  an ID or a name given to the destination customer (recipient) of the call. This will usually be identical to scustomer because the system does not have a description of outside callers.
  • dtype - a definition for the type of destination point (where the call was routed to). Examples can be  "ivr", "accessmenu, "queue", "external" etc. 
  • dnumber - the phone number of the destination where the call was routed to.
  • callerid_internal - a caller ID set for a call that is originated internally (that is an outbound call). It may apply to the external caller ID (hence they will appear identical.)
  • callerid_external -  a caller ID set for a call that is originated externally (that is an inbound call). It may apply to the external caller ID.
  • callername_internal -  a name associated with the call that is originated internally (that is an outbound call) taken from PBX records. It may apply to the external caller name (hence they will appear identical.)
  • callername_external -  a name associated with a call that is originated externally (that is an inbound call) taken from caller ID information. It may apply to the internal caller name (hence they will appear identical.)
  • ingroup - an ID for the inbound group that the call was routed to, if any.
  • ingroup_time - an ID for time conditions applied to the inbound group, if any.
  • outgroup - an ID for the outbound group that the call was routed from, if any.
  • outgroup_time - an ID for time conditions applied to the inbound group, if any.
  • plan - The Telebroad rate plan that was used for the call.
  • peer - An ID for the peer that received or routed the call (0 for none). A peer is any SIP entity on the PBX system that can receive or route calls but is not a user or specific phone line. For example a departmental voicemail or an external VoIP service.
  • channel - a specific communication channel on the Telebroad server used for making the call.
  • recording - a path on the Telebroad server of an audio file of a recording of the call.
  • invoice - ID of an invoice summarizing costs relating to the call. 0 for none.
  • overmax - a value of 1 indicates that the call was billed for exceeding the maximum minutes for the rate plan. A value of 0 indicates it wasn't.
  • note - a note attached to the call.
  • taxed - taxes applied to the cost of the call. 0 for none.
  • bridged_callid - an ID for the call if it originated from another PBX system that is integrated to the user's PBX system with a bridge type connection.
  • calluid - an extension of the callid field used for indicating separate call flow segments. If you look at the example response below, you will see that the callid value for the first two responses is identical. This is because these are segments of one call that moved from the caller to the IVR and than to a queue. The calluid field differentiate the segments by adding a number sequence at the end - 002 and 003.


Parameters:


Parameter
Type
Operation
*start
string
The starting time from which point the request is to display the call logs, specified in Unix timestamp.

*end
string
The ending time until which point the request is to display the call logs, specified in Unix timestamp.
descending
Boolean
Use this to sort the list -  1 to sort in descending order, 0 not to.
**limit
integer
Specify the number of call log records to be returned by the request.
offset
integer
Specify the first call log 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 call log records.


** The returned list may be many pages long. Using the limit parameter is particularly useful in this situation.


Example


To get the call logs for a user with a limit of three records :


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/call/logs?descending=1&end=-1&start=0&limit=3


Response:


{

    "error":null,

    "result":[

    {"server":"softast3",
    "uniqueid":"1458759191.4769162-2-28409-in",
    "callid":"1458759191.4769162",
    "status":"answer",
    "start":"1458759191",
    "end":"1458759257",
    "media":"voice",
    "totaltime":"62",
    "talktime":"58",
    "scustomer":"1532",
    "stype":"external",
    "snumber":"19172284052",
    "spresent":"1",
    "sname":"WIRELESS CALLER",
    "ctype":"",
    "cnumber":"16466991356",
    "dcustomer":"1532",
    "dtype":"ivr",
    "dnumber":"6208",
    "callerid_internal":"19172284052",
    "callerid_external":"19172284052",
    "callername_internal":"WIRELESS CALLER",
    "callername_external":"WIRELESS CALLER",
    "ingroup":"1",
    "ingroup_time":"1",
    "outgroup":"0",
    "outgroup_time":"0",
    "plan":"11",
    "peer":"0",
    "channel":"SIP\/enswitch-local-001848ac",
    "recording":"",
    "invoice":"0",
    "overmax":"0",
    "note":"",
    "taxed":"0",
    "bridged_callid":"",

    "calluid":"1458759191.4769162002"
    },

    {

    "server":"softast3",
    "uniqueid":"1458759191.4769162-3-28409-internal",
    "callid":"1458759191.4769162",
    "status":"answer",
    "start":"1458759219",
    "end":"1458759257",
    "media":"voice",
    "totaltime":"38",
    "talktime":"38",
    "scustomer":"1532",
    "stype":"ivr",
    "snumber":"6208",
    "spresent":"1",
    "sname":"WIRELESS CALLER",
    "ctype":"queue",
    "cnumber":"1409",
    "dcustomer":"1532",
    "dtype":"queue",
    "dnumber":"1409",
    "callerid_internal":"19172284052",
    "callerid_external":"19172284052",
    "callername_internal":"WIRELESS CALLER",
    "callername_external":"WIRELESS CALLER",

    "ingroup":"0",
    "ingroup_time":"0",
    "outgroup":"0",
    "outgroup_time":"0",
    "plan":"11",
    "peer":"0",
    "channel":"SIP\/enswitch-local-001848ac",
    "recording":"",
    "invoice":"0",
    "overmax":"0",
    "note":"",
    "taxed":"0",
    "bridged_callid":"",
    "calluid":"1458759191.4769162003"
    },
    {"server":"softast3",

    "uniqueid":"1519673174.59564436-2-21988-in",

    "callid":"1519673174.59564436",

    "status":"answer",

    "start":"1519673174",

    "end":"1519673223",

    "media":"voice",

    "totaltime":"49",

    "talktime":"49",

    "scustomer":"1532",

    "stype":"external",

    "snumber":"18885318816",

    "spresent":"1",

    "sname":"TOLL FREE CALL",

    "ctype":"",

    "cnumber":"16466991356",

    "dcustomer":"1532",

    "dtype":"ivr",

    "dnumber":"6208",

    "callerid_internal":"18885318816",

    "callerid_external":"18885318816",

    "callername_internal":"TOLL FREE CALL",

    "callername_external":"TOLL FREE CALL",

    "ingroup":"1",

    "ingroup_time":"1",

    "outgroup":"0",

    "outgroup_time":"0",

    "plan":"2",

    "peer":"0",

    "channel":"SIP\/enswitch-local-012fe9f6",

    "recording":"",

    "invoice":"0",

    "overmax":"0",

    "note":"",

    "taxed":"0",

    "bridged_callid":"",

    "calluid":"1519673174.5956443602"},

    }

]

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.