Get a call insights

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

Command get a call insights

type: object
title: ChannelCall
additionalProperties: false
properties:
  id:
    $ref: './properties/Id.yml'
  channelId:
    $ref: '../messages/properties/ChannelId.yml'
  from:
    type: string
  to:
    type: string
  parentId:
    $ref: './properties/Id.yml'
  direction:
    $ref: './properties/Direction.yml'
  status:
    $ref: './properties/Status.yml'
  type:
    $ref: './properties/Type.yml'
  duration:
    type: integer
  hangupCauseCode:
    type: integer
  hangupSource:
    $ref: './properties/HangupSource.yml'
  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: './properties/CallSignallingMetrics.yml'
  mediaMetrics:
    $ref: './properties/CallMediaMetrics.yml'
required:
  - id
  - channelId
  - from
  - to
  - status
  - type
  - direction
  - createdAt
  - updatedAt

Get channel call insights

Get a channel call insights

GET/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/insights
Authorization
Path parameters
workspaceId*string (uuid)

The ID of the workspace

callId*string (uuid)

The ID for a call

channelId*string (uuid)

The ID for a channel

Response

OK

Body
id*Id-2 (string (uuid))
channelId*ChannelId (string (uuid))
from*string
to*string
parentIdId-2 (string (uuid))
direction*Direction (enum)
incomingoutgoing
status*Status-4 (enum)
acceptedstartingringingongoingcompletedno-answerbusyfailedcancelledscheduled
type*Type-2 (enum)
pstnsipwebrtc
durationinteger
hangupCauseCodeinteger
hangupSourcenullable HangupSource (enum)
calleecallerapitimeoutmedia-timeoutnone
hangupSipCodestring
createdAt*string (date-time)
updatedAt*string (date-time)
ringingAtstring (date-time)
answeredAtstring (date-time)
endedAtstring (date-time)
signallingMetricssignallingInsights
mediaMetricsqualityInsights
Request
const response = await fetch('/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/insights', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "from": "text",
  "to": "text",
  "parentId": "123e4567-e89b-12d3-a456-426614174000",
  "direction": "incoming",
  "status": "accepted",
  "type": "pstn",
  "hangupSource": "callee",
  "hangupSipCode": "text",
  "createdAt": "2024-11-21T08:56:49.748Z",
  "updatedAt": "2024-11-21T08:56:49.748Z",
  "ringingAt": "2024-11-21T08:56:49.748Z",
  "answeredAt": "2024-11-21T08:56:49.748Z",
  "endedAt": "2024-11-21T08:56:49.748Z",
  "signallingMetrics": {
    "pdd": 0,
    "edgeRegion": "text",
    "providerName": "text",
    "userAgent": "text",
    "remoteSignallingIp": "text",
    "remoteMediaIp": "text"
  },
  "mediaMetrics": {
    "mos": 0,
    "qualityScore": 0,
    "inBytes": 0,
    "outBytes": 0,
    "inPacketCount": 0,
    "outPacketCount": 0,
    "inMediaPacketCount": 0,
    "outMediaPacketCount": 0,
    "inDtmfPacketCount": 0,
    "outDtmfPacketCount": 0,
    "jitterMinVar": 0,
    "jitterMaxVar": 0,
    "jitterLossRate": 0,
    "jitterBurstRate": 0,
    "meanInterval": 0,
    "flawTotal": 0,
    "readCodecName": "text",
    "readCodecRate": "text",
    "writeCodecName": "text",
    "writeCodecRate": "text",
    "dtmfType": "text"
  }
}

Example 1: Get insights from an outbound call

curl "/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/insights" \
     -H 'Authorization: Bearer {Token}'

Last updated