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.
To initiate a call, make an HTTP POST with the URI below.
POST https://api.telapi.com/v1/Accounts/{AccountSid}/Calls
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.
|
|
optional
|
Specifies the HTTP method used to request the required URL once call connects.
|
|
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.
|
|
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.
|
|
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.
|
|
optional
|
Specifies the forwarding number to pass to the receiving carrier.
|
|
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.
|
|
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.
|
|
optional
|
Specifies if the caller id will be hidden.
|
|
optional
|
Specifies whether this call should be recorded.
|
|
optional
|
A URL some parameters regarding the recording will be past to once it is completed.
|
|
optional
|
Method used to request the RecordCallback URL.
|
|
optional
|
Specifies whether this call should be transcribed.
|
|
optional
|
Specifies the quality used to process the transcription.
|
|
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.
|
|
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.
|
|
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.
|
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.
Our helper libraries simplify the task of making REST API calls while programming. The code below will perform a request to TelAPI.