Agent Number

GET /voice/stream/<call_id>

(WebSocket) Per-call audio stream

Description

**WebSocket endpoint** — same OpenAPI caveat as `/voice/presence`. Binary frames carry 16 kHz mono PCM both ways. Open with `Authorization: Bearer <token>`. Close to hang up. If the remote party hangs up, the server closes the WS with a status code carrying the reason.

Authentication

Bearer required. Send Authorization: Bearer <token>.

Code samples

Pick your runtime. Every sample is in the page source — switching tabs is for your eyes.

curl https://agentnumber.really.com/voice/stream/call_example_0000000000000000000000 \
  --header 'Authorization: Bearer <your-token>'

Path parameters

NameTypeDescription
call_id required string Call identifier from the `stream_url` returned by `/voice/dial` or pushed on the presence WS.
Example: call_example_0000000000000000000000

Responses

101 WebSocket upgrade. Binary frames carry 16 kHz mono PCM.

401 Missing or invalid bearer.

{
  "error": "unauthorized"
}

404 `call_id` doesn't exist or has already ended. Returned as a plain `text/plain` body since the WebSocket upgrade was rejected before any JSON envelope.