Get a list of Call Metrics for a Call.

GET /v1/Voice/{CallSid}/Metrics

Get a list of Call Metrics for a Call.

Path parameters

  • CallSid string Required

    The unique SID identifier of the Call.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

Query parameters

  • Edge string | null

    The Edge of this Metric. One of unknown_edge, carrier_edge, sip_edge, sdk_edge or client_edge.

    Values are unknown_edge, carrier_edge, sip_edge, sdk_edge, or client_edge.

  • Direction string | null

    The Direction of this Metric. One of unknown, inbound, outbound or both.

    Values are unknown, inbound, outbound, or both.

  • PageSize integer(int64)

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

    Minimum value is 1, maximum value is 1000.

  • Page integer

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

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • metrics array[object]
      Hide metrics attributes Show metrics attributes object
      • timestamp string | null

        Timestamp of metric sample. Samples are taken every 10 seconds and contain the metrics for the previous 10 seconds.

      • call_sid string | null

        The unique SID identifier of the Call.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

      • account_sid string | null

        The unique SID identifier of the Account.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • edge string | null

        The Twilio media edge this Metric was captured on. One of unknown_edge, carrier_edge, sip_edge, sdk_edge or client_edge.

        Values are unknown_edge, carrier_edge, sip_edge, sdk_edge, or client_edge.

      • direction string | null

        The Direction of the media stream from the perspective of the Twilio media edge. One of unknown, inbound, outbound or both.

        Values are unknown, inbound, outbound, or both.

      • carrier_edge object | null

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

      • sip_edge object | null

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

      • sdk_edge object | null

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

      • client_edge object | null

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

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Voice/{CallSid}/Metrics
curl \
 --request GET 'https://insights.twilio.com/v1/Voice/{CallSid}/Metrics' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "metrics",
    "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "metrics": [
    {
      "edge": "sdk_edge",
      "call_sid": "CA7569efe0253644fa4a88aa97beca3310",
      "sdk_edge": {
        "interval": {
          "mos": {
            "value": 4.39
          },
          "rtt": {
            "value": 81
          },
          "jitter": {
            "value": 9
          },
          "audio_in": {
            "value": 81
          },
          "audio_out": {
            "value": 5237
          },
          "packets_lost": 0,
          "packets_received": 50
        },
        "cumulative": {
          "bytes_sent": 329425,
          "packets_lost": 0,
          "packets_sent": 3934,
          "bytes_received": 547788,
          "packets_received": 3900
        }
      },
      "sip_edge": null,
      "direction": "both",
      "timestamp": "2019-10-07T22:32:06Z",
      "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
      "client_edge": null,
      "carrier_edge": null
    }
  ]
}
{
  "meta": {
    "key": "metrics",
    "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=10",
    "page": 10,
    "page_size": 5,
    "next_page_url": null,
    "first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=0",
    "previous_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Metrics?Direction=both&Edge=sdk_edge&PageSize=5&Page=9&PageToken=PT10"
  },
  "metrics": [
    {
      "edge": "sdk_edge",
      "call_sid": "CA7569efe0253644fa4a88aa97beca3310",
      "sdk_edge": {
        "interval": {
          "mos": {
            "value": 4.39
          },
          "rtt": {
            "value": 81
          },
          "jitter": {
            "value": 9
          },
          "audio_in": {
            "value": 81
          },
          "audio_out": {
            "value": 5237
          },
          "packets_lost": 0,
          "packets_received": 50
        },
        "cumulative": {
          "bytes_sent": 329425,
          "packets_lost": 0,
          "packets_sent": 3934,
          "bytes_received": 547788,
          "packets_received": 3900
        }
      },
      "sip_edge": null,
      "direction": "both",
      "timestamp": "2019-10-07T22:32:06Z",
      "account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
      "client_edge": null,
      "carrier_edge": null
    }
  ]
}