Skip to contentSkip to navigationSkip to topbar
On this page

Call Summary Resource


A Call Summary provides an overview of

  • metadata, and
  • quality metrics

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.

(warning)

Warning

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

(information)

Info

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.


Call Summary properties

call-summary-properties page anchor

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.

Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>

Optional

Not PII

The unique SID identifier of the Account.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

call_sidSID<CA>

Optional

The unique SID identifier of the Call.

Pattern: ^CA[0-9a-fA-F]{32}$Min length: 34Max length: 34

call_typeenum<string>

Optional

The Call Type of the summarized Call. One of carrier, sip, trunking or client.

Possible values:
carriersiptrunkingclient

call_stateenum<string>

Optional

The Call State of the summarized Call. One of ringing, completed, busy, fail, noanswer, canceled, answered, undialed.

Possible values:
ringingcompletedbusyfailnoanswercanceledansweredundialed

answered_byenum<string>

Optional

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.

Possible values:
unknownmachine_startmachine_end_beepmachine_end_silencemachine_end_otherhumanfax

processing_stateenum<string>

Optional

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

Possible values:
completepartial

created_timestring<date-time>

Optional

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


start_timestring<date-time>

Optional

The time at which the Call was started, given in ISO 8601 format.


end_timestring<date-time>

Optional

The time at which the Call was ended, given in ISO 8601 format.


durationinteger

Optional

Duration between when the call was initiated and the call was ended


connect_durationinteger

Optional

Duration between when the call was answered and when it ended


fromobject

Optional

PII MTL: 30 days

The calling party.


toobject

Optional

The called party.


carrier_edgeobject

Optional

Contains metrics and properties for the Twilio media gateway of a PSTN call.


client_edgeobject

Optional

Contains metrics and properties for the Twilio media gateway of a Client call.


sdk_edgeobject

Optional

Contains metrics and properties for the SDK sensor library for Client calls.


sip_edgeobject

Optional

Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.


tagsarray[string]

Optional

Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.


urlstring<uri>

Optional

The URL of this resource.


attributesobject

Optional

Attributes capturing call-flow-specific details.


propertiesobject

Optional

Contains edge-agnostic call-level details.


trustobject

Optional

Contains trusted communications details including Branded Call and verified caller ID.


annotationobject

Optional

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.


Fetch a Summary resource

fetch-a-summary-resource page anchor
GET https://insights.twilio.com/v1/Voice/{CallSid}/Summary

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
CallSidSID<CA>required

The unique SID identifier of the Call.

Pattern: ^CA[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
ProcessingStateenum<string>

Optional

The Processing State of this Call Summary. One of complete, partial or all.

Possible values:
completepartial
Fetch a Call SummaryLink to code sample: Fetch a Call Summary
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchSummary() {
11
const summary = await client.insights.v1
12
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.summary()
14
.fetch();
15
16
console.log(summary.accountSid);
17
}
18
19
fetchSummary();

Output

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": true
27
},
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/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchSummary() {
11
const summary = await client.insights.v1
12
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.summary()
14
.fetch({ processingState: "partial" });
15
16
console.log(summary.accountSid);
17
}
18
19
fetchSummary();

Output

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": true
27
},
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
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.