Skip to main content

Calls

A call is a connection between SignalWire and another phone. Outbound calls are made from SignalWire numbers to other phone numbers. Inbound calls are made from other phone numbers to SignalWire numbers.

Properties

A sample call returned from the API.

{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
"annotation": null,
"answered_by": null,
"api_version": "2010-04-01",
"caller_name": null,
"date_created": "Wed, 19 Sept 2018 20:00:00 +0000",
"date_updated": "Thur, 20 Sept 2018 10:00:00 +0000",
"direction": "inbound",
"duration": 20,
"end_time": "Fri, 21 Sept 2018 10:00:00 +0000",
"forwarded_from": "+13102259067",
"from": "+13103384645",
"formatted_from": "(310) 338-4645",
"parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
"phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472ph",
"price": -0.00500,
"price_unit": "USD",
"sid": "b3877c40-da60-4998-90ad-b792e98472pa",
"start_time": "Wed, 19 Sept 2018 20:00:01 +0000",
"status": "completed",
"subresource_uris": {
"notifications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Notifications.json",
"recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Recordings.json"
},
"to": "+13105678901",
"formatted_to": "(310) 567-8901",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa.json",
"url": "http://your-application.com/docs/voice.xml"
}
Attribute
account_sid stringThe unique identifier for the account that created this call.
annotation stringThe annotation for the call.
answered_by stringWho/what the call was answered by. Possible values are human or machine.
api_version stringThe version of the SignalWire API.
caller_name stringThe name of the caller. Only available if Caller ID lookup is enabled.
date_created datetimeThe date, in RFC 2822 GMT format, this call was created.
date_updated datetimeThe date, in RFC 2822 GMT format, this call was updated.
direction stringThe direction of the call. Possible values are inbound or outbound.
duration stringThe duration, in seconds, of the call.
end_time datetimeThe time, in RFC 2822 GMT format, the call was terminated.
forwarded_from stringThe number this call was forwarded from.
from stringThe number, in E.164 format, that initiated the call.
formatted_from stringThe formatted number that initiated the call.
parent_call_sid stringThe unique identifier for the call that created this leg.
phone_number_sid stringOutbound call: the unique identifier for OutgoingCallerId. Inbound call: the unique identifier for IncomingPhoneNumber.
price integerThe charge for the call.
price_unit stringThe currency, in ISO 4127 format, for the price of the call.
sid stringThe unique identifier for the call.
start_time datetimeThe time, in RFC 2822 GMT format, the call began.
status stringThe status of the call. See below for all possible values.
subresource_uris objectA Map of available sub-resources.
to stringThe number, in E.164 format, that received the call.
formatted_to stringThe formatted number that received the call.
uri stringThe URI for the call.

Status

The status attribute has the following values:

Value
queued The call is ready and waiting in line.
ringing The call is ringing.
in-progress The call was picked up and is in progress.
canceled The call was terminated when ringing or queued.
completed The call was picked up and terminated with no issues.
busy The caller received a busy signal.
failed The call was not completed because of a failure.

StatusCallback Parameters

In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire makes a request to the StatusCallback URL.

Parameter
ForwardedFrom The number this call was forwarded from.
CallerName The name of the caller. Only available if Caller ID lookup is enabled.
CallDuration The duration, in seconds, of the call.
RecordingUrl The URL of the recorded audio call.
RecordingSid The unique identifier for the audio recording.
RecordingDuration The duration, in seconds of the recording.
Timestamp The timestamp, in RFC 2822 format, an event occurred.
CallbackSource The source of the webhook.
SequenceNumber The order in which events occur. Starts at 0. Although events are fired in order, they each take time and may not appear in the order you expect.

The standard parameter, CallStatus, has the following values:

Value
queued The call is ready and waiting in line.
ringing The call is ringing.
in-progress The call was picked up and is in progress.
canceled The call was terminated when ringing or queued.
completed The call was picked up and terminated with no issues.
busy The caller received a busy signal.
failed The call was not completed because of a failure.

RecordingStatusCallback Parameters

In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire makes a request to the RecordingStatusCallback URL.

Parameter
RecordingSid The unique identifier for the audio recording.
RecordingUrl The URL of the recorded audio call.
RecordingStatus The status of the recording. See below for all possible values.
RecordingDuration The duration, in seconds of the recording.
RecordingChannels The number of channels in the recording. Possible values are 1 and 2.
RecordingSource The type of call that made the recording.
RecordingTrack Which audio tracks are recorded. Can be inbound, outbound, or both.

RecordingStatus

The RecordingStatus attribute has the following values:

Value
in-progress The recording of the call has begun.
completed The recording of the call is completed and ready to access.
failed The recording of the call is not accessible because of a failure.