initiateCall

Request Method: POST

Description: Initiates a call which will follow the Calling Rules currently attached to the specified Link ID

URL: https://api.iovox.com:444/Calling?v=3&method=initiateCall

The following parameters can be sent in the querystring

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES

Payload

The following XML payload must be sent with an initiateCall request:

<?xml version="1.0" encoding="utf-8"?>
<request>
   <link_id>link123</link_id>
   <call_variables>
     <call_destination>449789123123</call_destination>
     <my_custom_var>Bob</my_custom_var>
     <the_custom_var>Smith</the_custom_var>
     <another_custom_var>1234</another_custom_var>
   </call_variables>
 </request>

It is also possible to traverse through an IVR by adding the keypresses to the numbers being dialed. For example, if the IVR would say "Press one for the support department, two for the sales department", you could add ",1" behind the number to automatically press 1 in the IVR. The keypresses can also be chained together, for example ",,1,,2".

CharacterDescription
,Adds a 2 second pause. The initial pause starts counting from the moment the call is ANSWERED.
1Sends the number 1 as a keypress to the person or system who ANSWERED the call.

Example payloads:

<?xml version="1.0" encoding="utf-8"?>
<request>
    <link_id>link123</link_id>
    <call_variables>
        <call_destination>449789123123,1</call_destination>
    </call_variables>
</request>
<?xml version="1.0" encoding="utf-8"?>
<request>
    <link_id>link123</link_id>
    <call_variables>
        <call_destination>449789123123,,1,,2</call_destination>
    </call_variables>
</request>

Payload Description

Node NameDescriptionDefault ValueData TypeMandatory
link_idThe Link ID whose Calling Rules to follow
STRINGYES
call_variablesA list of Call Variables. These will be used by any variable fields in the Calling Rules flow. This is only mandatory if the Calling Rules require any of these variables to be set. If that is the case, the XML node names here must match the variables names in the Call Flow. call_destination is mandatory if using a Call based Rule Template


STRINGNO

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be POST. x attemptedSwitch request method x to POST
400XML EmptyAdd xml to the request body
400XML parse error. x at line y, column zCorrect XML at point x on line y, column z
400Request EmptyAdd link_id and any mandatory Call Variables to the request
400Link ID EmptyAdd link_id to the XML
400Link ID does not existCorrect link_id to be an existing Link ID
400Link ID has no Calling RulesAdd Calling Rules to link_id using Rules::attachRuleTemplateToLinks or change to a Link ID that has Calling Rules attached
400Call Variable x EmptyAdd x as a parameter under call_variables
400The number of calls allowed has been exceededThe caller cannot make more calls for a period of time.
500Internal Server ErrorRetry later

Success Result

HTTP Code: 201

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <current_page/>
  <total_pages/>
  <total_results/>
  <results>
    <result>1304750531</result>
  </results>
</response>