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

Call Summaries Resource


A Call Summary provides an overview of

  • metadata, and
  • quality metrics

for a single call.

Using the Call Summaries Resource, you can get a list of Call Summaries.

To get the Call Summary for an individual call use the Call Summary Resource.

(information)

Info

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 nameTypePIIDescription
account_sidSID<AC>
Not PII

The unique SID identifier of the Account.

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

call_sidSID<CA>

The unique SID identifier of the Call.

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

answered_byenum<string>

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

call_typeenum<string>

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

Possible values:
carriersiptrunkingclient

call_stateenum<string>

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

Possible values:
ringingcompletedbusyfailnoanswercanceledansweredundialed

processing_stateenum<string>

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>

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>

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


end_timestring<date-time>

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


durationinteger

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


connect_durationinteger

Duration between when the call was answered and when it ended


fromobject
PII MTL: 30 days

The calling party.


The called party.


carrier_edgeobject

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


client_edgeobject

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


sdk_edgeobject

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


sip_edgeobject

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


tagsarray[string]

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


urlstring<uri>

The URL of this resource.


attributesobject

Attributes capturing call-flow-specific details.


propertiesobject

Contains edge-agnostic call-level details.


trustobject

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


annotationnull

Read multiple Call Summary resources

read-multiple-call-summary-resources page anchor
GET https://insights.twilio.com/v1/Voice/Summaries

Query parameters

query-parameters page anchor
Property nameTypeRequiredPIIDescription
FromstringOptional

A calling party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.


TostringOptional

A called party. Could be an E.164 number, a SIP URI, or a Twilio Client registered name.


FromCarrierstringOptional

An origination carrier.


ToCarrierstringOptional

A destination carrier.


FromCountryCodestringOptional

A source country code based on phone number in From.


ToCountryCodestringOptional

A destination country code. Based on phone number in To.


BrandedbooleanOptional

A boolean flag indicating whether or not the calls were branded using Twilio Branded Calls.


VerifiedCallerbooleanOptional

A boolean flag indicating whether or not the caller was verified using SHAKEN/STIR.


HasTagbooleanOptional

A boolean flag indicating the presence of one or more Voice Insights Call Tags.


StartTimestringOptional

A Start time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 4h.


EndTimestringOptional

An End Time of the calls. xm (x minutes), xh (x hours), xd (x days), 1w, 30m, 3d, 4w or datetime-ISO. Defaults to 0m.


CallTypestringOptional

A Call Type of the calls. One of carrier, sip, trunking or client.


CallStatestringOptional

A Call State of the calls. One of ringing, completed, busy, fail, noanswer, canceled, answered, undialed.


DirectionstringOptional

A Direction of the calls. One of outbound_api, outbound_dial, inbound, trunking_originating, trunking_terminating.


ProcessingStateenum<string>Optional

A Processing State of the Call Summaries. One of completed, partial or all.

Possible values:
completedstartedpartialall

SortByenum<string>Optional

A Sort By criterion for the returned list of Call Summaries. One of start_time or end_time.

Possible values:
start_timeend_time

SubaccountSID<AC>Optional

A unique SID identifier of a Subaccount.

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

AbnormalSessionbooleanOptional

A boolean flag indicating an abnormal session where the last SIP response was not 200 OK.


AnsweredByenum<string>Optional

An Answered By value for the calls based on Answering Machine Detection (AMD). One of unknown, machine_start, machine_end_beep, machine_end_silence, machine_end_other, human or fax.

Possible values:
unknownmachine_startmachine_end_beepmachine_end_silencemachine_end_otherhumanfax

AnsweredByAnnotationstringOptional

Either machine or human.


ConnectivityIssueAnnotationstringOptional

A Connectivity Issue with the calls. One of no_connectivity_issue, invalid_number, caller_id, dropped_call, or number_reachability.


QualityIssueAnnotationstringOptional

A subjective Quality Issue with the calls. One of no_quality_issue, low_volume, choppy_robotic, echo, dtmf, latency, owa, static_noise.


SpamAnnotationbooleanOptional

A boolean flag indicating spam calls.


CallScoreAnnotationstringOptional

A Call Score of the calls. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for the rated call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad].


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

Read multiple Call Summaries

