Connection flow
Endpoint
bot_id identifies which bot configuration to fetch from VoxBridge.
Audio format
| Property | Value |
|---|---|
| Encoding | LINEAR16 (signed 16-bit PCM) |
| Sample rate | 8,000 Hz |
| Channels | Mono |
| Transport encoding | Base64 in JSON payload field |
Handshake events
The dialler sends exactly three events after connection:connected
connected
First event. Contains caller metadata.
All fields from the
| Field | Type | Description |
|---|---|---|
event | string | "connected" |
callerId | string | Caller’s phone number |
did | string | Dialled number (DID) |
callDirection | string | "incoming" or "outgoing" |
streamId | string | Stream identifier (optional, may come in start) |
connected event (minus event) are forwarded to VoxBridge as connected_event query params during config fetch.start
start
Second event. Contains stream and media format info.
| Field | Type | Description |
|---|---|---|
event | string | "start" |
streamId | string | Stream identifier |
mediaFormat | object | Audio format metadata |
answer
answer
Third event. Signals handshake complete, pipeline can start.
| Field | Type | Description |
|---|---|---|
event | string | "answer" |
Protocol events
Incoming (dialler → VoxCore)
| Event | Description |
|---|---|
media | Audio frame. payload field contains base64-encoded LINEAR16 PCM. |
hangup-call | Customer or network disconnection. disconnectedBy field indicates source. |
Outgoing (VoxCore → dialler)
| Event | Description |
|---|---|
reverse-media | Bot audio response. Base64-encoded LINEAR16 PCM in payload. |
reverse-media-stop | Clears the dialler’s audio buffer. Sent before hangup. |
reverse-hangup-call | Drops the call. Sent after reverse-media-stop. |
reverse-call-transfer | Transfers the call to a specified number. |
reverse-media payload
Hangup behavior
Bot-initiated hangup:- VoxCore sends
reverse-media-stop(clears audio buffer) - VoxCore sends
reverse-hangup-call disconnected_by="bot"
- Dialler sends
hangup-callevent - VoxCore receives
CancelFrame, pipeline winds down disconnected_by="customer"
Capacity
When a worker is atMAX_CONCURRENT_CALLS, new WebSocket connections are rejected with close code 1008 (“Server at capacity”). The nginx least_conn balancer routes to the least-loaded worker.