VSI
Last updated May 26, 2026
WebSocket protocol for real-time event streaming and command dispatch on /v1/vsi. All frames are JSON text. The server sends a connected frame on connect, then event frames whose shape is identical to webhook payloads (see openapi.yaml x-webhooks). Clients may issue commands at any time; each command receives a matching <command>.result or error frame echoing the request_id.
This file is generated from internal/api/vsi_meta.go — every VSI command and every event in internal/events MUST be present in the registries there or this spec is incomplete.
Connection & framing
Every frame is a JSON text message with a type field. The server sends connected first; thereafter it pushes event frames and replies to commands. Each command may carry a request_id that is echoed on the matching <command>.result or error frame so clients can correlate replies.
connected — First frame the server sends after the WebSocket upgrade completes. Carries no data.
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "connected" |
error — Generic error frame for invalid JSON, unknown command types, or command handler failures. Echoes `request_id` when the offending message had one. `data` carries `{code, message}`.
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "error" |
request_id | string | optional | |
data | object | required | |
code | integer | required | |
message | string | required |
Commands (73) client → server
List all active legs
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "list_legs" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | null | optional | No payload. |
Reply
list_legs.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "list_legs.result" |
request_id | string | optional | |
data | array[object] | optional |
…or an error frame echoing request_id with {code, message}.
Get a single leg by id
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "get_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
get_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "get_leg.result" |
request_id | string | optional | |
data | object | optional | See LegView |
…or an error frame echoing request_id with {code, message}.
Originate an outbound leg
Currently returns a 501 error directing clients to use POST /v1/legs. Reserved for the future when the originate flow is fully extracted into a do* helper.
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "create_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | See CreateLegRequest |
Reply
create_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "create_leg.result" |
request_id | string | optional | |
data | object | optional | See LegView |
…or an error frame echoing request_id with {code, message}.
Answer a ringing inbound leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "answer_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
speech_detection | boolean | optional | |
codec | string | optional |
Reply
answer_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "answer_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Hang up a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "delete_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
reason | string | optional |
Reply
delete_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "delete_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Mute a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "mute_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
mute_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "mute_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Unmute a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "unmute_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
unmute_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "unmute_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Deafen a leg (stop receiving room audio)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "deaf_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
deaf_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "deaf_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Undeafen a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "undeaf_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
undeaf_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "undeaf_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Put a SIP leg on hold
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "hold_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
hold_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "hold_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Resume a held SIP leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "unhold_leg" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
unhold_leg.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "unhold_leg.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Send DTMF digits on a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "send_leg_dtmf" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
digits | string | required |
Reply
send_leg_dtmf.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "send_leg_dtmf.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Enable DTMF reception
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "accept_leg_dtmf" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
accept_leg_dtmf.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "accept_leg_dtmf.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Disable DTMF reception
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "reject_leg_dtmf" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
reject_leg_dtmf.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "reject_leg_dtmf.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Send Real-Time Text (T.140) on a SIP leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "send_leg_rtt" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
text | string | required |
Reply
send_leg_rtt.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "send_leg_rtt.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Enable RTT reception
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "accept_leg_rtt" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
accept_leg_rtt.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "accept_leg_rtt.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Disable RTT reception
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "reject_leg_rtt" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
reject_leg_rtt.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "reject_leg_rtt.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Establish a WebRTC leg via SDP offer/answer
Accepts a browser SDP offer, allocates a peer connection, returns the local SDP answer plus the new leg id. Subsequent ICE candidates from the browser are delivered via webrtc_add_candidate; server-side candidates are drained via webrtc_get_candidates.
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_offer" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
sdp | string | required |
Reply
webrtc_offer.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_offer.result" |
request_id | string | optional | |
data | object | optional | |
leg_id | string | required | |
sdp | string | required |
…or an error frame echoing request_id with {code, message}.
Add a remote ICE candidate to a WebRTC leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_add_candidate" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
candidate | object | required | |
candidate | string | required | |
sdpMid | string | required | |
sdpMLineIndex | integer | required | |
usernameFragment | string | required |
Reply
webrtc_add_candidate.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_add_candidate.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Drain server-gathered ICE candidates for a WebRTC leg
Returns any local ICE candidates that have been gathered since the last call, plus a done flag indicating ICE gathering has completed. Clients should poll until done is true.
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_get_candidates" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
webrtc_get_candidates.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "webrtc_get_candidates.result" |
request_id | string | optional | |
data | object | optional | |
candidates | array[object] | required | |
candidate | string | required | |
sdpMid | string | required | |
sdpMLineIndex | integer | required | |
usernameFragment | string | required | |
done | boolean | required |
…or an error frame echoing request_id with {code, message}.
List all rooms
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "list_rooms" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | null | optional | No payload. |
Reply
list_rooms.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "list_rooms.result" |
request_id | string | optional | |
data | array[object] | optional |
…or an error frame echoing request_id with {code, message}.
Get a single room by id
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "get_room" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
get_room.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "get_room.result" |
request_id | string | optional | |
data | object | optional | See RoomView |
…or an error frame echoing request_id with {code, message}.
Create a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "create_room" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | See CreateRoomRequest |
Reply
create_room.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "create_room.result" |
request_id | string | optional | |
data | object | optional | See RoomView |
…or an error frame echoing request_id with {code, message}.
Delete a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "delete_room" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
delete_room.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "delete_room.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Add or move a leg into a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "add_leg_to_room" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
leg_id | string | required | |
mute | boolean | optional | |
deaf | boolean | optional | |
accept_dtmf | boolean | optional | |
role | string | optional |
Reply
add_leg_to_room.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "add_leg_to_room.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Remove a leg from a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "remove_leg_from_room" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
leg_id | string | required |
Reply
remove_leg_from_room.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "remove_leg_from_room.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Join two rooms' mixers
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_create" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
bridge_id | string | optional | |
peer_room_id | string | required | |
direction | string | optional |
Reply
bridge_create.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_create.result" |
request_id | string | optional | |
data | object | optional | |
id | string | required | |
room_id | string | required | |
direction | string | required | |
sample_rate | integer | required |
…or an error frame echoing request_id with {code, message}.
List bridges involving a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_list" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required |
Reply
bridge_list.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_list.result" |
request_id | string | optional | |
data | array[object] | optional | |
id | string | required | |
room_id | string | required | |
direction | string | required | |
sample_rate | integer | required |
…or an error frame echoing request_id with {code, message}.
Get a bridge involving a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_get" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
bridge_id | string | required |
Reply
bridge_get.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_get.result" |
request_id | string | optional | |
data | object | optional | |
id | string | required | |
room_id | string | required | |
direction | string | required | |
sample_rate | integer | required |
…or an error frame echoing request_id with {code, message}.
Change a bridge's direction
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_update" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
bridge_id | string | required | |
direction | string | required |
Reply
bridge_update.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_update.result" |
request_id | string | optional | |
data | object | optional | |
id | string | required | |
room_id | string | required | |
direction | string | required | |
sample_rate | integer | required |
…or an error frame echoing request_id with {code, message}.
Tear down a bridge
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_delete" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
bridge_id | string | required |
Reply
bridge_delete.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "bridge_delete.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Get a room's audio routing matrix
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_get" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_routing_get.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_get.result" |
request_id | string | optional | |
data | object | optional | |
matrix | object | required |
…or an error frame echoing request_id with {code, message}.
Replace a room's audio routing matrix
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_set" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
matrix | object | required |
Reply
room_routing_set.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_set.result" |
request_id | string | optional | |
data | object | optional | |
matrix | object | required |
…or an error frame echoing request_id with {code, message}.
Update selected rows of a room's audio routing matrix
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_update" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
room_id | string | required | |
updates | array[object] | required | |
listener_role | string | required | |
sources | array[string] | required |
Reply
room_routing_update.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_routing_update.result" |
request_id | string | optional | |
data | object | optional | |
matrix | object | required |
…or an error frame echoing request_id with {code, message}.
Change a leg's routing role (recomputes the room matrix if the leg is in a room)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "set_leg_role" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
leg_id | string | required | |
role | string | required |
Reply
set_leg_role.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "set_leg_role.result" |
request_id | string | optional | |
data | object | optional | See LegView |
…or an error frame echoing request_id with {code, message}.
Send a 180 Ringing on a SIP inbound leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_ring" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_ring.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_ring.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Enable early media (183 Session Progress) on a SIP inbound leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_early_media" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
codec | string | optional |
Reply
leg_early_media.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_early_media.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Start Answering Machine Detection on a connected SIP leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_amd_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
initial_silence_timeout | integer | optional | |
greeting_duration | integer | optional | |
after_greeting_silence | integer | optional | |
total_analysis_time | integer | optional | |
minimum_word_length | integer | optional | |
beep_timeout | integer | optional |
Reply
leg_amd_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_amd_start.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Start recording a leg (stereo when in a room or SIP, mono otherwise)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
storage | string | required | |
multi_channel | boolean | required | |
s3_bucket | string | required | |
s3_region | string | required | |
s3_endpoint | string | required | |
s3_prefix | string | required | |
s3_access_key | string | required | |
s3_secret_key | string | required |
Reply
leg_record_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_start.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
file | string | required |
…or an error frame echoing request_id with {code, message}.
Start recording the full room mix (mono; multi_channel adds per-participant tracks)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
storage | string | required | |
multi_channel | boolean | required | |
s3_bucket | string | required | |
s3_region | string | required | |
s3_endpoint | string | required | |
s3_prefix | string | required | |
s3_access_key | string | required | |
s3_secret_key | string | required |
Reply
room_record_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_start.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
file | string | required |
…or an error frame echoing request_id with {code, message}.
Pause a leg recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_pause" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_record_pause.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_pause.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Resume a paused leg recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_resume" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_record_resume.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_resume.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Stop a leg recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_record_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_record_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
file | string | required |
…or an error frame echoing request_id with {code, message}.
Stop a room recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_record_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
file | string | required | |
multi_channel_file | string | optional | |
channels | object | optional |
…or an error frame echoing request_id with {code, message}.
Pause a room recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_pause" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_record_pause.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_pause.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Resume a paused room recording
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_resume" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_record_resume.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_record_resume.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Start audio playback on a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
url | string | required | |
tone | string | required | |
mime_type | string | required | |
repeat | integer | required | |
volume | integer | required |
Reply
leg_play_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_start.result" |
request_id | string | optional | |
data | object | optional | |
playback_id | string | required | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Stop a leg playback
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
playback_id | string | required |
Reply
leg_play_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Start audio playback on a room mix
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
url | string | required | |
tone | string | required | |
mime_type | string | required | |
repeat | integer | required | |
volume | integer | required |
Reply
room_play_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_start.result" |
request_id | string | optional | |
data | object | optional | |
playback_id | string | required | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Stop a room playback
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
playback_id | string | required |
Reply
room_play_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Adjust the volume of an active leg playback
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_volume" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
playback_id | string | required | |
volume | integer | required |
Reply
leg_play_volume.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_play_volume.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Adjust the volume of an active room playback
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_volume" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
playback_id | string | required | |
volume | integer | required |
Reply
room_play_volume.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_play_volume.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Start speech-to-text on a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_stt_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
language | string | required | |
partial | boolean | required | |
provider | string | optional | |
api_key | string | optional |
Reply
leg_stt_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_stt_start.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Start speech-to-text on every participant of a room (auto-extends to legs that join later)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_stt_start" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
language | string | required | |
partial | boolean | required | |
provider | string | optional | |
api_key | string | optional |
Reply
room_stt_start.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_stt_start.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required | |
leg_ids | array[string] | required |
…or an error frame echoing request_id with {code, message}.
Stop speech-to-text on a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_stt_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_stt_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_stt_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Stop speech-to-text on a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_stt_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_stt_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_stt_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Synthesize speech and play it on a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_tts" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
text | string | required | |
voice | string | required | |
model_id | string | required | |
language | string | optional | |
prompt | string | optional | |
volume | integer | required | |
provider | string | optional | |
api_key | string | optional |
Reply
leg_tts.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_tts.result" |
request_id | string | optional | |
data | object | optional | |
tts_id | string | required | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Synthesize speech and play it into a room mix
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_tts" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
text | string | required | |
voice | string | required | |
model_id | string | required | |
language | string | optional | |
prompt | string | optional | |
volume | integer | required | |
provider | string | optional | |
api_key | string | optional |
Reply
room_tts.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_tts.result" |
request_id | string | optional | |
data | object | optional | |
tts_id | string | required | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Initiate a SIP REFER transfer (blind or attended)
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_transfer" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
target | string | required | |
replaces_leg_id | string | optional |
Reply
leg_transfer.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_transfer.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Attach an ElevenLabs Conversational AI agent to a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_elevenlabs" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
agent_id | string | required | |
first_message | string | optional | |
language | string | optional | |
dynamic_variables | object | optional | |
api_key | string | optional |
Reply
leg_agent_elevenlabs.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_elevenlabs.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a VAPI agent to a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_vapi" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
assistant_id | string | required | |
first_message | string | optional | |
variable_values | object | optional | |
api_key | string | optional |
Reply
leg_agent_vapi.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_vapi.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a Pipecat bot to a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_pipecat" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
websocket_url | string | required |
Reply
leg_agent_pipecat.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_pipecat.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a Deepgram Voice Agent to a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_deepgram" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
settings | object | optional | |
greeting | string | optional | |
language | string | optional | |
api_key | string | optional |
Reply
leg_agent_deepgram.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_deepgram.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
leg_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach an ElevenLabs Conversational AI agent to a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_elevenlabs" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
agent_id | string | required | |
first_message | string | optional | |
language | string | optional | |
dynamic_variables | object | optional | |
api_key | string | optional |
Reply
room_agent_elevenlabs.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_elevenlabs.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a VAPI agent to a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_vapi" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
assistant_id | string | required | |
first_message | string | optional | |
variable_values | object | optional | |
api_key | string | optional |
Reply
room_agent_vapi.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_vapi.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a Pipecat bot to a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_pipecat" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
websocket_url | string | required |
Reply
room_agent_pipecat.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_pipecat.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required |
…or an error frame echoing request_id with {code, message}.
Attach a Deepgram Voice Agent to a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_deepgram" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
settings | object | optional | |
greeting | string | optional | |
language | string | optional | |
api_key | string | optional |
Reply
room_agent_deepgram.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_deepgram.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required | |
room_id | string | required |
…or an error frame echoing request_id with {code, message}.
Detach the agent attached to a leg
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
leg_agent_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Detach the agent attached to a room
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_stop" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required |
Reply
room_agent_stop.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_stop.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Inject a text message into a leg agent session
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_message" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
message | string | required |
Reply
leg_agent_message.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "leg_agent_message.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Inject a text message into a room agent session
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_message" |
request_id | string | optional | Echoed back on the matching .result/error frame; clients use it to correlate. |
payload | object | optional | |
id | string | required | |
message | string | required |
Reply
room_agent_message.result — success reply
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "room_agent_message.result" |
request_id | string | optional | |
data | object | optional | |
status | string | required |
…or an error frame echoing request_id with {code, message}.
Optional client keepalive reply to a `ping`. Currently a no-op on the server side.
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "pong" |
Client-initiated graceful close. The server stops the recv loop and closes the connection.
Command frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "stop" |
Events (50) server → client
SIP call ringing (inbound or outbound)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.ringing. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.ringing payload envelope.
Outbound leg received 183 Session Progress with SDP; media pipeline active
Event payload shape is documented in openapi.yaml under x-webhooks/leg.early_media. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.early_media payload envelope.
Leg answered/connected
Event payload shape is documented in openapi.yaml under x-webhooks/leg.connected. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.connected payload envelope.
Leg hung up (CDR-style nested structure)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.disconnected. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.disconnected payload envelope.
Leg added to a room
Event payload shape is documented in openapi.yaml under x-webhooks/leg.joined_room. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.joined_room payload envelope.
Leg removed from a room
Event payload shape is documented in openapi.yaml under x-webhooks/leg.left_room. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.left_room payload envelope.
Leg muted
Event payload shape is documented in openapi.yaml under x-webhooks/leg.muted. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.muted payload envelope.
Leg unmuted
Event payload shape is documented in openapi.yaml under x-webhooks/leg.unmuted. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.unmuted payload envelope.
Leg deafened (stops receiving room audio)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.deaf. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.deaf payload envelope.
Leg undeafened (resumes receiving room audio)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.undeaf. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.undeaf payload envelope.
Leg put on hold (local or remote)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.hold. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.hold payload envelope.
Leg taken off hold (local or remote)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.unhold. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.unhold payload envelope.
An asynchronous leg command (202 Accepted) failed during execution
Event payload shape is documented in openapi.yaml under x-webhooks/leg.command_failed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.command_failed payload envelope.
DTMF digit received
Event payload shape is documented in openapi.yaml under x-webhooks/dtmf.received. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the dtmf.received payload envelope.
Real-Time Text (T.140 / RFC 4103) chunk received from the remote
Event payload shape is documented in openapi.yaml under x-webhooks/rtt.received. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the rtt.received payload envelope.
Participant started speaking
Event payload shape is documented in openapi.yaml under x-webhooks/speaking.started. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the speaking.started payload envelope.
Participant stopped speaking
Event payload shape is documented in openapi.yaml under x-webhooks/speaking.stopped. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the speaking.stopped payload envelope.
Playback began
Event payload shape is documented in openapi.yaml under x-webhooks/playback.started. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the playback.started payload envelope.
Playback ended
Event payload shape is documented in openapi.yaml under x-webhooks/playback.finished. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the playback.finished payload envelope.
Playback failed
Event payload shape is documented in openapi.yaml under x-webhooks/playback.error. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the playback.error payload envelope.
TTS synthesis began playing
Event payload shape is documented in openapi.yaml under x-webhooks/tts.started. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the tts.started payload envelope.
TTS synthesis finished playing
Event payload shape is documented in openapi.yaml under x-webhooks/tts.finished. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the tts.finished payload envelope.
TTS synthesis or playback failed
Event payload shape is documented in openapi.yaml under x-webhooks/tts.error. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the tts.error payload envelope.
Recording began
Event payload shape is documented in openapi.yaml under x-webhooks/recording.started. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the recording.started payload envelope.
Recording ended
Event payload shape is documented in openapi.yaml under x-webhooks/recording.finished. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the recording.finished payload envelope.
Recording paused (audio replaced with silence)
Event payload shape is documented in openapi.yaml under x-webhooks/recording.paused. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the recording.paused payload envelope.
Recording resumed from a paused state
Event payload shape is documented in openapi.yaml under x-webhooks/recording.resumed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the recording.resumed payload envelope.
We sent a SIP REFER (transfer initiated by the operator)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_initiated. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.transfer_initiated payload envelope.
We received a SIP REFER from the peer
Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_requested. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.transfer_requested payload envelope.
Transfer progress reported via NOTIFY sipfrag
Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_progress. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.transfer_progress payload envelope.
Transfer reached terminal 2xx
Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_completed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.transfer_completed payload envelope.
Transfer failed (REFER rejected, sipfrag non-2xx, or local error)
Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_failed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.transfer_failed payload envelope.
Room created
Event payload shape is documented in openapi.yaml under x-webhooks/room.created. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.created payload envelope.
Room deleted
Event payload shape is documented in openapi.yaml under x-webhooks/room.deleted. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.deleted payload envelope.
Two rooms' mixers were joined
Event payload shape is documented in openapi.yaml under x-webhooks/room.bridged. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.bridged payload envelope.
A bridge's audio flow direction changed
Event payload shape is documented in openapi.yaml under x-webhooks/room.bridge_updated. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.bridge_updated payload envelope.
A bridge was torn down
Event payload shape is documented in openapi.yaml under x-webhooks/room.unbridged. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.unbridged payload envelope.
The room's audio routing matrix changed
Event payload shape is documented in openapi.yaml under x-webhooks/room.routing_changed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the room.routing_changed payload envelope.
A leg's routing role changed
Event payload shape is documented in openapi.yaml under x-webhooks/leg.role_changed. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the leg.role_changed payload envelope.
Speech-to-text transcript
Event payload shape is documented in openapi.yaml under x-webhooks/stt.text. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the stt.text payload envelope.
Agent connected to provider
Event payload shape is documented in openapi.yaml under x-webhooks/agent.connected. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the agent.connected payload envelope.
Agent session ended
Event payload shape is documented in openapi.yaml under x-webhooks/agent.disconnected. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the agent.disconnected payload envelope.
User speech transcribed by agent
Event payload shape is documented in openapi.yaml under x-webhooks/agent.user_transcript. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the agent.user_transcript payload envelope.
Agent generated a response
Event payload shape is documented in openapi.yaml under x-webhooks/agent.agent_response. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the agent.agent_response payload envelope.
Answering machine detection completed
Event payload shape is documented in openapi.yaml under x-webhooks/amd.result. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the amd.result payload envelope.
Voicemail beep tone detected after machine classification
Event payload shape is documented in openapi.yaml under x-webhooks/amd.beep. Full envelope: {type, timestamp, instance_id, ...event-specific fields}.
Event frame
Payload is the amd.beep payload envelope.
First frame the server sends after the WebSocket upgrade completes. Carries no data.
Event frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "connected" |
Periodic application-level keepalive (every ~30 s). Clients may reply with `pong` or ignore.
Event frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "ping" |
Sent when the per-connection event buffer overflowed. The accompanying `count` indicates how many events were dropped since the last notification. Clients should resync via REST after seeing this.
Event frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "events_dropped" |
count | integer | required | Number of events dropped since the last notification. |
Generic error frame for invalid JSON, unknown command types, or command handler failures. Echoes `request_id` when the offending message had one. `data` carries `{code, message}`.
Event frame
| Field | Type | Description | |
|---|---|---|---|
type | const | required | Value: "error" |
request_id | string | optional | |
data | object | required | |
code | integer | required | |
message | string | required |
Result & payload schemas
AsyncAPI-local schemas referenced by the command and event frames above. Shapes defined in the REST API (LegView, CreateLegRequest, …) link to the Schemas page; event payloads link to Events.
AddLegToRoomResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
room_id | string | required | |
leg_id | string | required |
AgentMessageResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
AgentStartLegResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
leg_id | string | required |
AgentStartRoomResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
room_id | string | required |
AgentStopResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
BridgeView
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
room_id | string | required | |
direction | string | required | |
sample_rate | integer | required |
ChannelInfo
| Field | Type | Description | |
|---|---|---|---|
channel | integer | required | |
start_ms | integer | required | |
end_ms | integer | required |
ICECandidateInit
| Field | Type | Description | |
|---|---|---|---|
candidate | string | required | |
sdpMid | string | required | |
sdpMLineIndex | integer | required | |
usernameFragment | string | required |
PlaybackStartResult
| Field | Type | Description | |
|---|---|---|---|
playback_id | string | required | |
status | string | required |
PlaybackStopResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
RecordingPauseResumeResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
RecordingStartResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
file | string | required |
RecordingStopLegResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
file | string | required |
RecordingStopRoomResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
file | string | required | |
multi_channel_file | string | optional | |
channels | object | optional |
RoomRoutingView
| Field | Type | Description | |
|---|---|---|---|
matrix | object | required |
RoutingRowUpdate
| Field | Type | Description | |
|---|---|---|---|
listener_role | string | required | |
sources | array[string] | required |
STTStartLegResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
leg_id | string | required |
STTStartRoomResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required | |
room_id | string | required | |
leg_ids | array[string] | required |
STTStopResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
TTSStartResult
| Field | Type | Description | |
|---|---|---|---|
tts_id | string | required | |
status | string | required |
TransferLegResult
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
WebRTCCandidatesResult
| Field | Type | Description | |
|---|---|---|---|
candidates | array[object] | required | |
candidate | string | required | |
sdpMid | string | required | |
sdpMLineIndex | integer | required | |
usernameFragment | string | required | |
done | boolean | required |
WebRTCOfferRequest
| Field | Type | Description | |
|---|---|---|---|
sdp | string | required |
WebRTCOfferResult
| Field | Type | Description | |
|---|---|---|---|
leg_id | string | required | |
sdp | string | required |
addLegPayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
leg_id | string | required | |
mute | boolean | optional | |
deaf | boolean | optional | |
accept_dtmf | boolean | optional | |
role | string | optional |
agentDeepgramPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
settings | object | optional | |
greeting | string | optional | |
language | string | optional | |
api_key | string | optional |
agentElevenLabsPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
agent_id | string | required | |
first_message | string | optional | |
language | string | optional | |
dynamic_variables | object | optional | |
api_key | string | optional |
agentMessagePayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
message | string | required |
agentPipecatPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
websocket_url | string | required |
agentVAPIPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
assistant_id | string | required | |
first_message | string | optional | |
variable_values | object | optional | |
api_key | string | optional |
answerLegPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
speech_detection | boolean | optional | |
codec | string | optional |
bridgeCreatePayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
bridge_id | string | optional | |
peer_room_id | string | required | |
direction | string | optional |
bridgeListPayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required |
bridgeRefPayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
bridge_id | string | required |
bridgeUpdatePayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
bridge_id | string | required | |
direction | string | required |
deleteLegPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
reason | string | optional |
dtmfPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
digits | string | required |
earlyMediaPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
codec | string | optional |
idPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required |
legAMDStartPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
initial_silence_timeout | integer | optional | |
greeting_duration | integer | optional | |
after_greeting_silence | integer | optional | |
total_analysis_time | integer | optional | |
minimum_word_length | integer | optional | |
beep_timeout | integer | optional |
playbackStartPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
url | string | required | |
tone | string | required | |
mime_type | string | required | |
repeat | integer | required | |
volume | integer | required |
playbackTargetPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
playback_id | string | required |
playbackVolumePayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
playback_id | string | required | |
volume | integer | required |
recordStartPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
storage | string | required | |
multi_channel | boolean | required | |
s3_bucket | string | required | |
s3_region | string | required | |
s3_endpoint | string | required | |
s3_prefix | string | required | |
s3_access_key | string | required | |
s3_secret_key | string | required |
roomLegPayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
leg_id | string | required |
roomRoutingSetPayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
matrix | object | required |
roomRoutingUpdatePayload
| Field | Type | Description | |
|---|---|---|---|
room_id | string | required | |
updates | array[object] | required | |
listener_role | string | required | |
sources | array[string] | required |
rttPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
text | string | required |
setLegRolePayload
| Field | Type | Description | |
|---|---|---|---|
leg_id | string | required | |
role | string | required |
sttStartPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
language | string | required | |
partial | boolean | required | |
provider | string | optional | |
api_key | string | optional |
transferLegPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
target | string | required | |
replaces_leg_id | string | optional |
ttsStartPayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
text | string | required | |
voice | string | required | |
model_id | string | required | |
language | string | optional | |
prompt | string | optional | |
volume | integer | required | |
provider | string | optional | |
api_key | string | optional |
vsiStatusResponse
| Field | Type | Description | |
|---|---|---|---|
status | string | required |
vsiWebRTCAddCandidatePayload
| Field | Type | Description | |
|---|---|---|---|
id | string | required | |
candidate | object | required | |
candidate | string | required | |
sdpMid | string | required | |
sdpMLineIndex | integer | required | |
usernameFragment | string | required |