GET/active/calls

Function


The GET/active/calls request will return detailed information about the currently active call performed or received by a user based on the login credentials provided. The response will contain the different segments of the call as it progress through the system. Direct outbound calls will only have one segment while inbound and internal calls will usually have more than one segment.


The response includes the following fields of information:

  • server - this is usually a "null" value unless a special server was used for the call, in which case a number will identify the relevant server for making or receiving the call.
  • uniqueid - a unique ID for a particular call segment (inside an entire call flow) created by combining its start time, direction and other values.
  • callid - an unique ID for the entire call as a whole. This value will be identical among all call segments of a call. Usually callid and uniqueid have the same value for the first call segment in a call flow..
  • start - the start time for the call or a particular call segment, in Unix time format.
  • answered - the time the call or a the particular call segment was answered, in Unix time format.
  • stype - a definition for the type of source point - where the call or call segment started from. 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 point that initiated the call. This can be, depending on the direction of the call, either an internal extension/number, a full telephone number, or a temporary number assigned by the system to the point in case it doesn't have one (such as in the case of an IVR).
  • spresent - a value of 1 indicates that the presentation of the source call supports the ISDN format.  A value of 0 indicates it it not.  Integrated Services Digital Network a communication standards for simultaneous transmission of voice, video, data, and other communication services over a single traditional phone line.
  • stransferred - a value of 1 indicates that the source point(defined by snumber/stype) was transfered by the system to the present call segment. A value of 0 indicates it it not. This will always be 0 in the first segment or when a call arrives at the IVR menu.
  • ctype -  a definition for the type of called point (where the source customer originally dialed) in the current call or call segment. This has no value for outbound calls.  For inbound or internal calls, the value is not absolute for the entire call but is assigned by the system based on the progression of the call in call flow. 
  • cnumber - the phone number of called point (where the source customer originally dialed) in the current call or call segment. The value is not absolute for the entire cal but is assigned by the system based on the progression of the call in call flow.
  • dtype - a definition for the type of destination point (where the call was routed to) for the call or call segment. Examples can be  "ivr", "accessmenu, "queue", "phone", etc. The type will always be "external" for outbound calls. 
  • dnumber - the phone number of the destination point where the call was routed to for the call or call segment.
    Note that in inbound and internal calls ctype and cnumber will differ from dtype and dnumber only in the first segment or two. After that they are usually identical.
  • ptransferred - An indication that the call was transfered to a parking area before reaching the user (where it is presently active.)
  • dtransferred - a value of 1 indicates that the destination point(defined by dnumber/dtype) requires a transfer between points to be reached from the current call segment. A value of 0 indicates it it not. For example when a call moves from a phone number to its mailbox this will have a 0 value since a mailbox is considered the same point as its number.
  • 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.)
  • park - if the call was parked during the call flow before reaching the user, this is the number of the extension or line where it was parked.
  • status - indication of the status of the call, in the current call segment, 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.
  • duration - total duration of the call segment in seconds.
  • caller - name, extension, or number of the caller of the call. This may temporarily take the the virtual extension number of the IVR when the call is being handled by it.;
  • called - name or extension or the recipient of the call. If not available (for external recipient) the called number will be given here.
  • callednumber - phone number of the recipient of the call.

Parameters


None required!


The Limit and Offset optional parameters may be used if dealing with a large number of active calls (rarely, if ever, the case.)


Examples


To get details of the active call logs for a user use the following syntax:


HTTPS method: GET


webserv.telebroad.com/api/teleconsole/rest/active/calls/panel


Response:


If no active call it taking place:


{
"error": null,

"result": []
}



Outbound call example with only one call flow segment:


