Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Call Event Resource



CallEvent Properties

callevent-properties page anchor
Resource properties
requesttype: objectPII MTL: 30 days

Contains a dictionary representing the request of the call.


responsetype: objectPII MTL: 30 days

Contains a dictionary representing the call response, including a list of the call events.


The request property represents the request that Twilio made to your application. It contains the url, method, and parameters.

(information)

Info

The parameters property keys are presented in snake_case format, lower cased and words separated by underscores.

For example, the results from your AddOns will be found under the key add_ons.


The response property represents what your application sent back to Twilio. It contains date_created, request_duration, response_code, content_type, and response_body.

You can use this information to ensure you are producing the intended Voice TwiML.


Read multiple CallEvent resources

read-multiple-callevent-resources page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json

Parameters

list-parameters page anchor
URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The unique SID identifier of the Account.


CallSidtype: SID<CA>Not PII
Path Parameter

The unique SID identifier of the Call.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

List multiple CallEvents

list-multiple-callevents page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.events
_11
.list({limit: 20})
_11
.then(events => events.forEach(e => console.log(e.request)));

Output

_38
{
_38
"events": [
_38
{
_38
"request": {
_38
"method": "POST",
_38
"url": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_38
"parameters": {
_38
"status_callback_method": "POST",
_38
"twiml": "<Response><Say>Hi!</Say></Response>",
_38
"trim": "trim-silence",
_38
"timeout": "55",
_38
"method": "POST",
_38
"from": "+987654321",
_38
"to": "+123456789",
_38
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_38
"machine_detection_timeout": "0"
_38
}
_38
},
_38
"response": {
_38
"response_code": 201,
_38
"request_duration": 50,
_38
"content_type": "application/json",
_38
"response_body": {
_38
"sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_38
},
_38
"date_created": "Tue, 11 Aug 2020 17:44:08 +0000"
_38
}
_38
}
_38
],
_38
"end": 0,
_38
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0",
_38
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=50",
_38
"page": 0,
_38
"page_size": 50,
_38
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0",
_38
"start": 0,
_38
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events.json?PageSize=50&Page=0"
_38
}


Rate this page: