Making Calls
The /call/ function serves several purposes. In this section, we will cover the creating new calls utilizing POST variables.
API Token Notice
You will need both your API Token and your Call API SID (ACCOUNT_SID). Both are available in User Settings at the top right of the portal.
Section URI
https://v1.api19.com/call/2012-04-24/Accounts/ACCOUNT_SID/Calls.json
Supported Operations
HTTP GET Returns a list representation of all Call resources for this Account, including the properties above.
HTTP POST Makes a new Call and returns a representation of the Call resource, including the properties above
Request Parameters
StatusCallbackEvent
When creating a Call using the Calls API, an outbound call is initiated. The call transitions from the initiated state to the ringing state when the phone starts ringing. It transitions to the answered state when the call is picked up, and finally to the completed state when the call is over. With StatusCallbackEvent, you can subscribe to receive webhooks for the different call progress events: initiated, ringing, answered, or completed for a given call.
The StatusCallbackEvent attribute allows you to specify which events CallAPI should webhook on. To specify multiple events separate them with a comma as follows: initiated,ringing,answered,completed. If a StatusCallback is provided and no status callback events are specified, the completed event will be sent by default..
StatusCallback
The StatusCallback attribute allows you to specify a URL for CallAPI to send webhook requests to on each event specified in the StatusCallbackEvent attribute.
StatusCallbackMethod
The StatusCallbackMethod attribute allows you to specify which HTTP method CallAPI should use when requesting the URL in the StatusCallback attribute. The default is POST
Status Callback HTTP Parameters
The parameters CallAPI passes to your application in an asynchronous request to the StatusCallback URL include all parameters passed in a synchronous request to retrieve RCML when CallAPI receives a call to one of your CallAPI numbers. The full list of parameters and descriptions of each are in the RCML Voice Request documentation.
When the call progress events are fired, the Status Callback request also passes these additional parameters:
To redirect or terminate a live call, you make an HTTP POST request to an in¬-progress Call instance resource URI:
Last updated