switchvox.users.call

Description

Allows external applications to originate phone calls via the PBX. These phone calls can be from extension to extension, extension to an outside phone number, or even connecting two external phone numbers together.

Arguments

See the Constructing Requests page to learn how to use arguments in requests.

Name

Required

Type

Default

Description

dial_first

required

number

 

This is the number you want to ring first.

dial_second

required

number

 

After the dial_first number had been called and answered this number will then be called. If the dial_first number is not answered then this number will not be called.

account_id

optional

integer

 

The user's account_id that is making the request. When placing call's it will use the user's outgoing call rules and call api settings.

caller_id_name

optional

string

PBX

Sets the name of the caller ID on the call to the dial_first number. If you are originating the call to your extension is is helpful to set the caller id to remind you who is calling. The caller id number is automatically set to the dialed number. Can only be 20 characters max. Changing the caller id may not be supported on outgoing calls

variables
variable

optional

string

 

Allows you to set the value of a variable in your IVR. First, define a variable in your IVR and name it something like "balance". Then set a variable parameter with the name or the variable equal to the new value. Example: balance=300. Then if you dial an IVR that uses that variable it will be set with the value from your api call.

timeout

optional

integer

30

Determines how long in seconds to ring the first number before timing out the call. Possible values : 0-999.

ignore_user_api_settings

optional

boolean

0

Set this parameters if you don't want your dial_first and dial_second numbers to be modified by the user's call api settings. Example: Don't prefix a 9 when the calling number is 10 digits. Possible values : 0 or 1.

ignore_user_call_rules

optional

boolean

0

Set this variable if do not want the ringing call to follow the extension's call rules. By default, if the dial_first number is an extension it will follow whatever call rules the extension has setup (ie: go to voicemail, cascade, etc).

 

Example Requests & Responses

Please see the API Request and Response Format section for more information on various request encodings.

Example One

Request

Requests information about extension 104 and extension 207.

<request method="switchvox.users.call"> <parameters> <account_id>1106</account_id> <dial_first>301</dial_first> <dial_second>800</dial_second> <variables> <variable>balance=300</variable> </variables> </parameters> </request>

Response

Returned information about 104, but extension 207 doesn't exist so no information is returned.

<response method="switchvox.users.call"> <result> <call_info dialed_first="301" dialed_second="800" > <variables> <ivr_variable id="3" name="balance" status="exists" /> </variables> </call_info> </result> </response>

Error Codes

See the Error Code Formatting section to see the xml structure when an error is returned.See the Generic Error Codes section to see a list of general fault codes that may be returned.

This method doesn't throw any method specific faults.

 

Unable to render {include} The included page could not be found.