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
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.




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