read-multiple-call-summaries page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listCallSummaries() {
_18
const callSummaries = await client.insights.v1.callSummaries.list({
_18
limit: 20,
_18
});
_18
_18
callSummaries.forEach((c) => console.log(c.accountSid));
_18
}
_18
_18
listCallSummaries();

Output

_12
{
_12
"meta": {
_12
"page": 0,
_12
"page_size": 25,
_12
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?PageSize=25&Page=0",
_12
"previous_page_url": null,
_12
"next_page_url": null,
_12
"key": "call_summaries",
_12
"url": "https://insights.twilio.com/v1/Voice/Summaries?PageSize=25&Page=0"
_12
},
_12
"call_summaries": []
_12
}

Read multiple Call Summaries from to/from specific carriers for a data range

read-multiple-call-summaries-from-tofrom-specific-carriers-for-a-data-range page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function listCallSummaries() {
_20
const callSummaries = await client.insights.v1.callSummaries.list({
_20
startTime: "4h",
_20
toCarrier: "AT&T Wireless",
_20
limit: 20,
_20
});
_20
_20
callSummaries.forEach((c) => console.log(c.accountSid));
_20
}
_20
_20
listCallSummaries();

Output

_190
{
_190
"meta": {
_190
"page": 0,
_190
"page_size": 25,
_190
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?ToCarrier=AT%26T+Wireless&AnsweredBy=machine_start&StartTime=4h&PageSize=25&Page=0",
_190
"previous_page_url": null,
_190
"next_page_url": null,
_190
"key": "call_summaries",
_190
"url": "https://insights.twilio.com/v1/Voice/Summaries?ToCarrier=AT%26T+Wireless&AnsweredBy=machine_start&StartTime=4h&PageSize=25&Page=0"
_190
},
_190
"call_summaries": [
_190
{
_190
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_190
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_190
"created_time": "2021-08-25T03:40:25Z",
_190
"start_time": "2021-08-25T03:40:25Z",
_190
"end_time": "2021-08-25T03:40:45Z",
_190
"duration": 20,
_190
"connect_duration": 20,
_190
"call_type": "carrier",
_190
"call_state": "completed",
_190
"answered_by": "machine_start",
_190
"from": {
_190
"caller": "+15555555555",
_190
"carrier": "T-Mobile USA, Inc.",
_190
"connection": "mobile",
_190
"number_prefix": "1555",
_190
"location": {
_190
"lat": 40.83885,
_190
"lon": -74.04568
_190
},
_190
"country_code": "US"
_190
},
_190
"to": {
_190
"callee": "+15555555556",
_190
"carrier": "AT&T Wireless",
_190
"connection": "mobile",
_190
"number_prefix": "1555",
_190
"location": {
_190
"lat": 33.42767,
_190
"lon": -86.886475
_190
},
_190
"country_code": "US"
_190
},
_190
"processing_state": "complete",
_190
"sdk_edge": null,
_190
"sip_edge": null,
_190
"client_edge": null,
_190
"carrier_edge": {
_190
"properties": {
_190
"media_region": "us1",
_190
"signaling_region": "us1",
_190
"edge_location": "xxxxx",
_190
"direction": "inbound"
_190
},
_190
"metrics": {
_190
"inbound": {
_190
"codec": 0,
_190
"codec_name": "pcmu",
_190
"packets_received": 202,
_190
"packets_lost": 0,
_190
"packets_loss_percentage": 0,
_190
"jitter": {
_190
"max": 1.48209,
_190
"avg": 0.483035
_190
}
_190
},
_190
"outbound": {
_190
"codec": 0,
_190
"codec_name": "pcmu",
_190
"packets_sent": 218,
_190
"packets_lost": 0,
_190
"packets_loss_percentage": 0,
_190
"jitter": {
_190
"max": 0.51868,
_190
"avg": 0.364434
_190
}
_190
}
_190
}
_190
},
_190
"tags": [
_190
"high_packet_loss",
_190
"high_jitter"
_190
],
_190
"attributes": {
_190
"conference_participant": false
_190
},
_190
"properties": {
_190
"last_sip_response_num": 200,
_190
"pdd_ms": 121,
_190
"disconnected_by": "callee",
_190
"direction": "inbound"
_190
},
_190
"trust": {
_190
"verified_caller": {
_190
"verified": true
_190
}
_190
},
_190
"annotation": null,
_190
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_190
},
_190
{
_190
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_190
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_190
"created_time": "2021-08-25T02:20:25Z",
_190
"start_time": "2021-08-25T02:20:25Z",
_190
"end_time": "2021-08-25T02:40:45Z",
_190
"duration": 18,
_190
"connect_duration": 18,
_190
"call_type": "carrier",
_190
"call_state": "completed",
_190
"answered_by": "machine_start",
_190
"from": {
_190
"caller": "+15555555555",
_190
"carrier": "T-Mobile USA, Inc.",
_190
"connection": "mobile",
_190
"number_prefix": "1555",
_190
"location": {
_190
"lat": 40.83885,
_190
"lon": -74.04568
_190
},
_190
"country_code": "US"
_190
},
_190
"to": {
_190
"callee": "+15555555556",
_190
"carrier": "AT&T Wireless",
_190
"connection": "mobile",
_190
"number_prefix": "1555",
_190
"location": {
_190
"lat": 33.42767,
_190
"lon": -86.886475
_190
},
_190
"country_code": "US"
_190
},
_190
"processing_state": "complete",
_190
"sdk_edge": null,
_190
"sip_edge": null,
_190
"client_edge": null,
_190
"carrier_edge": {
_190
"properties": {
_190
"media_region": "us1",
_190
"signaling_region": "us1",
_190
"edge_location": "xxxxx",
_190
"direction": "inbound"
_190
},
_190
"metrics": {
_190
"inbound": {
_190
"codec": 0,
_190
"codec_name": "pcmu",
_190
"packets_received": 100,
_190
"packets_lost": 0,
_190
"packets_loss_percentage": 0,
_190
"jitter": {
_190
"max": 1.48209,
_190
"avg": 0.483035
_190
}
_190
},
_190
"outbound": {
_190
"codec": 0,
_190
"codec_name": "pcmu",
_190
"packets_sent": 102,
_190
"packets_lost": 0,
_190
"packets_loss_percentage": 0,
_190
"jitter": {
_190
"max": 0.51868,
_190
"avg": 0.364434
_190
}
_190
}
_190
}
_190
},
_190
"tags": null,
_190
"attributes": {
_190
"conference_participant": false
_190
},
_190
"properties": {
_190
"last_sip_response_num": 200,
_190
"pdd_ms": 121,
_190
"disconnected_by": "callee",
_190
"direction": "inbound"
_190
},
_190
"trust": {
_190
"verified_caller": {
_190
"verified": true
_190
}
_190
},
_190
"annotation": null,
_190
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_190
}
_190
]
_190
}

