> For the complete documentation index, see [llms.txt](https://docs.bird.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bird.com/api/voice-api/voice-calls-api/get-a-call-insights.md).

# 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","scheme":"AccessKey","type":"http"}},"schemas":{"CallInsights":{"type":"object","title":"ChannelCall","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"channelId":{"type":"string","format":"uuid"},"from":{"type":"string"},"to":{"type":"string"},"parentId":{"type":"string","format":"uuid"},"direction":{"$ref":"#/components/schemas/Direction"},"status":{"$ref":"#/components/schemas/channels.call_status"},"type":{"$ref":"#/components/schemas/CallType"},"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"]},"Direction":{"type":"string","enum":["incoming","outgoing"]},"channels.call_status":{"enum":["accepted","starting","ringing","ongoing","completed","busy","no-answer","failed","cancelled","scheduled"],"type":"string"},"CallType":{"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"}}},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}},"responses":{"requestError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error"}}},"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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bird.com/api/voice-api/voice-calls-api/get-a-call-insights.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
