A Call Summary provides an overview of
for a single call.
Using the Call Summary Resource, you can get a single summary for a specific Call.
To get a list of Call Summaries for multiple calls use the Call Summaries Resource.
Voice Insights Advanced Features must be active to use this API Resource.
A completed Call Summary may take up to a half hour to generate, but a partial summary record will be available within ten minutes of a call ending.
The following table contains the top-level properties of a single Call Summary instance.
A Call Summary is a complex data structure with several of the top-level properties constituting nested objects.
The top level contains attributes
and properties
objects, and each edge of a call has metrics for both directions of the media stream as well as properties and summarized metrics. Further information for these object-typed properties can be found on the Details: Call Summary page.
Whether a particular edge is present will depend on the call type. A Voice SDK call will have an sdk_edge
and a client_edge
. A SIP trunking call will have a sip_edge
and a carrier_edge
. A SIP domain or <Dial><Sip>
call will have only a sip_edge
. A PSTN call will have only a carrier_edge
. See Understanding Twilio Media Edges for a conceptual explanation.
The unique SID identifier of the Account.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique SID identifier of the Call.
^CA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Call Type of the summarized Call. One of carrier
, sip
, trunking
or client
.
carrier
sip
trunking
client
The Call State of the summarized Call. One of ringing
, completed
, busy
, fail
, noanswer
, canceled
, answered
, undialed
.
ringing
completed
busy
fail
noanswer
canceled
answered
undialed
The Answered By value for the summarized call based on Answering Machine Detection (AMD)
. One of unknown
, machine_start
, machine_end_beep
, machine_end_silence
, machine_end_other
, human
or fax
. Refer to AMD for more detail.
unknown
machine_start
machine_end_beep
machine_end_silence
machine_end_other
human
fax
The Processing State of the Call Summary. The Processing State will be partial
until the assembly of the Call Summary finishes, which occurs approximately 30 minutes after Call end. Then the Processing State changes to complete
complete
partial
The time at which the Call was created, given in ISO 8601 format. Can be different from start_time
in the event of queueing due to CPS
The time at which the Call was started, given in ISO 8601 format.
The time at which the Call was ended, given in ISO 8601 format.
Contains metrics and properties for the Twilio media gateway of a PSTN call.
Contains metrics and properties for the Twilio media gateway of a Client call.
Contains metrics and properties for the SDK sensor library for Client calls.
Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.
Contains trusted communications details including Branded Call and verified caller ID.
Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API.
GET https://insights.twilio.com/v1/Voice/{CallSid}/Summary
The unique SID identifier of the Call.
^CA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Processing State of this Call Summary. One of complete
, partial
or all
.
complete
partial
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchSummary() {11const summary = await client.insights.v112.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.summary()14.fetch();1516console.log(summary.accountSid);17}1819fetchSummary();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",4"call_type": "carrier",5"call_state": "ringing",6"answered_by": "machine_start",7"processing_state": "complete",8"created_time": "2015-07-30T20:00:00Z",9"start_time": "2015-07-30T20:00:00Z",10"end_time": "2015-07-30T20:00:00Z",11"duration": 100,12"connect_duration": 99,13"from": {},14"to": {},15"carrier_edge": {},16"client_edge": {},17"sdk_edge": {},18"sip_edge": {},19"tags": [20"tags"21],22"attributes": {},23"properties": {},24"trust": {25"verified_caller": {26"verified": true27},28"branded": {29"enabled": true,30"display_name": "Owl bank",31"long_display_name": "Owl bank Ltd",32"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167"33},34"business_profile": {35"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",36"identity": "direct_customer",37"industry": "BANKING",38"type": "corporate"39},40"voice_integrity": {41"enabled": true,42"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",43"use_case": "customer_support"44}45},46"annotation": {47"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",48"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",49"answered_by": "human",50"connectivity_issue": "invalid_number",51"quality_issues": [52"low_volume"53],54"spam": true,55"call_score": 2,56"comment": "this is a call",57"incident": "https://twilio.zendesk.com/support/tickets/17353089"58},59"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"60}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchSummary() {11const summary = await client.insights.v112.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.summary()14.fetch({ processingState: "partial" });1516console.log(summary.accountSid);17}1819fetchSummary();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"call_sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",4"call_type": "carrier",5"call_state": "ringing",6"answered_by": "machine_start",7"processing_state": "partial",8"created_time": "2015-07-30T20:00:00Z",9"start_time": "2015-07-30T20:00:00Z",10"end_time": "2015-07-30T20:00:00Z",11"duration": 100,12"connect_duration": 99,13"from": {},14"to": {},15"carrier_edge": {},16"client_edge": {},17"sdk_edge": {},18"sip_edge": {},19"tags": [20"tags"21],22"attributes": {},23"properties": {},24"trust": {25"verified_caller": {26"verified": true27},28"branded": {29"enabled": true,30"display_name": "Owl bank",31"long_display_name": "Owl bank Ltd",32"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167"33},34"business_profile": {35"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",36"identity": "direct_customer",37"industry": "BANKING",38"type": "corporate"39},40"voice_integrity": {41"enabled": true,42"bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",43"use_case": "customer_support"44}45},46"annotation": {47"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",48"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",49"answered_by": "human",50"connectivity_issue": "invalid_number",51"quality_issues": [52"low_volume"53],54"spam": true,55"call_score": 2,56"comment": "this is a call",57"incident": "https://twilio.zendesk.com/support/tickets/17353089"58},59"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"60}