{

"error": null,

  "result": [

{

      "server": null,

      "uniqueid": "1580622316.049471",

      "callid": "1580622316.049471",

      "start": "1580622316",

      "answered": "1580622323",

      "stype": "phone",

      "snumber": "1113834",

      "spresent": "1",

      "stransferred": "0",

      "ctype": "",

      "cnumber": "12128835335",

      "dtype": "external",

      "dnumber": "12128835335",

      "dtransferred": "0",

      "ptransferred": "0",

      "callerid_internal": "201",

      "callerid_external": "16312828888",

      "callername_internal": "Rick Goodwin",

      "callername_external": "Rick Goodwin",

      "park": "",

      "status": "answer",

      "duration": "00:00:18",

      "caller": "1113834",

      "called": "12128835335",

      "callednumber": "12128835335"

}

]

}



Inbound call example with multiple call flow segments:


{

"error": null,
    "result": [
    {
        "server": null,
        "uniqueid": "1580623617.015555",
        "callid": "1580623617.015555",
        "start": "1580623617",
        "answered": "1580623617",
        "stype": "external",
        "snumber": "12128835335",
        "spresent": "1",
        "stransferred": "0",
        "ctype": "",
        "cnumber": "16466991356",
        "dtype": "ivr",
        "dnumber": "6208",
        "dtransferred": "0",
        "ptransferred": "0",
        "callerid_internal": "12128835335",
        "callerid_external": "12128835335",
        "callername_internal": "THOMPSON ANDREW",
        "callername_external": "THOMPSON ANDREW",
        "park": "",
        "status": "",
        "duration": "00:02:10",
        "caller": "12128835335",
        "called": "16466991356",
        "callednumber": "16466991356"
    },
    {
        "server": null,
        "uniqueid": "1580623626.076365",
        "callid": "1580623617.015555",
        "start": "1580623626",
        "answered": "1580623626",
        "stype": "ivr",
        "snumber": "6208",
        "spresent": "1",
        "stransferred": "0",
        "ctype": "queue",
        "cnumber": "1409",
        "dtype": "queue",
        "dnumber": "1409",
        "dtransferred": "1",
        "ptransferred": "0",
        "callerid_internal": "12128835335",
        "callerid_external": "12128835335",
        "callername_internal": "THOMPSON ANDREW",
        "callername_external": "THOMPSON ANDREW",
        "park": "",
        "status": "",
        "duration": "00:02:01",
        "caller": "6208",
        "called": "1409",
        "callednumber": "1409"
    },
    {
        "server": null,
        "uniqueid": "1580623692.561944",
        "callid": "1580623617.015555",
        "start": "1580623692",
        "answered": "1580623693",
        "stype": "",
        "snumber": "12128835335",
        "spresent": "1",
        "stransferred": "0",
        "ctype": "",
        "cnumber": "1113834",
        "dtype": "phone",
        "dnumber": "1113834",
        "dtransferred": "1",
        "ptransferred": "0",
        "callerid_internal": "12128835335",
        "callerid_external": "12128835335",
        "callername_internal": "THOMPSON ANDREW",
        "callername_external": "THOMPSON ANDREW",
        "park": "",
        "status": "answer",
        "duration": "00:00:54",
        "caller": "12128835335",
        "called": "1113834",
        "callednumber": "1113834"
    },
    {
        "server": null,
        "uniqueid": "1580623693.315819",
        "callid": "1580623617.015555",
        "start": "1580623693",
        "answered": "1580623693",
        "stype": "phone",
        "snumber": "1113834",
        "spresent": "1",
        "stransferred": "1",
        "ctype": "mailbox",
        "cnumber": "201",
        "dtype": "mailbox",
        "dnumber": "201",
        "dtransferred": "0",
        "ptransferred": "0",
        "callerid_internal": "12128835335",
        "callerid_external": "12128835335",
        "callername_internal": "THOMPSON ANDREW",
        "callername_external": "THOMPSON ANDREW",
        "park": "",
        "status": "",
        "duration": "00:00:54",
        "caller": "12128835335",
        "called": "201",
        "callednumber": "201"
    }
]

}

Did you find it helpful? Yes No

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