Skip to main content
GET
/
api
/
v1
/
sessions
/
{sessionId}
/
calls
/
{callId}
/
media
WebSocket media protocol
curl --request GET \
  --url https://api.wadial.com/api/v1/sessions/{sessionId}/calls/{callId}/media \
  --header 'Authorization: Bearer <token>'
Upgrade this endpoint to a WebSocket with the same bearer token used for REST calls. Client binary frames are outbound peer audio:
FieldValue
EncodingFloat32LE
Sample rate16000 Hz
Channels1 mono
Server binary frames are inbound peer audio with the same format.

Server text frames

{
  "type": "ready",
  "media": {
    "direction": "bidirectional",
    "encoding": "Float32LE",
    "sampleRate": 16000,
    "channels": 1
  }
}
Backpressure:
{
  "type": "buffer",
  "bufferedMs": 240,
  "pauseMs": 500,
  "resumeMs": 250
}
Slow or pause your producer when bufferedMs reaches pauseMs; resume when it drains near resumeMs. Call state:
{
  "type": "call_state",
  "call": {
    "callId": "call-123",
    "state": "active"
  }
}
Errors:
{
  "type": "error",
  "code": "invalid_pcm_frame",
  "message": "Binary frames must be Float32LE PCM with 4-byte alignment"
}
Raw audio is only carried by this WebSocket. SSE and webhooks carry metadata events only.