By using the Aculab site, you agree with our use of cookies.
right  Talk To Us!

Http Response

See also: HTTP request, actions

The HTTP response sent by your web page should contain a JSON format string representing an object with the following properties:

PropertyRequired/OptionalDescription
actions required An array of Action objects.
token optional An optional user-defined string. This defaults to null.
call recording cipher optional A cipher object specifying how to encrypt the whole call recording. Defaults to null.

call recording cipher contains the details of the cipher to be used to encrypt the whole call recording:

PropertyRequired/OptionalDescription
type required The cipher type, currently only "aescbc" (AES algorithm, CBC mode) is supported.

For the aescbc cipher the following properties must be supplied in the cipher object:

PropertyRequired/OptionalDescription
key required The cipher key as a string, either 128, 192 or 256 bits represented as 16, 24 or 32 hexadecimal bytes.
initialisation vector required The initialisation vector as a string, 128 bits represented as 16 hexadecimal bytes.

Remarks

The actions sent in the response are executed in the order they are specified.

Some actions can return a result and these have a next page property. When a request is made to a next page the returned action list supercedes the original action list and its remaining actions are discarded.

When there are no actions remaining the call is hung up and the Final page is requested.

Whole call recording for the primary call can optionally be enabled on the service configuration page. If this recording is to be encrypted, supply the cipher in the response to the request on the first page. Whole call recording for a secondary call can be specified in the connect or connect to conference actions. If this is enabled, and is to be encrypted, supply the cipher in the response to the request on the secondary call's first page.

  • Examples:

    • Return a simple action list:

          {
              "actions" :
              [
                  {
                      "play" :
                      { 
                          "play_list" :                 
                          [
                              {
                                  "text_to_say" : "Please leave a message after the beep."
                              }                    
                          ]
                      }
                  },
                  {
                      "record" :
                      {
                          "beep_on_start" : true
                      }
                  }
              ],
              "token" : "my token id 13324"
          }