Call Interactive
You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).
The Call Interactive function allows you to initiate an HTTP request to a specified URL and process the response to it. A constant set of parameters is passed with the request, containing information about the call. These parameters are located in the request string (for the GET method) or in the request body (for the POST method). The URL and the request method can be set when configuring the Voice Menu (/ivr/) context option action or in Client (/client/, /client_info/)(phone terminal manual number input call).
Call Interactive Configuration
To configure the Call Interactive function, you need to specify two parameters: The URL to which the system will make a request, and the method (GET or POST). When the GET method is selected, the request parameters containing information about the call will be passed in the request string, and when the POST method is selected, they will be passed in the request body.
- 1 Call Interactive Configuration
- 2 Request parameters Call interactive IVR
- 3 Optional request parameters
- 4 Request parameters Call interactive phone terminal calling
- 5 Variables in the query string
- 6 Response structure
- 7 Options for action Call interactive IVR
- 8 Options for action Call interactive phone terminal calling
Request parameters Call interactive IVR
Request parameters Call interactive phone terminal calling
Request Example
http://mysite.com/myscript?CalledExtensionID=145&CalledNumber=332&CallID=5205dc5cc5a411e5ab9eb3691b90ea15&CallerIDNum=000%2A306&CallerExtensionID=134&CallerExtension=000%2A306&CallFlow=IN&CalledExtension=000%2A332&CallAPIID=3584705175%3A5205dc5cc5a411e5ab9eb3691b90ea15&CallerIDName=000%2A306&CallStatus=ANSWER |
Variables in the query string
Additional parameters contained in the URL can be passed in the request string. These can take both static values and the values of variables set in the IVR earlier. In order to use the variable value in the URL, you must use the format $varname, where varname is the name of the required variable.
If the GET request method is selected, the parameters containing the call information will be added to the existing URL parameters.
Example of a URL with static parameters:
http://mysite.com/myscript?param1=value1¶m2=value2 |
Example of a URL with variable parameters:
http://mysite.com/myscript?param1=$var¶m2=$var2 |
Response structure
The response to the Call Interactive request is optional and is required if you need to perform an action.
The response to the request must be formed in XML format and have the following structure:
where Action can be one of the actions listed below.
Up to 10 actions are allowed in a single response, exceptions to this rule are the actions: hangup, SimpleTransfer, TTS (Text to speech) - after these actions, the rest will be ignored.