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:

PropertyAvailabilityDescription
call idalwaysA string uniquely identifying this call.
call directionalwaysEither "in" or "out".
call fromalwaysThe caller's number or SIP address.
call toalwaysThe final destination of the call. For inbound calls, this is the number or SIP address that resulted in the call being routed here.
call targetalwaysThe 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
alwaysIf 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:
  • "A" - the origination service provider has authenticated the calling party and they are authorized to use the calling number.
  • "B" - the origination service provider has authenticated their customer originating the call but cannot verify they are authorized to use the calling number.
  • "C" - the origination service provider has authenticated from where it received the call, but cannot authenticate the call source.
seconds call durationalwaysA floating point value to one decimal place. The call duration in seconds.
call statealwaysThe current state of the call. One of idle, inbound or answered.
call causerequest to final pageThe call completion cause, available once the call has gone idle. One of:
  • "completed" - all the actions have completed
  • "hung_up" - the far end of the call hung up
  • "no_answer" - the call was not answered
  • "busy" - the call was rejected indicating busy
  • "unobtainable" - the call was unobtainable
  • "dropped" - the call was dropped during the connect action
  • "failed" - the call failed
call raw cause
from API V2.0
request to final pageThe 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 parametersalwaysThe application parameter string as supplied in the service configuration.
outbound parametersoutbound calls onlyThe parameter string supplied in the outbound parameters property when the service was started.
far end typeoutbound calls only, when classification enabledA result of classification of the far end of the call. One of:
  • "human"
  • "answering_machine"
  • "fax_machine"
  • "unknown"
call recording filenamewhen call recording enabledThe filename of the recording of this call, available once the call has gone idle, on your cloud media file store.

  • 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.dll

    A 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;
      }
      

      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;
      }
      

      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;
      }
      

      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.dll

    A 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
      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
      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()
    

    Examples:

    • Get selected information for the call:

      TelephonyRequest myRequest = new TelephonyRequest(request);
      CallInfo callInfo = myRequest.getInstanceInfo().getThisCall();
      
      String callId = callInfo.getCallId();
      String callTo = callInfo.getCallTo();
      double callDuration = callInfo.getSecondsCallDuration();
      String farEndType = callInfo.getFarEndType();
      
  • TelephonyRequest.get_call_info()

    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")
      
  • 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.

    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()
    }
    

    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();