# Get a call insights

Use this endpoint to to retrieve media and signalling insights of a voice call.

## Get channel call insights

> Get a channel call insights

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"CallInsights":{"type":"object","title":"ChannelCall","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"from":{"type":"string"},"to":{"type":"string"},"parentId":{"$ref":"#/components/schemas/Id-2"},"direction":{"$ref":"#/components/schemas/Direction"},"status":{"$ref":"#/components/schemas/Status-4"},"type":{"$ref":"#/components/schemas/Type-2"},"duration":{"type":"integer"},"hangupCauseCode":{"type":"integer"},"hangupSource":{"$ref":"#/components/schemas/HangupSource"},"hangupSipCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ringingAt":{"type":"string","format":"date-time"},"answeredAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"signallingMetrics":{"$ref":"#/components/schemas/CallSignallingMetrics"},"mediaMetrics":{"$ref":"#/components/schemas/CallMediaMetrics"}},"required":["id","channelId","from","to","status","type","direction","createdAt","updatedAt"]},"Id-2":{"type":"string","format":"uuid"},"ChannelId":{"type":"string","format":"uuid"},"Direction":{"type":"string","enum":["incoming","outgoing"]},"Status-4":{"type":"string","enum":["accepted","starting","ringing","ongoing","completed","no-answer","busy","failed","cancelled","scheduled"]},"Type-2":{"type":"string","enum":["pstn","sip","webrtc"]},"HangupSource":{"type":"string","nullable":true,"enum":["callee","caller","api","timeout","media-timeout","none"]},"CallSignallingMetrics":{"type":"object","title":"signallingInsights","additionalProperties":false,"properties":{"pdd":{"type":"number"},"edgeRegion":{"type":"string"},"providerName":{"type":"string"},"userAgent":{"type":"string"},"remoteSignallingIp":{"type":"string"},"remoteMediaIp":{"type":"string"}}},"CallMediaMetrics":{"type":"object","title":"qualityInsights","additionalProperties":false,"properties":{"mos":{"type":"number"},"qualityScore":{"type":"number"},"inBytes":{"type":"number"},"outBytes":{"type":"number"},"inPacketCount":{"type":"number"},"outPacketCount":{"type":"number"},"inMediaPacketCount":{"type":"number"},"outMediaPacketCount":{"type":"number"},"inDtmfPacketCount":{"type":"number"},"outDtmfPacketCount":{"type":"number"},"jitterMinVar":{"type":"number"},"jitterMaxVar":{"type":"number"},"jitterLossRate":{"type":"number"},"jitterBurstRate":{"type":"number"},"meanInterval":{"type":"number"},"flawTotal":{"type":"number"},"readCodecName":{"type":"string"},"readCodecRate":{"type":"string"},"writeCodecName":{"type":"string"},"writeCodecRate":{"type":"string"},"dtmfType":{"type":"string"}}},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/insights":{"get":{"summary":"Get channel call insights","operationId":"getChannelCallInsights","description":"Get a channel call insights","tags":["channel_call"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsights"}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```

### Example 1: Get insights from an outbound call

{% tabs %}
{% tab title="Request Headers" %}

```
curl "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/insights" \
     -H "Authorization: AccessKey YOUR_SECRET_TOKEN"
```

{% endtab %}

{% tab title="Request Body" %}

```
// N/A
```

{% endtab %}

{% tab title="Response" %}

```
{
  "id": "382ef429-78ba-416d-899e-657d39d194ea",
  "channelId": "880d8171-cbab-47bb-81b6-b1a0902da136",
  "from": "3197004499436",
  "to": "351919150029",
  "direction": "outgoing",
  "status": "completed",
  "type": "pstn",
  "duration": 30,
  "hangupCauseCode": 16,
  "hangupSource": "caller",
  "hangupSipCode": "200",
  "signallingMetrics": {
    "pdd": 0.36154374
  },
  "mediaMetrics": {
    "mos": 4.5,
    "qualityScore": 100,
    "inBytes": 918,
    "outBytes": 1462,
    "inPacketCount": 918,
    "outPacketCount": 1462,
    "inMediaPacketCount": 904,
    "outMediaPacketCount": 0,
    "inDtmfPacketCount": 0,
    "outDtmfPacketCount": 0,
    "jitterMinVar": 126.08,
    "jitterMaxVar": 1187.95,
    "jitterLossRate": 0,
    "jitterBurstRate": 0,
    "meanInterval": 20.89,
    "flawTotal": 0,
    "readCodecName": "PCMU",
    "readCodecRate": "8000",
    "writeCodecName": "PCMU",
    "writeCodecRate": "8000",
    "dtmfType": "info"
  },
  "createdAt": "2023-10-25T17:01:14.645Z",
  "updatedAt": "2023-10-25T17:01:45.655Z",
  "ringingAt": "2023-10-25T17:01:15.006Z",
  "answeredAt": "2023-10-25T17:01:16.038Z",
  "endedAt": "2023-10-25T17:01:45.478Z"
}
```

{% endtab %}
{% endtabs %}
