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
Attribute | Type | |
---|---|---|
account_sid | string | The unique identifier for the account that created this call. |
annotation | string | The annotation for the call. |
answered_by | string | Who/what the call was answered by. Possible values are human or machine . |
api_version | string | The version of the SignalWire API. |
caller_name | string | The name of the caller. Only available if Caller ID lookup is enabled. |
date_created | datetime | The date, in RFC 2822 GMT format, this call was created. |
date_updated | datetime | The date, in RFC 2822 GMT format, this call was updated. |
direction | string | The direction of the call. Possible values are inbound or outbound . |
duration | string | The duration, in seconds, of the call. |
end_time | datetime | The time, in RFC 2822 GMT format, the call was terminated. |
forwarded_from | string | The number this call was forwarded from. |
from | string | The number, in E.164 format, that initiated the call. |
formatted_from | string | The formatted number that initiated the call. |
parent_call_sid | string | The unique identifier for the call that created this leg. |
phone_number_sid | string | Outbound call: the unique identifier for OutgoingCallerId . Inbound call: the unique identifier for IncomingPhoneNumber . |
price | integer | The charge for the call. |
price_unit | string | The currency, in ISO 4127 format, for the price of the call. |
sid | string | The unique identifier for the call. |
start_time | datetime | The time, in RFC 2822 GMT format, the call began. |
status | string | The status of the call. See below for all possible values. |
subresource_uris | object | A Map of available sub-resources. |
to | string | The number, in E.164 format, that received the call. |
formatted_to | string | The formatted number that received the call. |
uri | string | The 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. |
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"
}