Skip to main content

Voice Application Request

Need Help? Let's Talk

Join our Discord community - we're here to help.

The following request parameters will be provided in the application invocation request, by the runtime, as either URL query string parameters (for requests performed with the HTTP GET method) or in a JSON encoded HTTP request body (for requests performed with the HTTP POST method).

ParameterDescription
CallSidThe Cloudonix session identifier for the current call. Additional session information, including application specific metadata can be retrieved by using the Cloudonix SDK to retrieve the Cloudonix session data associated with the Cloudonix session identifier.
FromThe phone number or client identifier of the calling subscriber. Caller identifiers are usually formatted as prefixless E.164 ITU MS-ISDNs, for example: +16175551212.
ToThe DNID that activated the application. Applications may be configured to be activated by a DNID pattern (prefix, regular expression or an Asterisk expression), in whic case the To value will contain the actual text that matched the pattern and not the pattern itself.
CallerNameThe display name of the calling subscriber.
DirectionDirection the call came from, can be either inbound for a call received from a trunk, subscriber for a call received from a subscriber, outbound-api for a call started from the outbound call REST API.
CallStatusWhen handling the result of a Dial verb, this will be set to the status of the dial and can be one of the following values queued , ringing,in-progress, completed, busy, canceled, failed, no-answer or unknown.
SessionThe Cloudonix session token for the call.
DivertedIf the voice call was diverted from another account outside the Cloudonix platform, this parameter will contain the full account identifier provided by the Voice Trunk (using the SIP Diversion header) in the form of an Internet address (i.e. msisdn@domain)(1).
AssertedIdentityIf the Voice Trunk provides the identity of the caller using the SIP P-Asserted-Identity header (as specified in RFC 3325), this parameter will contain the identity asserted by the Voice Trunk in the form of an Internet address (i.e. msisdn@domain)(2).
DomainThe Cloudonix domain name in which the call is executing.

The following parameters are made available only in an HTTP request body's JSON document, when the application request is sent using the POST HTTP method:

ParameterDescription
SessionDataThe Cloudonix session object including all session data as can also be retrieved using the Retrieve Session REST API call.

In addition, the following HTTP request headers are sent in the HTTP request:

Header NameDescription
X-CX-FromThe phone number or client identifier of the calling subscriber.
X-CX-ToThe DNID that activated the application.
X-CX-CallerNameThe display name of the calling subscriber.
C-CX-SourceThe Cloudonix origination label for the call, one of border or subscriber.
X-CX-SessionThe Cloudonix session token for the call.
X-CX-APIKeyThe Cloudonix API key for the application being invoked, that the application can use to authorize application specific API calls to the Cloudonix REST API.
X-CX-DomainThe Cloudonix domain name in which the call is executing.
Foot Notes
  1. the Diverted request parameter is often used for implementing voice mail applications for external (non-Cloudonix) subscribers. Its content is derived by an RFC 6044 compliant processing of calls coming in from Voice Trunks. This field is only set if the RFC 6044 process has generated some information, and is never available for calls with a Direction parameter other than inbound.
  2. The AssertedIdentity request parameter value is derived from an implementation of RFC 3325 and, as specified in the RFC, should only be consulted if the Voice Trunks connected to the application can be considered a "trusted network". The Cloudonix platform has no process to verify the asserted identity and makes no claim about the trustworthiness of the value of that parameter. This field is only set if the RFC 3325 process has generated some information, and is never available for calls with a Direction parameter other than inbound.