JSON Request Format

Table 1. JSON Request Format field names
Name Mandatory Type Usage
action yes string Action to perform, this must be either “makeCall” or “startApplication”.

To place an outbound call and then invoke either VXML or CCXML application the action should be “makeCall”. If the action is “startApplication” only CCXML applications are supported. The “startApplication” will not place the outbound call and will only start the application.

to yes for "makeCall" string SIP address to place the call to. This contains the SIP address to place the call to when the action is “makeCall”.

The SIP address is also placed in the session variables for both VXML and CCXML applications as part of the application data. This can be used during a “startApplication” to allow the CCXML application to place the outbound call to the destination supplied via the outbound API.

apiKey yes string The API key previously created using bam -c as described here BAM Command Line Utility HTTP API Keys Panel.

The API key must match a previously created HTTP API key. The specifed action will be taken using the application associated with the apiKey.

timeout no number Time in milliseconds to wait for a response/call to be answered.

The timeout for the HTTP POST in milliseconds (default 30000 milliseconds). This does not alter the timeout for the outbound call if “makeCall” action is used. If the timeout is shorter than the time taken to answer the call a response will be generated before the actual call response. Therefore this timeout should be long enough to encompass the outbound call ring time.

appData no string or object Application data.

The appData can contain either a single String or an Object containing String values. These values are supplied to the application as session variables. The to JSON field is automatically added to the application data. The values are specified as key/value pairs and the key is used to generate the session variable name.

headers no object Headers to pass in the outbound SIP INVITE.

The headers are an Object containing String values for additional headers to add to the SIP INVITE. The values are specified as key/value pairs and the key is used as the SIP header name. The headers are only used for the “makeCall” action, they are ignored for the “startApplication” action.