Read multiple Call Summaries from a subaccount with detected issues

read-multiple-call-summaries-from-a-subaccount-with-detected-issues page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_22
// Download the helper library from https://www.twilio.com/docs/node/install
_22
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_22
_22
// Find your Account SID and Auth Token at twilio.com/console
_22
// and set the environment variables. See http://twil.io/secure
_22
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_22
const authToken = process.env.TWILIO_AUTH_TOKEN;
_22
const client = twilio(accountSid, authToken);
_22
_22
async function listCallSummaries() {
_22
const callSummaries = await client.insights.v1.callSummaries.list({
_22
callType: "client",
_22
hasTag: true,
_22
startTime: "7d",
_22
subaccount: "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_22
limit: 20,
_22
});
_22
_22
callSummaries.forEach((c) => console.log(c.accountSid));
_22
}
_22
_22
listCallSummaries();

Output

_164
{
_164
"meta": {
_164
"page": 0,
_164
"page_size": 25,
_164
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?CallType=client&StartTime=7d&HasTag=True&Subaccount=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab&PageSize=25&Page=0",
_164
"previous_page_url": null,
_164
"next_page_url": null,
_164
"key": "call_summaries",
_164
"url": "https://insights.twilio.com/v1/Voice/Summaries?CallType=client&StartTime=7d&HasTag=True&Subaccount=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab&PageSize=25&Page=0"
_164
},
_164
"call_summaries": [
_164
{
_164
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_164
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_164
"created_time": "2021-08-25T04:16:35Z",
_164
"start_time": "2021-08-25T04:16:36Z",
_164
"end_time": "2021-08-25T04:16:42Z",
_164
"duration": 7,
_164
"connect_duration": 6,
_164
"call_type": "client",
_164
"call_state": "completed",
_164
"answered_by": "machine_start",
_164
"from": {
_164
"caller": "client:+15555555555",
_164
"connection": "twilio_sdk"
_164
},
_164
"to": {
_164
"callee": "client:TBBXXXXXXXXXXXX",
_164
"connection": "twilio_sdk"
_164
},
_164
"processing_state": "complete",
_164
"sdk_edge": null,
_164
"sip_edge": null,
_164
"client_edge": {
_164
"properties": {
_164
"media_region": "us1",
_164
"signaling_region": "us1",
_164
"twilio_media_ip": "54.xxx.xx.xxx",
_164
"external_media_ip": "54.xxx.xx.xxx",
_164
"edge_location": "xxxxxx",
_164
"direction": "inbound"
_164
},
_164
"metrics": {
_164
"inbound": {
_164
"codec": 0,
_164
"codec_name": "pcmu",
_164
"packets_received": 252,
_164
"packets_lost": 0,
_164
"packets_loss_percentage": 0,
_164
"jitter": {
_164
"max": 5.60994,
_164
"avg": 0.933334
_164
}
_164
},
_164
"outbound": {
_164
"codec": 0,
_164
"codec_name": "pcmu",
_164
"packets_sent": 229,
_164
"packets_lost": 0,
_164
"packets_loss_percentage": 0,
_164
"jitter": {
_164
"max": 0.960786,
_164
"avg": 0.399859
_164
}
_164
}
_164
}
_164
},
_164
"carrier_edge": null,
_164
"tags": [
_164
"high_pdd"
_164
],
_164
"attributes": {
_164
"conference_participant": false
_164
},
_164
"properties": {
_164
"last_sip_response_num": 200,
_164
"pdd_ms": 58,
_164
"disconnected_by": "callee",
_164
"direction": "inbound"
_164
},
_164
"trust": null,
_164
"annotation": null,
_164
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_164
},
_164
{
_164
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_164
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_164
"created_time": "2021-08-25T04:16:35Z",
_164
"start_time": "2021-08-25T04:16:37Z",
_164
"end_time": "2021-08-25T04:16:40Z",
_164
"duration": 5,
_164
"connect_duration": 3,
_164
"call_type": "client",
_164
"call_state": "completed",
_164
"answered_by": "machine_start",
_164
"from": {
_164
"caller": "+15555555555",
_164
"carrier": "Verizon",
_164
"connection": "landline",
_164
"number_prefix": "1555",
_164
"location": {
_164
"lat": 40.83885,
_164
"lon": -74.04568
_164
},
_164
"country_code": "US"
_164
},
_164
"to": {
_164
"callee": "client:TBBTXXXXXX",
_164
"connection": "twilio_sdk"
_164
},
_164
"processing_state": "complete",
_164
"sdk_edge": null,
_164
"sip_edge": null,
_164
"client_edge": {
_164
"properties": {
_164
"media_region": "us1",
_164
"signaling_region": "us1",
_164
"twilio_media_ip": "54.xxx.xx.xxx",
_164
"external_media_ip": "54.xxx.xx.xxx",
_164
"edge_location": "xxxxx",
_164
"direction": "outbound"
_164
},
_164
"metrics": {
_164
"inbound": {
_164
"codec": 0,
_164
"codec_name": "pcmu",
_164
"packets_received": 110,
_164
"packets_lost": 0,
_164
"packets_loss_percentage": 0,
_164
"jitter": {
_164
"max": 1.05918,
_164
"avg": 0.461966
_164
}
_164
},
_164
"outbound": {
_164
"codec": 0,
_164
"codec_name": "pcmu",
_164
"packets_sent": 147,
_164
"packets_lost": 0,
_164
"packets_loss_percentage": 0,
_164
"jitter": {
_164
"max": 0.869174,
_164
"avg": 0.319674
_164
}
_164
}
_164
}
_164
},
_164
"carrier_edge": null,
_164
"tags": null,
_164
"attributes": {
_164
"conference_participant": false
_164
},
_164
"properties": {
_164
"last_sip_response_num": 200,
_164
"pdd_ms": 35,
_164
"disconnected_by": "callee",
_164
"direction": "outbound_api"
_164
},
_164
"trust": null,
_164
"annotation": null,
_164
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_164
}
_164
]
_164
}

