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

AttributeType
account_sidstringThe unique identifier for the account that created this call.
annotationstringThe annotation for the call.
answered_bystringWho/what the call was answered by. Possible values are human or machine.
api_versionstringThe version of the SignalWire API.
caller_namestringThe name of the caller. Only available if Caller ID lookup is enabled.
date_createddatetimeThe date, in RFC 2822 GMT format, this call was created.
date_updateddatetimeThe date, in RFC 2822 GMT format, this call was updated.
directionstringThe direction of the call. Possible values are inbound or outbound.
durationstringThe duration, in seconds, of the call.
end_timedatetimeThe time, in RFC 2822 GMT format, the call was terminated.
forwarded_fromstringThe number this call was forwarded from.
fromstringThe number, in E.164 format, that initiated the call.
formatted_fromstringThe formatted number that initiated the call.
parent_call_sidstringThe unique identifier for the call that created this leg.
phone_number_sidstringOutbound call: the unique identifier for OutgoingCallerId. Inbound call: the unique identifier for IncomingPhoneNumber.
priceintegerThe charge for the call.
price_unitstringThe currency, in ISO 4127 format, for the price of the call.
sidstringThe unique identifier for the call.
start_timedatetimeThe time, in RFC 2822 GMT format, the call began.
statusstringThe status of the call. See below for all possible values.
subresource_urisobjectA Map of available sub-resources.
tostringThe number, in E.164 format, that received the call.
formatted_tostringThe formatted number that received the call.
uristringThe URI for the call.


Status

The status attribute has the following values:

Value
queuedThe call is ready and waiting in line.
ringingThe call is ringing.
in-progressThe call was picked up and is in progress.
canceledThe call was terminated when ringing or queued.
completedThe call was picked up and terminated with no issues.
busyThe caller received a busy signal.
failedThe call was not completed because of a failure.

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.005,
"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"
}