Create a Call
Changed onStarts an outbound call whose behavior is supplied by a cXML URL or Application SID. Use this form-encoded route for integrations built around cXML call control and Call SIDs; use the Calling API for SWML-driven calls and command-based control.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice.
Learn more about API scopes.
Request
- Base URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
- URLhttps://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls
- AuthHTTP basic
Path parameters
Universal Unique Identifier.
The Project ID that uniquely identifies the Account.
Request body application/x-www-form-urlencoded
Example request
{
"To": "+13105678901",
"From": "+13103384645",
"Url": "http://your-application.com/docs/voice.xml",
"Method": "POST",
"FallbackUrl": "https://your-api-endpoint.com/path",
"FallbackMethod": "POST",
"StatusCallback": "https://your-api-endpoint.com/path",
"StatusCallbackMethod": "POST",
"StatusCallbackEvent": [
"initiated",
"ringing",
"answered",
"completed"
],
"CallerId": "+13102259067",
"SendDigits": "1ww2",
"Timeout": 60,
"MachineDetection": "Enable",
"MachineDetectionTimeout": 30,
"MachineDetectionSpeechThreshold": 2400,
"MachineDetectionSpeechEndThreshold": 1200,
"MachineDetectionSilenceTimeout": 5000,
"MachineWordsThreshold": 6,
"AsyncAmdStatusCallbackMethod": "POST",
"AsyncAmdStatusCallback": "https://your-api-endpoint.com/path",
"RecordingChannels": "mono",
"RecordingTrack": "both",
"RecordingStatusCallback": "https://your-api-endpoint.com/path",
"RecordingStatusCallbackMethod": "POST",
"RecordingStatusCallbackEvent": "completed",
"Trim": "trim-silence",
"SipAuthUsername": "sipuser",
"SipAuthPassword": "sippassword",
"MaxPricePerMinute": "0.0075"
}Response
The request has succeeded.
Example response
{
"date_created": "Wed, 19 Sep 2018 20:00:00 +0000",
"date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
"to": "+13105678901",
"formatted_to": "(310) 567-8901",
"to_formatted": "(310) 567-8901",
"from": "+13103384645",
"formatted_from": "(310) 338-4645",
"from_formatted": "(310) 338-4645",
"start_time": "Wed, 19 Sep 2018 20:00:01 +0000",
"end_time": "Fri, 21 Sep 2018 10:00:00 +0000",
"duration": 20,
"price": 0.003,
"price_unit": "USD",
"api_version": "2010-04-01",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca.json",
"subresource_uris": {
"recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
},
"audio_in_mos": 4.5,
"sip_result_code": "200",
"audio_rtt_avg": 50,
"audio_rtt_min": 20,
"audio_rtt_max": 100,
"audio_out_jitter_min": 1,
"audio_out_jitter_max": 10,
"audio_out_jitter_avg": 5
}Changes
- breaking
added to the
request propertyallOflist - breaking
the
response's property type changed fromstringto no type, and format fromuuidto no format for status - breaking
the
response's property format changed fromuuidto no format for status - breaking
the
response's property format changed fromuuidto no format for status - breaking
the
response's property type changed fromstringto no type, and format fromuuidto no format for status - info
the
request property type was generalized fromstringto no type, and format fromuuidto no format - info
added to the
response propertyallOflist for the response status - info
added to the
response propertyallOflist for the response status - info
added to the
response propertyanyOflist for the response status - info
added to the
response propertyanyOflist for the response status - info
removed
subschema #1from theresponse propertyanyOflist for the response status - info
removed
subschema #1from theresponse propertyanyOflist for the response status
- breaking
- breaking
added 'unevaluatedProperties' constraint to the request body
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the response body for the status
- info
added 'unevaluatedProperties' constraint to the
/response property for the status - info
added 'unevaluatedProperties' constraint to the
////response property for the status
- breaking