Read multiple Call Summaries for outbound calls signed with SHAKEN/STIR

read-multiple-call-summaries-for-outbound-calls-signed-with-shakenstir page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function listCallSummaries() {
_21
const callSummaries = await client.insights.v1.callSummaries.list({
_21
direction: "outbound_api,outbound_dial,trunking_terminating",
_21
startTime: "1d",
_21
verifiedCaller: true,
_21
limit: 20,
_21
});
_21
_21
callSummaries.forEach((c) => console.log(c.accountSid));
_21
}
_21
_21
listCallSummaries();

Output

_260
{
_260
"meta": {
_260
"page": 0,
_260
"page_size": 25,
_260
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?Direction=outbound_api%2Coutbound_dial%2Ctrunking_terminating&StartTime=1d&VerifiedCaller=True&PageSize=25&Page=0",
_260
"previous_page_url": null,
_260
"next_page_url": null,
_260
"key": "call_summaries",
_260
"url": "https://insights.twilio.com/v1/Voice/Summaries?Direction=outbound_api%2Coutbound_dial%2Ctrunking_terminating&StartTime=1d&VerifiedCaller=True&PageSize=25&Page=0"
_260
},
_260
"call_summaries": [
_260
{
_260
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_260
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_260
"created_time": "2021-08-25T14:31:18Z",
_260
"start_time": "2021-08-25T14:31:22Z",
_260
"end_time": "2021-08-25T14:32:02Z",
_260
"duration": 44,
_260
"connect_duration": 41,
_260
"call_type": "trunking",
_260
"call_state": "completed",
_260
"answered_by": "machine_start",
_260
"from": {
_260
"caller": "+15555555555",
_260
"carrier": "ACS",
_260
"connection": "landline",
_260
"number_prefix": "1555",
_260
"location": {
_260
"lat": 60.268353,
_260
"lon": -141.13632
_260
},
_260
"country_code": "US"
_260
},
_260
"to": {
_260
"callee": "+15555555556",
_260
"carrier": "Hawaiian Telcom, Inc. - HI",
_260
"connection": "landline",
_260
"number_prefix": "1555",
_260
"location": {
_260
"lat": 20.956036,
_260
"lon": -157.23793
_260
},
_260
"country_code": "US"
_260
},
_260
"processing_state": "complete",
_260
"sdk_edge": null,
_260
"sip_edge": {
_260
"properties": {
_260
"media_region": "us1",
_260
"signaling_region": "us1",
_260
"twilio_media_ip": "54.xxx.xx.xx",
_260
"twilio_signaling_ip": "54.xxx.xx.xx",
_260
"external_signaling_ip": "54.xxx.xx.xx",
_260
"sip_call_id": "xxxxx@0.0.0.0",
_260
"user_agent": "xxxx",
_260
"edge_location": "xxxxx",
_260
"trunk_sid": "xxxxxxx",
_260
"direction": "inbound"
_260
},
_260
"metrics": {
_260
"outbound": {
_260
"codec": 0,
_260
"codec_name": "pcmu",
_260
"packets_sent": 1953,
_260
"packets_lost": 0,
_260
"packets_loss_percentage": 0,
_260
"jitter": {
_260
"max": 1.76407,
_260
"avg": 0.23138
_260
},
_260
"latency": {
_260
"max": 0.386,
_260
"avg": 0.3765
_260
}
_260
}
_260
}
_260
},
_260
"client_edge": null,
_260
"carrier_edge": {
_260
"properties": {
_260
"media_region": "us1",
_260
"signaling_region": "us1",
_260
"edge_location": "xxxx",
_260
"direction": "outbound"
_260
}
_260
},
_260
"tags": [
_260
"silence"
_260
],
_260
"attributes": {
_260
"conference_participant": false
_260
},
_260
"properties": {
_260
"last_sip_response_num": 200,
_260
"pdd_ms": 1990,
_260
"disconnected_by": "caller",
_260
"direction": "trunking_terminating"
_260
},
_260
"trust": {
_260
"verified_caller": {
_260
"verified": true
_260
}
_260
},
_260
"annotation": null,
_260
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_260
},
_260
{
_260
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_260
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_260
"created_time": "2021-08-25T14:03:31Z",
_260
"start_time": "2021-08-25T14:03:32Z",
_260
"end_time": "2021-08-25T14:03:38Z",
_260
"duration": 7,
_260
"connect_duration": 6,
_260
"call_type": "carrier",
_260
"call_state": "completed",
_260
"answered_by": "machine_start",
_260
"from": {
_260
"caller": "+15555555555",
_260
"carrier": "T-Mobile USA, Inc.",
_260
"connection": "mobile",
_260
"number_prefix": "1555",
_260
"location": {
_260
"lat": 40.83885,
_260
"lon": -74.04568
_260
},
_260
"country_code": "US"
_260
},
_260
"to": {
_260
"callee": "+15555555556",
_260
"carrier": "T-Mobile USA, Inc.",
_260
"connection": "mobile",
_260
"number_prefix": "1555",
_260
"location": {
_260
"lat": 34.186115,
_260
"lon": -118.43555
_260
},
_260
"country_code": "US"
_260
},
_260
"processing_state": "complete",
_260
"sdk_edge": null,
_260
"sip_edge": null,
_260
"client_edge": null,
_260
"carrier_edge": {
_260
"properties": {
_260
"media_region": "us1",
_260
"signaling_region": "us1",
_260
"edge_location": "xxxx",
_260
"direction": "outbound"
_260
},
_260
"metrics": {
_260
"inbound": {
_260
"codec": 0,
_260
"codec_name": "pcmu",
_260
"packets_received": 229,
_260
"packets_lost": 0,
_260
"packets_loss_percentage": 0,
_260
"jitter": {
_260
"max": 1.10303,
_260
"avg": 0.449886
_260
}
_260
},
_260
"outbound": {
_260
"codec": 0,
_260
"codec_name": "pcmu",
_260
"packets_sent": 273,
_260
"packets_lost": 0,
_260
"packets_loss_percentage": 0,
_260
"jitter": {
_260
"max": 0.410031,
_260
"avg": 0.295951
_260
}
_260
}
_260
}
_260
},
_260
"tags": null,
_260
"attributes": {
_260
"conference_participant": false
_260
},
_260
"properties": {
_260
"last_sip_response_num": 200,
_260
"pdd_ms": 315,
_260
"disconnected_by": "callee",
_260
"direction": "outbound_api"
_260
},
_260
"trust": {
_260
"verified_caller": {
_260
"verified": true
_260
}
_260
},
_260
"annotation": null,
_260
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_260
},
_260
{
_260
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_260
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_260
"created_time": "2021-08-24T22:28:17Z",
_260
"start_time": "2021-08-24T22:28:20Z",
_260
"end_time": "2021-08-24T22:28:23Z",
_260
"duration": 4,
_260
"connect_duration": 3,
_260
"call_type": "carrier",
_260
"call_state": "completed",
_260
"answered_by": "machine_start",
_260
"from": {
_260
"caller": "+15555555555",
_260
"carrier": "Hawaiian Telcom, Inc. - HI",
_260
"connection": "landline",
_260
"number_prefix": "1555",
_260
"location": {
_260
"lat": 20.956036,
_260
"lon": -157.23793
_260
},
_260
"country_code": "US"
_260
},
_260
"to": {
_260
"callee": "+15555555556",
_260
"connection": "pstn"
_260
},
_260
"processing_state": "complete",
_260
"sdk_edge": null,
_260
"sip_edge": null,
_260
"client_edge": null,
_260
"carrier_edge": {
_260
"properties": {
_260
"media_region": "us1",
_260
"signaling_region": "us1",
_260
"edge_location": "xxxx",
_260
"direction": "outbound"
_260
},
_260
"metrics": {
_260
"outbound": {
_260
"codec": 0,
_260
"codec_name": "pcmu",
_260
"packets_sent": 103,
_260
"packets_lost": 0,
_260
"packets_loss_percentage": 0,
_260
"jitter": {
_260
"max": 0.596712,
_260
"avg": 0.251725
_260
}
_260
}
_260
}
_260
},
_260
"tags": [
_260
"silence"
_260
],
_260
"attributes": null,
_260
"properties": {
_260
"last_sip_response_num": 200,
_260
"pdd_ms": 105,
_260
"disconnected_by": "caller",
_260
"direction": "outbound_dial"
_260
},
_260
"trust": null,
_260
"annotation": null,
_260
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_260
}
_260
]
_260
}

Read multiple Call Summaries for SIP calls which did not end in 200 OK

read-multiple-call-summaries-for-sip-calls-which-did-not-end-in-200-ok page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_22
// Download the helper library from https://www.twilio.com/docs/node/install
_22
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_22
_22
// Find your Account SID and Auth Token at twilio.com/console
_22
// and set the environment variables. See http://twil.io/secure
_22
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_22
const authToken = process.env.TWILIO_AUTH_TOKEN;
_22
const client = twilio(accountSid, authToken);
_22
_22
async function listCallSummaries() {
_22
const callSummaries = await client.insights.v1.callSummaries.list({
_22
abnormalSession: true,
_22
callState: "completed",
_22
callType: "sip,trunking",
_22
startTime: "15d",
_22
limit: 20,
_22
});
_22
_22
callSummaries.forEach((c) => console.log(c.accountSid));
_22
}
_22
_22
listCallSummaries();

Output

_189
{
_189
"meta": {
_189
"page": 0,
_189
"page_size": 25,
_189
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?CallType=sip%2Ctrunking&CallState=completed&StartTime=15d&AbnormalSession=True&PageSize=25&Page=0",
_189
"previous_page_url": null,
_189
"next_page_url": null,
_189
"key": "call_summaries",
_189
"url": "https://insights.twilio.com/v1/Voice/Summaries?CallType=sip%2Ctrunking&CallState=completed&StartTime=15d&AbnormalSession=True&PageSize=25&Page=0"
_189
},
_189
"call_summaries": [
_189
{
_189
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_189
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_189
"created_time": "2021-08-25T14:46:40Z",
_189
"start_time": "2021-08-25T14:46:40Z",
_189
"end_time": "2021-08-25T14:46:52Z",
_189
"duration": 12,
_189
"connect_duration": 12,
_189
"call_type": "sip",
_189
"call_state": "completed",
_189
"answered_by": "machine_start",
_189
"from": {
_189
"caller": "+15555555555",
_189
"carrier": "XO Communications, Inc.",
_189
"connection": "landline",
_189
"number_prefix": "1555",
_189
"location": {
_189
"lat": 40.83885,
_189
"lon": -74.04568
_189
},
_189
"country_code": "US"
_189
},
_189
"to": {
_189
"callee": "sip:xxxx@xx.xxx.xx.xxx",
_189
"connection": "sip_interface"
_189
},
_189
"processing_state": "complete",
_189
"sdk_edge": null,
_189
"sip_edge": {
_189
"properties": {
_189
"media_region": "us1",
_189
"signaling_region": "us1",
_189
"twilio_media_ip": "xx.xxx.xx.xxx",
_189
"twilio_signaling_ip": "xx.xx.xx.xx",
_189
"external_media_ip": "xx.xxx.xx.xxx",
_189
"external_signaling_ip": "xx.xxx.xx.xxx",
_189
"sip_call_id": "xxxxxxxx@0.0.0.0",
_189
"edge_location": "xxxxx",
_189
"direction": "outbound"
_189
},
_189
"metrics": {
_189
"inbound": {
_189
"codec": 0,
_189
"codec_name": "pcmu",
_189
"packets_received": 525,
_189
"packets_lost": 0,
_189
"packets_loss_percentage": 0,
_189
"jitter": {
_189
"max": 0.554729,
_189
"avg": 0.229541
_189
}
_189
},
_189
"outbound": {
_189
"codec": 0,
_189
"codec_name": "pcmu",
_189
"packets_sent": 245,
_189
"packets_lost": 0,
_189
"packets_loss_percentage": 0,
_189
"jitter": {
_189
"max": 1.03548,
_189
"avg": 0.344092
_189
}
_189
}
_189
}
_189
},
_189
"client_edge": null,
_189
"carrier_edge": null,
_189
"tags": null,
_189
"attributes": {
_189
"conference_participant": false
_189
},
_189
"properties": {
_189
"last_sip_response_num": 200,
_189
"pdd_ms": 255,
_189
"disconnected_by": "callee",
_189
"direction": "outbound_dial"
_189
},
_189
"trust": null,
_189
"annotation": null,
_189
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_189
},
_189
{
_189
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_189
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_189
"created_time": "2021-08-25T14:31:18Z",
_189
"start_time": "2021-08-25T14:31:22Z",
_189
"end_time": "2021-08-25T14:32:02Z",
_189
"duration": 44,
_189
"connect_duration": 41,
_189
"call_type": "trunking",
_189
"call_state": "completed",
_189
"answered_by": "machine_start",
_189
"from": {
_189
"caller": "+15555555555",
_189
"carrier": "ACS",
_189
"connection": "landline",
_189
"number_prefix": "1555",
_189
"location": {
_189
"lat": 60.268353,
_189
"lon": -141.13632
_189
},
_189
"country_code": "US"
_189
},
_189
"to": {
_189
"callee": "+15555555556",
_189
"carrier": "Hawaiian Telcom, Inc. - HI",
_189
"connection": "landline",
_189
"number_prefix": "1555",
_189
"location": {
_189
"lat": 20.956036,
_189
"lon": -157.23793
_189
},
_189
"country_code": "US"
_189
},
_189
"processing_state": "complete",
_189
"sdk_edge": null,
_189
"sip_edge": {
_189
"properties": {
_189
"media_region": "us1",
_189
"signaling_region": "us1",
_189
"twilio_media_ip": "54.xxx.xx.xx",
_189
"twilio_signaling_ip": "54.xxx.xx.xx",
_189
"external_signaling_ip": "54.xxx.xx.xx",
_189
"sip_call_id": "xxxxx@0.0.0.0",
_189
"user_agent": "xxxx",
_189
"edge_location": "xxxxx",
_189
"trunk_sid": "xxxxxxx",
_189
"direction": "inbound"
_189
},
_189
"metrics": {
_189
"outbound": {
_189
"codec": 0,
_189
"codec_name": "pcmu",
_189
"packets_sent": 1953,
_189
"packets_lost": 0,
_189
"packets_loss_percentage": 0,
_189
"jitter": {
_189
"max": 1.76407,
_189
"avg": 0.23138
_189
},
_189
"latency": {
_189
"max": 0.386,
_189
"avg": 0.3765
_189
}
_189
}
_189
}
_189
},
_189
"client_edge": null,
_189
"carrier_edge": {
_189
"properties": {
_189
"media_region": "us1",
_189
"signaling_region": "us1",
_189
"edge_location": "xxxx",
_189
"direction": "outbound"
_189
}
_189
},
_189
"tags": [
_189
"silence"
_189
],
_189
"attributes": {
_189
"conference_participant": false
_189
},
_189
"properties": {
_189
"last_sip_response_num": 200,
_189
"pdd_ms": 1990,
_189
"disconnected_by": "caller",
_189
"direction": "trunking_terminating"
_189
},
_189
"trust": {
_189
"verified_caller": {
_189
"verified": true
_189
}
_189
},
_189
"annotation": null,
_189
"url": "https://insights.twilio.com/v1/Voice/Summaries"
_189
}
_189
]
_189
}

