Call Metrics Resource
Get Call Metrics
The call metrics resource provides an overview of metadata and quality metrics for a provided call. Metrics are typically available via API within 90 seconds.
GET https://insights.twilio.com/v1/Voice/{CALL_SID}/Metrics
Request Parameters
Parameter | options |
---|---|
Edge | carrier_edge, client_edge, sdk_edge, sip_edge |
PageSize | Default 50 |
Direction | both, inbound, outbound. Note: metrics from sdk_edge will always be both |
If no Edge parameter is provided, the results 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 |
See Understanding Twilio Media Edges for more information.
Resource Properties
A call metric sample is represented by the following properties:
Property | Description |
---|---|
account_sid | The account SID this call belongs to |
call_sid | SID for the call |
carrier_edge | Contains metrics and properties for the Twilio media gateway of a PSTN call |
client_edge | Contains metrics and properties for the Twilio media gateway of a Client call |
direction | Defines media stream direction from the perspective of the Twilio Media edge. Inbound or outbound |
edge | Represents the Twilio Media Edge the metric was captured on |
sdk_edge | Contains metrics and properties for the SDK sensor library for Client calls |
sip_edge | Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call |
timestamp | Timestamp of metric sample. Samples are taken every 10 seconds and contain the metrics for the previous 10 seconds. |
Edge metrics and properties
Metric samples from these edges will 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 edges: packets received, packets lost, and packet loss percentage. |
metadata | Twilio media region of the selected edge, Twilio and endpoint IP media IP addresses |
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.