call info
Provides details associated with a call. The call may be a primary or secondary call.
Used in HTTP Request
language wrappers and examples
It contains the following properties:
Property | Availability | Description |
---|---|---|
call id | always | A string uniquely identifying this call. |
call direction | always | Either "in" or "out". |
call from | always | The caller's number or SIP address. |
call to | always | The final destination of the call. For inbound calls, this is the number or SIP address that resulted in the call being routed here. |
call target | always | The original destination of the call. This is the number or SIP address specified by the endpoint making the call. For outbound calls this will be the same as call to . |
call divert from API V2.0 | always | If the call has been diverted, this contains the original number or SIP address specified by the endpoint making the call (if the information was provided by the caller). For outbound calls this will be empty. |
call attestation from API V2.0 |
inbound calls only | A string representing the P-Attestation-Indicator for inbound SIP calls if available, otherwise empty. If set the possible values are:
|
seconds call duration | always | A floating point value to one decimal place. The call duration in seconds. |
call state | always | The current state of the call. One of idle , inbound or answered . |
call cause | request to final page | The call completion cause, available once the call has gone idle. One of:
|
call raw cause from API V2.0 | request to final page | The SIP response code as a string, if available. This can be used in conjunction with the call cause to provide more information on the reason a call has gone idle. A value of "-1" indicates that the call was hung up before connection due to in-band call progress tones that indicated an error. |
application parameters | always | The application parameter string as supplied in the service configuration. |
outbound parameters | outbound calls only | The parameter string supplied in the outbound parameters property when the service was started. |
far end type | outbound calls only, when classification enabled | A result of classification of the far end of the call. One of:
|
call recording filename | when call recording enabled | The filename of the recording of this call, available once the call has gone idle, on your cloud media file store. |
received sip headers from API V2.0 |
when headers are received that match the service configuration | A list of SIP header objects. |
-
Examples:
-
A call info object:
{ "call_id" : "0f80529412cbfd83.111.118489091", "call_direction" : "in", "call_from" : "443069999876", "call_to" : "443069990123", "call_target" : "443069990123", "call_divert": "", "call_attestation" : "A", "seconds_call_duration" : 237, "call_state" : "idle", "call_cause" : "completed", "call_raw_cause" : "200", "application_parameters" : "" }
-
-
CallInfo Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllA class that contains information relating to a single inbound or outbound call.
-
public class CallInfo { // Members public string CallId; public string CallDirection; public string CallFrom; public string CallTo; public string CallTarget; public string CallDivert; public string CallAttestation; public double SecondsCallDuration; public string CallState; public string CallCause; public string CallRawCause; public string ApplicationParameters; public string OutboundParameters; public string FarEndType; public string CallRecordingFilename; public List<SIPHeader> ReceivedSIPHeaders; }
Examples:
-
Get selected information for the call:
// Unpack the request var telephonyRequest = new TelephonyRequest(Request); var callInfo = telephonyRequest.InstanceInfo.ThisCall; var callId = callInfo.CallId; var callFrom = callInfo.CallTo; var secondsCallDuration = callInfo.SecondsCallDuration; var farEndType = callInfo.FarEndType;
-
-
public class CallInfo { // Members public string CallId; public string CallDirection; public string CallFrom; public string CallTo; public string CallTarget; public string CallDivert; public string CallAttestation; public double SecondsCallDuration; public string CallState; public string CallCause; public string CallRawCause; public string ApplicationParameters; public string OutboundParameters; public string FarEndType; public string CallRecordingFilename; public List<SIPHeader> ReceivedSIPHeaders; }
Examples:
-
Get selected information for the call:
// Unpack the request var telephonyRequest = new TelephonyRequest(Request); var callInfo = telephonyRequest.InstanceInfo.ThisCall; var callId = callInfo.CallId; var callFrom = callInfo.CallTo; var secondsCallDuration = callInfo.SecondsCallDuration; var farEndType = callInfo.FarEndType;
-
-
public class CallInfo { // Members public string CallId; public string CallDirection; public string CallFrom; public string CallTo; public string CallTarget; public string CallDivert; public string CallAttestation; public double SecondsCallDuration; public string CallState; public string CallCause; public string CallRawCause; public string ApplicationParameters; public string OutboundParameters; public string FarEndType; public string CallRecordingFilename; public List<SIPHeader> ReceivedSIPHeaders; }
Examples:
-
Get selected information for the call:
// Unpack the request var telephonyRequest = await TelephonyRequest.UnpackRequestAsync(Request); var callInfo = telephonyRequest.InstanceInfo.ThisCall; var callId = callInfo.CallId; var callFrom = callInfo.CallTo; var secondsCallDuration = callInfo.SecondsCallDuration; var farEndType = callInfo.FarEndType;
-
-
-
CallInfo Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllA class that contains information relating to a single inbound or outbound call.
-
Public Class CallInfo ' Members Public Property CallId As String Public Property CallDirection As String Public Property CallFrom As String Public Property CallTo As String Public Property CallTarget As String Public Property CallDivert As String Public Property CallAttestation As String Public Property SecondsCallDuration As Double Public Property CallState As String Public Property CallCause As String Public Property CallRawCause As String Public Property ApplicationParameters As String Public Property OutboundParameters As String Public Property FarEndType As String Public Property CallRecordingFilename As String Public Property ReceivedSIPHeaders As List(Of Sipheader) End Class
Examples:
-
Get selected information for the call:
' Unpack the request Dim TelephonyRequest = New TelephonyRequest(Request) Dim CallInfo = TelephonyRequest.InstanceInfo.ThisCall Dim callId = CallInfo.CallId Dim callFrom = CallInfo.CallTo Dim secondsCallDuration = CallInfo.SecondsCallDuration Dim farEndType = CallInfo.FarEndType
-
-
Public Class CallInfo ' Members Public Property CallId As String Public Property CallDirection As String Public Property CallFrom As String Public Property CallTo As String Public Property CallTarget As String Public Property CallDivert As String Public Property CallAttestation As String Public Property SecondsCallDuration As Double Public Property CallState As String Public Property CallCause As String Public Property CallRawCause As String Public Property ApplicationParameters As String Public Property OutboundParameters As String Public Property FarEndType As String Public Property CallRecordingFilename As String Public Property ReceivedSIPHeaders As List(Of Sipheader) End Class
Examples:
-
Get selected information for the call:
' Unpack the request Dim TelephonyRequest = New TelephonyRequest(Request) Dim CallInfo = TelephonyRequest.InstanceInfo.ThisCall Dim callId = CallInfo.CallId Dim callFrom = CallInfo.CallTo Dim secondsCallDuration = CallInfo.SecondsCallDuration Dim farEndType = CallInfo.FarEndType
-
-
-
class CallInfo
A class that contains information relating to a single inbound or outbound call.
Class synopsis:
// Members: public String getCallId() public String getCallDirection() public String getCallTo() public String getCallFrom() public String getCallTarget() public String getCallDivert() public String getCallAttestation() public String getCallState() public String getCallCause() public String getCallRawCause() public double getSecondsCallDuration() public String getFarEndType() public String getCallRecordingFilename() public String getApplicationParameters() public String getOutboundParameters() public List<SIPHeader> getReceivedSIPHeaders()
Examples:
-
Get selected information for the call:
TelephonyRequest myRequest = new TelephonyRequest(request); CallInfo callInfo = myRequest.getInstanceInfo().getThisCall(); String callId = callInfo.getCallId(); String callDirection = callInfo.getCallDirection(); String callTo = callInfo.getCallTo(); String callFrom = callInfo.getCallFrom(); String callTarget = callInfo.getCallTarget(); String callDivert = callInfo.getCallDivert(); String callAttestation = callInfo.getCallAttestation(); String callState = callInfo.getCallState(); String callCause = callInfo.getCallCause(); String callRawCause = callInfo.getCallRawCause(); double callDuration = callInfo.getSecondsCallDuration(); String farEndType = callInfo.getFarEndType(); String callRecording = callInfo.getCallRecordingFilename(); String applicationParameters = callInfo.getApplicationParameters(); String outboundParameters = callInfo.getOutboundParameters(); List<SIPHeader> receivedSIPHeaders = callInfo.getReceivedSIPHeaders();
-
-
TelephonyRequest.get_this_call()
Returns a dictionary that represents a Call Info support class.
Examples:
-
Get selected information for the call:
my_request = TelephonyRequest(request) call_info = my_request.get_this_call() call_id = call_info.get("call_id") call_direction = call_info.get("call_direction") call_from = call_info.get("call_from") call_to = call_info.get("call_to") call_target = call_info.get("call_target") call_divert = call_info.get("call_divert") call_attestation = call_info.get("call_attestation") seconds_call_duration = call_info.get("seconds_call_duration") call_state = call_info.get("call_state") call_cause = call_info.get("call_cause") call_raw_cause = call_info.get("call_raw_cause") application_parameters = call_info.get("application_parameters") outbound_parameters = call_info.get("outbound_parameters") far_end_type = call_info.get("far_end_type") call_recording_filename = call_info.get("call_recording_filename") received_sip_headers = call_info.get("received_sip_headers")
-
-
The CallInfo class
Introduction
Represents information about a call.
Functions that return strings will return an empty string if the corresponding information was not specified in the request.
getSecondsCallDuration()
will return zero if no duration was specified in the request.
getReceivedSIPHeaderValues()
will return the values of all matching headers as an array of strings. The array
will be empty if no headers match.Class synopsis
class CallInfo extends PropertyHolder { /* methods */ public string getCallId() public string getCallTo() public string getCallFrom() public string getCallTarget() public string getCallDirection() public string getCallDivert() public string getCallState() public string getCallAttestation() public string getCallCause() public string getCallRawCause() public float getSecondsCallDuration() public string getFarEndType() public string getCallRecordingFilename() public string getApplicationParameters() public string getOutboundParameters() public array getReceivedSIPHeaderValues(string $name) }
Examples:
Get selected information for the call:
$info = InstanceInfo::getInstanceInfo(); $thisCall = $info->getThisCallInfo(); $callId = $thisCall->getCallId(); $callTo = $thisCall->getCallTo(); $callFrom = $thisCall->getCallFrom(); $callTarget = $thisCall->getCallTarget(); $callDirection = $thisCall->getCallDirection(); $callState = $thisCall->getCallState(); $callCause = $thisCall->getCallCause(); $callRawCause = $thisCall->getCallRawCause(); $secondsCallDuration = $thisCall->getSecondsCallDuration(); $applicationParameters = $thisCall->getApplicationParameters();