The GET/active/calls request will return detailed information about currently active calls dialed or received by a user. 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.
The Limit and Offset optional parameters may be used if dealing with a large number of active calls (rarely, if ever, the case.)
If no active call it taking place:
Outbound call example with only one call flow segment:
"callername_internal": "Rick Goodwin",
"callername_external": "Rick Goodwin",
Inbound call example with multiple call flow segments: