A Call instance resource represents a connection between a telephone and Twilio. This may
be inbound, when a person calls your application, or outbound, when your
application initiates the call, either via the REST API (see Making Calls) or
during a call via the TwiML <Dial> verb.
The Calls list resource represents the set of phone calls made to and from an account.
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}
A Call instance resource is represented by the following properties:
| Property | Description |
|---|---|
| Sid | A 34 character string that uniquely identifies this resource. |
| ParentCallSid | A 34 character string that uniquely identifies the call that created this leg. |
| DateCreated | The date that this resource was created, given as GMT in RFC 2822 format. |
| DateUpdated | The date that this resource was last updated, given as GMT in RFC 2822 format. |
| AccountSid | The unique id of the Account responsible for creating this call. |
| To | The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g. +16175551212). SIP addresses are formated as name@company.com. Client identifiers are formatted client:name. |
| From | The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g. +16175551212). SIP addresses are formated as name@company.com. Client identifiers are formatted client:name. |
| PhoneNumberSid | If the call was inbound, this is the Sid of the IncomingPhoneNumber that received the call. If the call was outbound, it is the Sid of the OutgoingCallerId from which the call was placed. |
| Status | A string representing the status of the call. May be queued, ringing, in-progress, canceled, completed, failed, busy or no-answer. See 'Call Status Values' below for more information. |
| StartTime | The start time of the call, given as GMT in RFC 2822 format. Empty if the call has not yet been dialed. |
| EndTime | The end time of the call, given as GMT in RFC 2822 format. Empty if the call did not complete successfully. |
| Duration | The length of the call in seconds. This value is empty for busy, failed, unanswered or ongoing calls. |
| Price | The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. |
| PriceUnit | The currency in which Price is measured, in ISO 4127 format (e.g. usd, eur, jpy). |
| Direction | A string describing the direction of the call. inbound for inbound calls, outbound-api for calls initiated via the REST API or outbound-dial for calls initiated by a <Dial> verb. |
| AnsweredBy | If this call was initiated with answering machine detection, either human or machine. Empty otherwise. |
| ForwardedFrom | If this call was an incoming call forwarded from another number, the forwarding phone number (depends on carrier supporting forwarding). Empty otherwise. |
| CallerName | If this call was an incoming call to a phone number with Caller ID Lookup enabled, the caller's name. Empty otherwise. |
| Uri | The URI for this resource, relative to https://api.twilio.com |
The following are the possible values for the 'Status' parameter.
| Status | Description |
|---|---|
| queued | The call is ready and waiting in line before going out. |
| ringing | The call is currently ringing. |
| in-progress | The call was answered and is currently in progress. |
| canceled | The call was hung up while it was queued or ringing. |
| completed | The call was answered and has ended normally. |
| busy | The caller received a busy signal. |
| failed | The call could not be completed as dialed, most likely because the phone number was non-existent. |
| no-answer | The call ended without being answered. |
Returns the single Call resource identified by {CallSid}.
Initiates a call redirect or terminates a call. See Modifying Live Calls for details.
Not supported
Not supported
Each Call instance resource supports a few subresources for your convenience.
/2010-04-01/Accounts/{YourAccountSid}/Calls/{CallSid}/Recordings
Represents a list of recordings generated during the call identified by {CallSid}. See the Recordings section for resource properties and response formats.
/2010-04-01/Accounts/{YourAccountSid}/Calls/{CallSid}/Notifications
Represents a list of notifications generated during the call identified by {CallSid}. See the Notifications section for resource properties and response formats.
/2010-04-01/Accounts/{AccountSid}/Calls
Returns a list of phone calls made to and from the account identified by {AccountSid}.
The list includes paging information. If you plan on requesting more records than will
fit on a single page, you may want to use the provided nextpageuri rather than
incrementing through the pages by page number. Using the nextpageuri helps to
ensure that your next request picks up where it left off and can prevent you
from retrieving duplicate data if you are actively making or receiving calls.
The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:
| Parameter | Description |
|---|---|
| To | Only show calls to this phone number or Client identifier. |
| From | Only show calls from this phone number or Client identifier. |
| Status | Only show calls currently in this status. May be queued, ringing, in-progress, canceled, completed, failed, busy, or no-answer. |
| StartTime | Only show calls that started on this date, given as YYYY-MM-DD. Also supports inequalities, such as StartTime<=YYYY-MM-DD for calls that started at or before midnight on a date, and StartTime>=YYYY-MM-DD for calls that started at or after midnight on a date. |
| ParentCallSid | Only show calls spawned by the call with this Sid. |
Just grab the whole list.
Only show completed calls started on Jul 06th, 2009.
Only show completed calls started on or after midnight Jul 06th, 2009.
Only show completed calls started between midnight Jul 04th, 2009 and midnight Jul 06th, 2009.
Did you know you can append a '.csv' extension to any resource URI to get a Comma Separated Values representation? This is especially useful for call logs. Try this:
GET /2010-04-01/Accounts/AC5ef87.../Calls.csv
Read the Tips & Tricks Section for more information about alternate representations, including CSV.
Only show busy calls that were made with the specified 'To' number (in E.164 format).
Only show calls that were made from a Twilio Client device named 'tommy'.
Initiate a new phone call. See Making Calls for details.
Not supported
Not supported