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
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.
Info
Events are typically available via the API within 90 seconds.
The following table details the properties of a single Call Insights Event instance.
Property nameTypePIIDescription
The unique SID identifier of the Call.
Pattern: ^CA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique SID identifier of the Account.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Edge of this Event. One of unknown_edge
, carrier_edge
, sip_edge
, sdk_edge
or client_edge
.
Possible values: unknown_edge
carrier_edge
sip_edge
sdk_edge
client_edge
The Level of this Event. One of UNKNOWN
, DEBUG
, INFO
, WARNING
or ERROR
.
Possible values: UNKNOWN
DEBUG
INFO
WARNING
ERROR
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.
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.
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.
Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio's Voice SDK media gateways.
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 Type | Default Edge | Additional Edge |
---|
Carrier | carrier_edge | N/A |
SIP | sip_edge | N/A |
Client | sdk_edge | client_edge |
Trunking Originating | carrier_edge | sip_edge |
Trunking Terminating | sip_edge | carrier_edge |
Property nameTypeRequiredPIIDescription
The unique SID identifier of the Call.
Pattern: ^CA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
The Edge of this Event. One of unknown_edge
, carrier_edge
, sip_edge
, sdk_edge
or client_edge
.
Possible values: unknown_edge
carrier_edge
sip_edge
sdk_edge
client_edge
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_18// Download the helper library from https://www.twilio.com/docs/node/install
_18const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18// Find your Account SID and Auth Token at twilio.com/console
_18// and set the environment variables. See http://twil.io/secure
_18const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18const authToken = process.env.TWILIO_AUTH_TOKEN;
_18const client = twilio(accountSid, authToken);
_18async function listEvent() {
_18 const events = await client.insights.v1
_18 .calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_18 .events.list({ limit: 20 });
_18 events.forEach((e) => console.log(e.timestamp));
_57 "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0",
_57 "previous_page_url": null,
_57 "next_page_url": null,
_57 "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0"
_57 "timestamp": "2019-09-19T22:15:23Z",
_57 "call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
_57 "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
_57 "group": "connection",
_57 "client_name": "GTI9300323095d271b890c91568931321395",
_57 "city": "Mountain View",
_57 "country_code": "US",
_57 "country_subdivision": "California",
_57 "ip_address": "108.177.7.83",
_57 "type": "twilio-voice-android",
_57 "platform": "android",
_57 "selected_region": "gll",
_57 "arch": "armeabi-v7a"
_57 "carrier_edge": null,
_21// Download the helper library from https://www.twilio.com/docs/node/install
_21const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21// Find your Account SID and Auth Token at twilio.com/console
_21// and set the environment variables. See http://twil.io/secure
_21const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21const authToken = process.env.TWILIO_AUTH_TOKEN;
_21const client = twilio(accountSid, authToken);
_21async function listEvent() {
_21 const events = await client.insights.v1
_21 .calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_21 events.forEach((e) => console.log(e.timestamp));
_57 "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0",
_57 "previous_page_url": null,
_57 "next_page_url": null,
_57 "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0"
_57 "timestamp": "2019-09-19T22:15:23Z",
_57 "call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
_57 "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
_57 "group": "connection",
_57 "client_name": "GTI9300323095d271b890c91568931321395",
_57 "city": "Mountain View",
_57 "country_code": "US",
_57 "country_subdivision": "California",
_57 "ip_address": "108.177.7.83",
_57 "type": "twilio-voice-android",
_57 "platform": "android",
_57 "selected_region": "gll",
_57 "arch": "armeabi-v7a"
_57 "carrier_edge": null,