Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Call Insights Event Resource


A Call Insights Event is an object representing an event which occurred during a voice call.

Call Events can be:

Using the Call Insights Event Resource, you can read a list of Call Insights Events for a specific voice call.

(warning)

Warning

Voice Insights Advanced Features must be active to use this API Resource.

(warning)

Warning

Voice Insights for mobile SDKs is supported for versions 3.x and later. Calls placed using 2.x mobile SDKs are not supported and details are provided as-is and may not be reliable indicators of actual behavior on the handset.

(information)

Info

Events are typically available via the API within 90 seconds.


Call Insights Event properties

call-insights-event-properties page anchor

The following table details the properties of a single Call Insights Event instance.

Resource properties
timestamptype: stringNot PII

Event time.


call_sidtype: SID<CA>Not PII

The unique SID identifier of the Call.


account_sidtype: SID<AC>Not PII

The unique SID identifier of the Account.


edgetype: enum<STRING>Not PII

The Edge of this Event. One of unknown_edge, carrier_edge, sip_edge, sdk_edge or client_edge.

Possible values:
unknown_edgecarrier_edgesip_edgesdk_edgeclient_edge

grouptype: stringNot PII

Event group.


leveltype: enum<STRING>Not PII

The Level of this Event. One of UNKNOWN, DEBUG, INFO, WARNING or ERROR.

Possible values:
UNKNOWNDEBUGINFOWARNINGERROR

nametype: stringNot PII

Event name.


carrier_edgetype: objectNot PII

Represents the connection between Twilio and our immediate carrier partners. The events here describe the call lifecycle as reported by Twilio's carrier media gateways.


sip_edgetype: objectNot PII

Represents the Twilio media gateway for SIP interface and SIP trunking calls. The events here describe the call lifecycle as reported by Twilio's public media gateways.


sdk_edgetype: objectNot PII

Represents the Voice SDK running locally in the browser or in the Android/iOS application. The events here are emitted by the Voice SDK in response to certain call progress events, network changes, or call quality conditions.


client_edgetype: objectNot PII

Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio's Voice SDK media gateways.


Read multiple Call Insights Event resources

read-multiple-call-insights-event-resources page anchor
GET https://insights.twilio.com/v1/Voice/{CallSid}/Events

Use this action to retrieve a list of Call Insights Events for the specified voice call.

You can use the optional edge parameter to filter the list by media edge. See Understanding Twilio Media Edges for more information.

If no edge parameter is provided, the resulting list will depend on the call type:

Call TypeDefault EdgeAdditional Edge
Carriercarrier_edgeN/A
SIPsip_edgeN/A
Clientsdk_edgeclient_edge
Trunking Originatingcarrier_edgesip_edge
Trunking Terminatingsip_edgecarrier_edge

Parameters

list-parameters page anchor
URI parameters
CallSidtype: SID<CA>Not PII
Path Parameter

The unique SID identifier of the Call.


Edgetype: enum<STRING>Not PII
Query Parameter

The Edge of this Event. One of unknown_edge, carrier_edge, sip_edge, sdk_edge or client_edge.

Possible values:
unknown_edgecarrier_edgesip_edgesdk_edgeclient_edge

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.

Read multiple Call Insights Events for a Call

read-multiple-call-insights-events-for-a-call 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.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.events
_11
.list({limit: 20})
_11
.then(events => events.forEach(e => console.log(e.name)));

Output

_57
{
_57
"meta": {
_57
"page": 0,
_57
"page_size": 50,
_57
"first_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0",
_57
"previous_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0",
_57
"next_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=1",
_57
"key": "events",
_57
"url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0"
_57
},
_57
"events": [
_57
{
_57
"timestamp": "2019-09-19T22:15:23Z",
_57
"call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
_57
"account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
_57
"edge": "sdk_edge",
_57
"group": "connection",
_57
"name": "error",
_57
"level": "ERROR",
_57
"sdk_edge": {
_57
"error": {
_57
"code": 31600
_57
},
_57
"metadata": {
_57
"client_name": "GTI9300323095d271b890c91568931321395",
_57
"location": {
_57
"lat": 37.4192,
_57
"lon": -122.0574
_57
},
_57
"city": "Mountain View",
_57
"country_code": "US",
_57
"country_subdivision": "California",
_57
"ip_address": "108.177.7.83",
_57
"sdk": {
_57
"type": "twilio-voice-android",
_57
"version": "4.5.1",
_57
"platform": "android",
_57
"selected_region": "gll",
_57
"os": {
_57
"name": "android",
_57
"version": "4.3"
_57
},
_57
"device": {
_57
"model": "GT-I9300",
_57
"type": "GT-I9300",
_57
"vendor": "samsung",
_57
"arch": "armeabi-v7a"
_57
}
_57
}
_57
}
_57
},
_57
"client_edge": null,
_57
"carrier_edge": null,
_57
"sip_edge": null
_57
}
_57
]
_57
}

Read multiple Call Insights Events for a Call filtered by Media Edge

read-multiple-call-insights-events-for-a-call-filtered-by-media-edge 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.insights.v1.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.events
_11
.list({edge: 'sdk_edge', limit: 20})
_11
.then(events => events.forEach(e => console.log(e.name)));

Output

_57
{
_57
"meta": {
_57
"page": 0,
_57
"page_size": 50,
_57
"first_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0",
_57
"previous_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0",
_57
"next_page_url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=1",
_57
"key": "events",
_57
"url": "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events?PageSize=50&Page=0"
_57
},
_57
"events": [
_57
{
_57
"timestamp": "2019-09-19T22:15:23Z",
_57
"call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
_57
"account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
_57
"edge": "sdk_edge",
_57
"group": "connection",
_57
"name": "error",
_57
"level": "ERROR",
_57
"sdk_edge": {
_57
"error": {
_57
"code": 31600
_57
},
_57
"metadata": {
_57
"client_name": "GTI9300323095d271b890c91568931321395",
_57
"location": {
_57
"lat": 37.4192,
_57
"lon": -122.0574
_57
},
_57
"city": "Mountain View",
_57
"country_code": "US",
_57
"country_subdivision": "California",
_57
"ip_address": "108.177.7.83",
_57
"sdk": {
_57
"type": "twilio-voice-android",
_57
"version": "4.5.1",
_57
"platform": "android",
_57
"selected_region": "gll",
_57
"os": {
_57
"name": "android",
_57
"version": "4.3"
_57
},
_57
"device": {
_57
"model": "GT-I9300",
_57
"type": "GT-I9300",
_57
"vendor": "samsung",
_57
"arch": "armeabi-v7a"
_57
}
_57
}
_57
}
_57
},
_57
"client_edge": null,
_57
"carrier_edge": null,
_57
"sip_edge": null
_57
}
_57
]
_57
}


Rate this Page: