A Call Metric is an object representing
related to the quality of a voice call.
Using the Call Metrics Resource, you can read a list of Call Metrics for a specified voice call.
Voice Insights Advanced Features must be active to use this API Resource.
Metrics are typically available via the API within 90 seconds of call completion.
The following table details the properties of a single Call Metric sample instance.
timestamp
type: stringTimestamp of metric sample. Samples are taken every 10 seconds and contain the metrics for the previous 10 seconds.
call_sid
type: SID<CA>The unique SID identifier of the Call.
^CA[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The unique SID identifier of the Account.
^AC[0-9a-fA-F]{32}$
34
34
edge
type: enum<string>The Twilio media edge this Metric was captured on. One of unknown_edge
, carrier_edge
, sip_edge
, sdk_edge
or client_edge
.
unknown_edge
carrier_edge
sip_edge
sdk_edge
client_edge
direction
type: enum<string>The Direction of the media stream from the perspective of the Twilio media edge. One of unknown
, inbound
, outbound
or both
.
unknown
inbound
outbound
both
carrier_edge
type: objectContains metrics and properties for the Twilio media gateway of a PSTN call.
sip_edge
type: objectContains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
sdk_edge
type: objectContains metrics and properties for the SDK sensor library for Client calls.
client_edge
type: objectContains metrics and properties for the Twilio media gateway of a Client call.
Metric samples from these edges contain the following properties:
Property | Description |
---|---|
codec | RTP profile number of the detected codec |
codec_name | Name of the detected codec |
cumulative | Cumulative jitter (max/avg), packets lost, and packet count for the stream received at this edge |
interval | sdk_edge : audio in/out, jitter, packet loss, rtt, and packet loss percentage for the sampling interval. _All other edge_s: packets received, packets lost, and packet loss percentage. |
metadata | Twilio media region of the selected edge, Twilio and endpoint IP media IP addresses |
GET https://insights.twilio.com/v1/Voice/{CallSid}/Metrics
Use this action to retrieve a list of Call Metrics 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 |
CallSid
type: SID<CA>The unique SID identifier of the Call.
^CA[0-9a-fA-F]{32}$
34
34
Edge
type: enum<string>The Edge of this Metric. One of unknown_edge
, carrier_edge
, sip_edge
, sdk_edge
or client_edge
.
unknown_edge
carrier_edge
sip_edge
sdk_edge
client_edge
Direction
type: enum<string>The Direction of this Metric. One of unknown
, inbound
, outbound
or both
.
unknown
inbound
outbound
both
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0