REST Documentation

View InboundXML Docs

Make Call

The ability to send and receive calls is an obvious core feature TelAPI provides. To ensure development of call functionality is as powerful as it is easy, there are a few different parameters that can be used to modify calls initiated through the REST API.

Request URI

To initiate a call, make an HTTP POST with the URI below.

POST https://api.telapi.com/v1/Accounts/{AccountSid}/Calls

Parameters

The parameters below are used to specify the call behavior.

Parameter Description
required
The number to call.
required
The number to display as calling.
required
The URL requested once the call connects. A set of default parameters will be sent here.
Allowed Value:
valid URL
Example Value:
http://www.telapi.com/ivr/welcome/call
optional
Specifies the HTTP method used to request the required URL once call connects.
Default Value:
POST
Allowed Value:
POST or GET
optional
URL used if any errors occur during execution of InboundXML or at initial request of the required Url provided with the POST.
optional
Specifies the HTTP method used to request the required FallbackUrl once call connects.
Default Value:
POST
Allowed Value:
POST or GET
optional
URL that can be requested to receive notification when call has ended. A set of default parameters will be sent here once the call is finished.
optional
Specifies the HTTP method used to request StatusCallbackUrl.
Default Value:
POST
Allowed Value:
POST or GET
optional
URL that can be requested every 60 seconds during the call to notify of elapsed time and pass other general information.
optional
Specifies the HTTP method used to request HeartbeatUrl.
Default Value:
POST
Allowed Value:
POST or GET
optional
Specifies the forwarding number to pass to the receiving carrier.
Default Value:
POST
Allowed Value:
POST or GET
optional
Dials digits once call connects. Can be used to forward callers to different extensions or numbers. SendDigits also allows @1000 syntax. For example, to play the tone 4 for two seconds: 4@2000 (milliseconds) would be used.
Allowed Value:
the digits 0-9, #, *, W or w (W/w for .5 second wait)
Example Value:
4567#
optional
Number of seconds call stays on the line while waiting for an answer. The max time limit is 999 and the default limit is 60 seconds but lower times can be set.
Allowed Value:
integer greater than or equal to 0
Example Value:
60
optional
Specifies if the caller id will be hidden.
Default Value:
false
Allowed Value:
true or false
optional
Specifies whether this call should be recorded.
Default Value:
false
Allowed Value:
true or false
optional
A URL some parameters regarding the recording will be past to once it is completed.
optional
Method used to request the RecordCallback URL.
Default Value:
POST
Allowed Value:
GET or POST
optional
Specifies whether this call should be transcribed.
Default Value:
false
Allowed Value:
true or false
optional
Specifies the quality used to process the transcription.
Allowed Value:
auto, silver, gold, or platinum
optional
A URL some parameters regarding the transcription will be past to once it is completed.
optional
When set to true, this sends the call directly to the receivers voice mailbox.
Default Value:
false
Allowed Value:
true or false
optional
Specifies how TelAPI should handle this call if the receiving phone number is unanswered and goes to voicemail. "continue" to proceed as normal, "redirect" to redirect the call to the ifMachineUrl, or "hangup" to hangup the call.
Default Value:
continue
Allowed Value:
continue, redirect, hangup
optional
The URL TelAPI will redirect to if a voicemail machine is detected while the IfMachine="redirect" parameter is set.
optional
The method used to request the IfMachineUrl.
Default Value:
POST
Allowed Value:
POST or GET

Example Response

A call can be initiated using this method on the call request URI. An example of what a response to this request may look like is below.



Helper Example

Our helper libraries simplify the task of making REST API calls while programming. The code below will perform a request to TelAPI.