Skip to content

Make Call

Request

Initiate an outgoing phone call that will be tracked by the AVANSER call tracking service. The process is as follows:

  1. The person making the call will be called on the from.
  2. Once this person answers, the call will be connected to the to.

Caller ID

The possible values for the callerId parameter are outlined below:

OptionDescription
autoUse the default Caller ID that is configured for the user's AVANSER account.
hiddenHide the Caller ID (private call).
(phone number)A phone number to use for the Caller ID, in AVANSER format, or local or international format.

Errors

Error CodeError TypeError Message
-1009INVALID-FROM-NUMBERInvalid caller number
-1010INVALID-TO-NUMBERInvalid called number
-1011INVALID-CALLERIDInvalid CallerID
-1013FROM-NUMBER-NOTALLOWEDCaller number denied by configuration
-1012TO-NUMBER-NOTALLOWEDCalled number denied by configuration
-1014MAKE-CALL-FAILEDUnable to queue your call

FROM-NUMBER-NOTALLOWED and TO-NUMBER-NOTALLOWED are returned if the logged in user doesn't have access to make calls to/from the given phone number. See the Dialer Access section in the User Information documentation.

MAKE-CALL-FAILED is a generic error returned if the call cannot be initialised for an unspecified reason.

Security
accessToken
Query
fromstringrequired

The phone number of the person making the call, in AVANSER format.

Example:from=+61-0212345678
tostringrequired

The phone number to call, in local or international format.

Example:to=0212345678
callerIdstring

Whether to show or hide the default Caller ID, or a custom Caller ID to use.

Default:"auto"
recordnumber

Whether to record the phone call (boolean). This option is ignored if the user's AVANSER account is configured to force recording.

Default:0
Enum:01
labelstring

a label to be assigned to the Call Record, can be set in the http callbacks to match the call record to your request.

curl -i -X POST \
  'https://p3.avanser.com/app/dial?from=%2B61-0212345678&to=0212345678&callerId=auto&record=0&label=string&token=YOUR_API_KEY_HERE'

Responses

Outgoing call request result.

Bodyapplication/json
timestampintegerrequired

The time that the API response left the server, represented as the number of seconds since the UNIX epoch.

Example:1508903167
exectionnumber

The number of seconds that it took to process the API request.

Example:0.00041531896591187
errorbooleanrequired

Boolean indicating whether there was an error returned by the API request.

Example:false
dataobjectrequired

The data returned by the API. The format varies depending on the API function that was called.

Response
{ "timestamp": 1508908351, "exection": 0.000072510957717896, "error": false, "data": { "from": "+61-0412345678", "to": "+61-0298765432", "callerId": "+61-0412345678", "recording": "no", "label": "" } }