Read multiple Call Summaries with annotations

read-multiple-call-summaries-with-annotations page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_24
// Download the helper library from https://www.twilio.com/docs/node/install
_24
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_24
_24
// Find your Account SID and Auth Token at twilio.com/console
_24
// and set the environment variables. See http://twil.io/secure
_24
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_24
const authToken = process.env.TWILIO_AUTH_TOKEN;
_24
const client = twilio(accountSid, authToken);
_24
_24
async function listCallSummaries() {
_24
const callSummaries = await client.insights.v1.callSummaries.list({
_24
answeredBy: "human",
_24
callScoreAnnotation: "1",
_24
connectivityIssueAnnotation: "no_connectivity_issue",
_24
qualityIssueAnnotation: "latency",
_24
spamAnnotation: false,
_24
startTime: "15d",
_24
limit: 20,
_24
});
_24
_24
callSummaries.forEach((c) => console.log(c.accountSid));
_24
}
_24
_24
listCallSummaries();

Output

_12
{
_12
"meta": {
_12
"page": 0,
_12
"page_size": 25,
_12
"first_page_url": "https://insights.twilio.com/v1/Voice/Summaries?PageSize=25&Page=0",
_12
"previous_page_url": null,
_12
"next_page_url": null,
_12
"key": "call_summaries",
_12
"url": "https://insights.twilio.com/v1/Voice/Summaries?PageSize=25&Page=0"
_12
},
_12
"call_summaries": []
_12
}


Rate this page: