VSI

Last updated August 14, 2026

v1.0.0 wss://<host>/v1/vsi

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.

FieldTypeDescription
typeconstrequired
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}`.

FieldTypeDescription
typeconstrequired
Value: "error"
request_idstringoptional
dataobjectrequired
codeintegerrequired
messagestringrequired

Commands (101) client → server

# CMD list_legs

List all active legs

Command frame

FieldTypeDescription
typeconstrequired
Value: "list_legs"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadnulloptionalNo payload.

Reply

list_legs.result — success reply

FieldTypeDescription
typeconstrequired
Value: "list_legs.result"
request_idstringoptional
dataarray[object]optional

…or an error frame echoing request_id with {code, message}.

# CMD get_leg

Get a single leg by id

Command frame

FieldTypeDescription
typeconstrequired
Value: "get_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

get_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "get_leg.result"
request_idstringoptional
dataobjectoptionalSee LegView

…or an error frame echoing request_id with {code, message}.

# CMD create_leg

Originate an outbound leg

Originates an outbound leg, mirroring POST /v1/legs, and returns the leg view. Supports all leg types: "sip", "websocket", "whatsapp", and "livekit_room". For "livekit_room", custom headers come from the request's headers map (there is no HTTP request over the WebSocket).

Command frame

FieldTypeDescription
typeconstrequired
Value: "create_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptionalSee CreateLegRequest

Reply

create_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "create_leg.result"
request_idstringoptional
dataobjectoptionalSee LegView

…or an error frame echoing request_id with {code, message}.

# CMD answer_leg

Answer a ringing inbound leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "answer_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
speech_detectionbooleanoptional
codecstringoptional
streamsarray[object]optional
room_idstringoptional
rolestringoptional

Reply

answer_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "answer_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD delete_leg

Hang up a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "delete_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
reasonstringoptional

Reply

delete_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "delete_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD mute_leg

Mute a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "mute_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

mute_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "mute_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD unmute_leg

Unmute a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "unmute_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

unmute_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "unmute_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD deaf_leg

Deafen a leg (stop receiving room audio)

Command frame

FieldTypeDescription
typeconstrequired
Value: "deaf_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

deaf_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "deaf_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD undeaf_leg

Undeafen a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "undeaf_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

undeaf_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "undeaf_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD hold_leg

Put a SIP leg on hold

Command frame

FieldTypeDescription
typeconstrequired
Value: "hold_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

hold_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "hold_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD unhold_leg

Resume a held SIP leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "unhold_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

unhold_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "unhold_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD send_leg_dtmf

Send DTMF digits on a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "send_leg_dtmf"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
digitsstringrequired

Reply

send_leg_dtmf.result — success reply

FieldTypeDescription
typeconstrequired
Value: "send_leg_dtmf.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD accept_leg_dtmf

Enable DTMF reception

Command frame

FieldTypeDescription
typeconstrequired
Value: "accept_leg_dtmf"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

accept_leg_dtmf.result — success reply

FieldTypeDescription
typeconstrequired
Value: "accept_leg_dtmf.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD reject_leg_dtmf

Disable DTMF reception

Command frame

FieldTypeDescription
typeconstrequired
Value: "reject_leg_dtmf"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

reject_leg_dtmf.result — success reply

FieldTypeDescription
typeconstrequired
Value: "reject_leg_dtmf.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD send_leg_rtt

Send Real-Time Text (T.140) on a SIP leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "send_leg_rtt"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
textstringrequired

Reply

send_leg_rtt.result — success reply

FieldTypeDescription
typeconstrequired
Value: "send_leg_rtt.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD accept_leg_rtt

Enable RTT reception

Command frame

FieldTypeDescription
typeconstrequired
Value: "accept_leg_rtt"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

accept_leg_rtt.result — success reply

FieldTypeDescription
typeconstrequired
Value: "accept_leg_rtt.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD reject_leg_rtt

Disable RTT reception

Command frame

FieldTypeDescription
typeconstrequired
Value: "reject_leg_rtt"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

reject_leg_rtt.result — success reply

FieldTypeDescription
typeconstrequired
Value: "reject_leg_rtt.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD webrtc_offer

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

FieldTypeDescription
typeconstrequired
Value: "webrtc_offer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
sdpstringrequired
app_idstringoptional

Reply

webrtc_offer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "webrtc_offer.result"
request_idstringoptional
dataobjectoptional
leg_idstringrequired
sdpstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD webrtc_add_candidate

Add a remote ICE candidate to a WebRTC leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "webrtc_add_candidate"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
candidateobjectrequired
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired

Reply

webrtc_add_candidate.result — success reply

FieldTypeDescription
typeconstrequired
Value: "webrtc_add_candidate.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD webrtc_get_candidates

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

FieldTypeDescription
typeconstrequired
Value: "webrtc_get_candidates"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

webrtc_get_candidates.result — success reply

FieldTypeDescription
typeconstrequired
Value: "webrtc_get_candidates.result"
request_idstringoptional
dataobjectoptional
candidatesarray[object]required
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired
donebooleanrequired

…or an error frame echoing request_id with {code, message}.

# CMD list_rooms

List all rooms

Command frame

FieldTypeDescription
typeconstrequired
Value: "list_rooms"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadnulloptionalNo payload.

Reply

list_rooms.result — success reply

FieldTypeDescription
typeconstrequired
Value: "list_rooms.result"
request_idstringoptional
dataarray[object]optional

…or an error frame echoing request_id with {code, message}.

# CMD get_room

Get a single room by id

Command frame

FieldTypeDescription
typeconstrequired
Value: "get_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

get_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "get_room.result"
request_idstringoptional
dataobjectoptionalSee RoomView

…or an error frame echoing request_id with {code, message}.

# CMD create_room

Create a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "create_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptionalSee CreateRoomRequest

Reply

create_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "create_room.result"
request_idstringoptional
dataobjectoptionalSee RoomView

…or an error frame echoing request_id with {code, message}.

# CMD delete_room

Delete a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "delete_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

delete_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "delete_room.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD add_leg_to_room

Add or move a leg into a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "add_leg_to_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
leg_idstringrequired
mutebooleanoptional
deafbooleanoptional
accept_dtmfbooleanoptional
rolestringoptional

Reply

add_leg_to_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "add_leg_to_room.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD remove_leg_from_room

Remove a leg from a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "remove_leg_from_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
leg_idstringrequired

Reply

remove_leg_from_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "remove_leg_from_room.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD bridge_create

Join two rooms' mixers

Command frame

FieldTypeDescription
typeconstrequired
Value: "bridge_create"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
bridge_idstringoptional
peer_room_idstringrequired
directionstringoptional

Reply

bridge_create.result — success reply

FieldTypeDescription
typeconstrequired
Value: "bridge_create.result"
request_idstringoptional
dataobjectoptional
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

…or an error frame echoing request_id with {code, message}.

# CMD bridge_list

List bridges involving a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "bridge_list"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired

Reply

bridge_list.result — success reply

FieldTypeDescription
typeconstrequired
Value: "bridge_list.result"
request_idstringoptional
dataarray[object]optional
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

…or an error frame echoing request_id with {code, message}.

# CMD bridge_get

Get a bridge involving a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "bridge_get"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
bridge_idstringrequired

Reply

bridge_get.result — success reply

FieldTypeDescription
typeconstrequired
Value: "bridge_get.result"
request_idstringoptional
dataobjectoptional
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

…or an error frame echoing request_id with {code, message}.

# CMD bridge_update

Change a bridge's direction

Command frame

FieldTypeDescription
typeconstrequired
Value: "bridge_update"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
bridge_idstringrequired
directionstringrequired

Reply

bridge_update.result — success reply

FieldTypeDescription
typeconstrequired
Value: "bridge_update.result"
request_idstringoptional
dataobjectoptional
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

…or an error frame echoing request_id with {code, message}.

# CMD bridge_delete

Tear down a bridge

Command frame

FieldTypeDescription
typeconstrequired
Value: "bridge_delete"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
bridge_idstringrequired

Reply

bridge_delete.result — success reply

FieldTypeDescription
typeconstrequired
Value: "bridge_delete.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_routing_get

Get a room's audio routing matrix

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_routing_get"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_routing_get.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_routing_get.result"
request_idstringoptional
dataobjectoptional
matrixobjectrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_routing_set

Replace a room's audio routing matrix

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_routing_set"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
matrixobjectrequired

Reply

room_routing_set.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_routing_set.result"
request_idstringoptional
dataobjectoptional
matrixobjectrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_routing_update

Update selected rows of a room's audio routing matrix

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_routing_update"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
room_idstringrequired
updatesarray[object]required
listener_rolestringrequired
sourcesarray[string]required

Reply

room_routing_update.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_routing_update.result"
request_idstringoptional
dataobjectoptional
matrixobjectrequired

…or an error frame echoing request_id with {code, message}.

# CMD set_leg_role

Change a leg's routing role (recomputes the room matrix if the leg is in a room)

Command frame

FieldTypeDescription
typeconstrequired
Value: "set_leg_role"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
rolestringrequired

Reply

set_leg_role.result — success reply

FieldTypeDescription
typeconstrequired
Value: "set_leg_role.result"
request_idstringoptional
dataobjectoptionalSee LegView

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_list

List a SIP leg's negotiated audio streams

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_list"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_stream_list.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_list.result"
request_idstringoptional
dataarray[object]optional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_get

Get one of a SIP leg's audio streams

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_get"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
stream_idstringrequired

Reply

leg_stream_get.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_get.result"
request_idstringoptional
dataobjectoptional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_add

Negotiate an additional m=audio section on a live dialog via re-INVITE

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_add"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
directionstringoptional
langstringoptional
contentstringoptional
labelstringoptional
room_idstringoptional
rolestringoptional

Reply

leg_stream_add.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_add.result"
request_idstringoptional
dataobjectoptional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_update

Change one of a leg's audio streams' routing role in place

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_update"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
stream_idstringrequired
rolestringoptional

Reply

leg_stream_update.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_update.result"
request_idstringoptional
dataobjectoptional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_remove

Disable one of a leg's audio streams with a port-0 re-INVITE

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_remove"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
stream_idstringrequired

Reply

leg_stream_remove.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_remove.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_attach_room

Mix one of a leg's audio streams into a room (may differ from the leg's own room)

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_attach_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
stream_idstringrequired
room_idstringrequired
rolestringoptional

Reply

leg_stream_attach_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_attach_room.result"
request_idstringoptional
dataobjectoptional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_stream_detach_room

Remove one of a leg's audio streams from whichever room mixes it

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stream_detach_room"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
leg_idstringrequired
stream_idstringrequired

Reply

leg_stream_detach_room.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stream_detach_room.result"
request_idstringoptional
dataobjectoptional
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_siprec_start

Fork a single call to an external SIPREC recording server

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_siprec_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
srs_uristringrequired
leg_idsarray[string]optional
session_idstringoptional
app_idstringoptional
auth_usernamestringoptional
auth_passwordstringoptional
headersobjectoptional

Reply

leg_siprec_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_siprec_start.result"
request_idstringoptional
dataobjectoptionalSee LegView

…or an error frame echoing request_id with {code, message}.

# CMD room_siprec_start

Fork a room's participants to an external SIPREC recording server

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_siprec_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
srs_uristringrequired
leg_idsarray[string]optional
session_idstringoptional
app_idstringoptional
auth_usernamestringoptional
auth_passwordstringoptional
headersobjectoptional

Reply

room_siprec_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_siprec_start.result"
request_idstringoptional
dataobjectoptionalSee LegView

…or an error frame echoing request_id with {code, message}.

# CMD siprec_get

Get an inbound SIPREC recording session's participants, streams and metadata

Command frame

FieldTypeDescription
typeconstrequired
Value: "siprec_get"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

siprec_get.result — success reply

FieldTypeDescription
typeconstrequired
Value: "siprec_get.result"
request_idstringoptional
dataobjectoptional
leg_idstringrequired
session_idstringoptional
data_modestringoptional
room_idstringoptional
participantsarray[object]required
participant_idstringrequired
aorstringoptional
namestringoptional
streamsarray[object]required
leg_stream_idstringrequired
midstringoptional
labelstringoptional
directionstringoptional
codecstringoptional
room_idstringoptional
rolestringoptional
participant_idstringoptional
participant_aorstringoptional
participant_namestringoptional
metadatastringoptional

…or an error frame echoing request_id with {code, message}.

# CMD leg_ring

Send a 180 Ringing on a SIP inbound leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_ring"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_ring.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_ring.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_early_media

Enable early media (183 Session Progress) on a SIP inbound leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_early_media"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
codecstringoptional

Reply

leg_early_media.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_early_media.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_amd_start

Start Answering Machine Detection on a connected SIP leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_amd_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
initial_silence_timeoutintegeroptional
greeting_durationintegeroptional
after_greeting_silenceintegeroptional
total_analysis_timeintegeroptional
minimum_word_lengthintegeroptional
beep_timeoutintegeroptional

Reply

leg_amd_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_amd_start.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_record_start

Start recording a leg (stereo when in a room or SIP, mono otherwise)

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_record_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
storagestringrequired
multi_channelbooleanrequired
s3_bucketstringrequired
s3_regionstringrequired
s3_endpointstringrequired
s3_prefixstringrequired
s3_access_keystringrequired
s3_secret_keystringrequired
gcs_bucketstringrequired
gcs_object_name_prefixstringrequired
filenamestringrequired

Reply

leg_record_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_record_start.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
filestringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_record_start

Start recording the full room mix (mono; multi_channel adds per-participant tracks)

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_record_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
storagestringrequired
multi_channelbooleanrequired
s3_bucketstringrequired
s3_regionstringrequired
s3_endpointstringrequired
s3_prefixstringrequired
s3_access_keystringrequired
s3_secret_keystringrequired
gcs_bucketstringrequired
gcs_object_name_prefixstringrequired
filenamestringrequired

Reply

room_record_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_record_start.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
filestringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_record_pause

Pause a leg recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_record_pause"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_record_pause.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_record_pause.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_record_resume

Resume a paused leg recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_record_resume"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_record_resume.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_record_resume.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_record_stop

Stop a leg recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_record_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_record_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_record_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
filestringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_record_stop

Stop a room recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_record_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_record_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_record_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
filestringrequired
multi_channel_filestringoptional
channelsobjectoptional
omitted_legsarray[string]optional

…or an error frame echoing request_id with {code, message}.

# CMD room_record_pause

Pause a room recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_record_pause"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_record_pause.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_record_pause.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_record_resume

Resume a paused room recording

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_record_resume"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_record_resume.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_record_resume.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_play_start

Start audio playback on a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_play_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
urlstringrequired
tonestringrequired
mime_typestringrequired
repeatintegerrequired
volumeintegerrequired

Reply

leg_play_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_play_start.result"
request_idstringoptional
dataobjectoptional
playback_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_play_stop

Stop a leg playback

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_play_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
playback_idstringrequired

Reply

leg_play_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_play_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_play_start

Start audio playback on a room mix

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_play_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
urlstringrequired
tonestringrequired
mime_typestringrequired
repeatintegerrequired
volumeintegerrequired

Reply

room_play_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_play_start.result"
request_idstringoptional
dataobjectoptional
playback_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_play_stop

Stop a room playback

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_play_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
playback_idstringrequired

Reply

room_play_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_play_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_play_volume

Adjust the volume of an active leg playback

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_play_volume"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
playback_idstringrequired
volumeintegerrequired

Reply

leg_play_volume.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_play_volume.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_play_volume

Adjust the volume of an active room playback

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_play_volume"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
playback_idstringrequired
volumeintegerrequired

Reply

room_play_volume.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_play_volume.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_stt_start

Start speech-to-text on a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stt_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
languagestringrequired
partialbooleanrequired
providerstringoptional
api_keystringoptional
modelstringoptional
keytermsarray[string]optional
endpointingintegeroptional
utterance_end_msintegeroptional
eager_eot_thresholdnumberoptional
eot_thresholdnumberoptional
eot_timeout_msintegeroptional
language_hintsarray[string]optional

Reply

leg_stt_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stt_start.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_stt_start

Start speech-to-text on every participant of a room (auto-extends to legs that join later)

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_stt_start"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
languagestringrequired
partialbooleanrequired
providerstringoptional
api_keystringoptional
modelstringoptional
keytermsarray[string]optional
endpointingintegeroptional
utterance_end_msintegeroptional
eager_eot_thresholdnumberoptional
eot_thresholdnumberoptional
eot_timeout_msintegeroptional
language_hintsarray[string]optional

Reply

room_stt_start.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_stt_start.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired
leg_idsarray[string]required

…or an error frame echoing request_id with {code, message}.

# CMD leg_stt_stop

Stop speech-to-text on a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stt_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_stt_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stt_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_stt_stop

Stop speech-to-text on a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_stt_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_stt_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_stt_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_stt_finalize

Flush the speech-to-text buffer on a leg and emit a final transcript without stopping STT

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_stt_finalize"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_stt_finalize.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_stt_finalize.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_tts

Synthesize speech and play it on a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_tts"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
textstringrequired
voicestringrequired
model_idstringrequired
languagestringoptional
promptstringoptional
volumeintegerrequired
providerstringoptional
api_keystringoptional

Reply

leg_tts.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_tts.result"
request_idstringoptional
dataobjectoptional
tts_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_tts_preflight

Synthesize speech and hold it for a later commit

Stages a speculative reply: the audio is synthesized and buffered but not played, so that committing it starts playback with no synthesis delay. Use with the eager_end_of_turn stt.turn event to begin generating a reply before the caller has finished speaking, then commit on end_of_turn or discard on turn_resumed. A tts.staged event reports when the audio is ready. Staged utterances are dropped after TTS_PREFLIGHT_TTL or when the leg ends.

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_tts_preflight"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
textstringrequired
voicestringrequired
model_idstringrequired
languagestringoptional
promptstringoptional
volumeintegerrequired
providerstringoptional
api_keystringoptional

Reply

leg_tts_preflight.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_tts_preflight.result"
request_idstringoptional
dataobjectoptional
tts_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_tts_commit

Play a staged TTS utterance

Starts playback of an utterance staged by leg_tts_preflight. Returns immediately, before synthesis has necessarily finished; failure is reported asynchronously on tts.error, exactly as for leg_tts. Once committed, stop it with leg_play_stop using the same tts_id.

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_tts_commit"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
tts_idstringrequired

Reply

leg_tts_commit.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_tts_commit.result"
request_idstringoptional
dataobjectoptional
tts_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_tts_discard

Drop a staged TTS utterance without playing it

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_tts_discard"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
tts_idstringrequired

Reply

leg_tts_discard.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_tts_discard.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_tts

Synthesize speech and play it into a room mix

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_tts"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
textstringrequired
voicestringrequired
model_idstringrequired
languagestringoptional
promptstringoptional
volumeintegerrequired
providerstringoptional
api_keystringoptional

Reply

room_tts.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_tts.result"
request_idstringoptional
dataobjectoptional
tts_idstringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_transfer

Initiate a SIP REFER transfer (blind or attended)

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_transfer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
targetstringrequired
replaces_leg_idstringoptional

Reply

leg_transfer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_transfer.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD accept_transfer

Accept a parked inbound REFER (send 202 + NOTIFY 100 Trying)

Command frame

FieldTypeDescription
typeconstrequired
Value: "accept_transfer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

accept_transfer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "accept_transfer.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD progress_transfer

Send an interim sipfrag NOTIFY (e.g. 180 Ringing) on an accepted inbound transfer

Command frame

FieldTypeDescription
typeconstrequired
Value: "progress_transfer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
status_codeintegerrequired
reasonstringoptional

Reply

progress_transfer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "progress_transfer.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD complete_transfer

Terminate an accepted inbound transfer with a final sipfrag NOTIFY (200 OK or failure)

Command frame

FieldTypeDescription
typeconstrequired
Value: "complete_transfer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
successbooleanrequired
status_codeintegeroptional
reasonstringoptional

Reply

complete_transfer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "complete_transfer.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD decline_transfer

Reject a parked (not-yet-accepted) inbound REFER (603 by default)

Command frame

FieldTypeDescription
typeconstrequired
Value: "decline_transfer"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
codeintegeroptional
reasonstringoptional

Reply

decline_transfer.result — success reply

FieldTypeDescription
typeconstrequired
Value: "decline_transfer.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_elevenlabs

Attach an ElevenLabs Conversational AI agent to a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_elevenlabs"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
agent_idstringrequired
first_messagestringoptional
languagestringoptional
dynamic_variablesobjectoptional
api_keystringoptional

Reply

leg_agent_elevenlabs.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_elevenlabs.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_vapi

Attach a VAPI agent to a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_vapi"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
assistant_idstringrequired
first_messagestringoptional
variable_valuesobjectoptional
api_keystringoptional

Reply

leg_agent_vapi.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_vapi.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_pipecat

Attach a Pipecat bot to a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_pipecat"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
websocket_urlstringrequired

Reply

leg_agent_pipecat.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_pipecat.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_deepgram

Attach a Deepgram Voice Agent to a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_deepgram"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
settingsobjectoptional
greetingstringoptional
languagestringoptional
api_keystringoptional

Reply

leg_agent_deepgram.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_deepgram.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
leg_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_elevenlabs

Attach an ElevenLabs Conversational AI agent to a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_elevenlabs"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
agent_idstringrequired
first_messagestringoptional
languagestringoptional
dynamic_variablesobjectoptional
api_keystringoptional

Reply

room_agent_elevenlabs.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_elevenlabs.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_vapi

Attach a VAPI agent to a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_vapi"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
assistant_idstringrequired
first_messagestringoptional
variable_valuesobjectoptional
api_keystringoptional

Reply

room_agent_vapi.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_vapi.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_pipecat

Attach a Pipecat bot to a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_pipecat"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
websocket_urlstringrequired

Reply

room_agent_pipecat.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_pipecat.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_deepgram

Attach a Deepgram Voice Agent to a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_deepgram"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
settingsobjectoptional
greetingstringoptional
languagestringoptional
api_keystringoptional

Reply

room_agent_deepgram.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_deepgram.result"
request_idstringoptional
dataobjectoptional
statusstringrequired
room_idstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_stop

Detach the agent attached to a leg

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

leg_agent_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_stop

Detach the agent attached to a room

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_stop"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

room_agent_stop.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_stop.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD leg_agent_message

Inject a text message into a leg agent session

Command frame

FieldTypeDescription
typeconstrequired
Value: "leg_agent_message"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
messagestringrequired

Reply

leg_agent_message.result — success reply

FieldTypeDescription
typeconstrequired
Value: "leg_agent_message.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD room_agent_message

Inject a text message into a room agent session

Command frame

FieldTypeDescription
typeconstrequired
Value: "room_agent_message"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
messagestringrequired

Reply

room_agent_message.result — success reply

FieldTypeDescription
typeconstrequired
Value: "room_agent_message.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD list_sip_registrations

List active SIP AOR registrations

Command frame

FieldTypeDescription
typeconstrequired
Value: "list_sip_registrations"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadnulloptionalNo payload.

Reply

list_sip_registrations.result — success reply

FieldTypeDescription
typeconstrequired
Value: "list_sip_registrations.result"
request_idstringoptional
dataobjectoptional
bindingsarray[object]required
aorstringrequired
contactstringrequired
socketstringrequired
transportstringrequired
user_agentstringoptional
call_idstringoptional
app_idstringoptional
created_atstringrequired
last_refreshstringrequired
expires_atstringrequired
granted_expires_secondsintegerrequired

…or an error frame echoing request_id with {code, message}.

# CMD delete_sip_registration

Force-unbind an AOR (or a single contact under it)

Command frame

FieldTypeDescription
typeconstrequired
Value: "delete_sip_registration"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
aorstringrequired
contactstringoptional

Reply

delete_sip_registration.result — success reply

FieldTypeDescription
typeconstrequired
Value: "delete_sip_registration.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD challenge_leg

Send a 401 digest challenge on a ringing inbound SIP leg (INVITE)

Command frame

FieldTypeDescription
typeconstrequired
Value: "challenge_leg"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
realmstringrequired
usernamestringoptional
passwordstringoptional
ha1stringoptional
algorithmstringoptional
qoparray[string]optional
max_expiresintegeroptional

Reply

challenge_leg.result — success reply

FieldTypeDescription
typeconstrequired
Value: "challenge_leg.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD challenge_registration

Send a 401 digest challenge for a parked inbound REGISTER attempt

Command frame

FieldTypeDescription
typeconstrequired
Value: "challenge_registration"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
realmstringrequired
usernamestringoptional
passwordstringoptional
ha1stringoptional
algorithmstringoptional
qoparray[string]optional
max_expiresintegeroptional

Reply

challenge_registration.result — success reply

FieldTypeDescription
typeconstrequired
Value: "challenge_registration.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD accept_registration

Accept a parked inbound REGISTER attempt (bind and reply 200 OK)

Command frame

FieldTypeDescription
typeconstrequired
Value: "accept_registration"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
max_expiresintegeroptional

Reply

accept_registration.result — success reply

FieldTypeDescription
typeconstrequired
Value: "accept_registration.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD reject_registration

Reject a parked inbound REGISTER attempt (reply 403 by default)

Command frame

FieldTypeDescription
typeconstrequired
Value: "reject_registration"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired
codeintegeroptional
reasonstringoptional

Reply

reject_registration.result — success reply

FieldTypeDescription
typeconstrequired
Value: "reject_registration.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD create_sip_trunk

Create an outbound SIP trunk (REGISTER or static peering)

Command frame

FieldTypeDescription
typeconstrequired
Value: "create_sip_trunk"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
typestringrequired
app_idstringoptional
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
passwordstringrequired
contact_userstringoptional
expires_secondsintegeroptional
ip_ipobjectoptional
peer_uristringoptional

Reply

create_sip_trunk.result — success reply

FieldTypeDescription
typeconstrequired
Value: "create_sip_trunk.result"
request_idstringoptional
dataobjectoptional
idstringrequired
typestringrequired
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD list_sip_trunks

List configured SIP trunks

Command frame

FieldTypeDescription
typeconstrequired
Value: "list_sip_trunks"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadnulloptionalNo payload.

Reply

list_sip_trunks.result — success reply

FieldTypeDescription
typeconstrequired
Value: "list_sip_trunks.result"
request_idstringoptional
dataobjectoptional
trunksarray[object]required
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
ip_ipobjectoptional
peer_uristringoptional

…or an error frame echoing request_id with {code, message}.

# CMD get_sip_trunk

Get a single SIP trunk

Command frame

FieldTypeDescription
typeconstrequired
Value: "get_sip_trunk"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

get_sip_trunk.result — success reply

FieldTypeDescription
typeconstrequired
Value: "get_sip_trunk.result"
request_idstringoptional
dataobjectoptional
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
ip_ipobjectoptional
peer_uristringoptional

…or an error frame echoing request_id with {code, message}.

# CMD delete_sip_trunk

Unregister and remove a SIP trunk

Command frame

FieldTypeDescription
typeconstrequired
Value: "delete_sip_trunk"
request_idstringoptionalEchoed back on the matching .result/error frame; clients use it to correlate.
payloadobjectoptional
idstringrequired

Reply

delete_sip_trunk.result — success reply

FieldTypeDescription
typeconstrequired
Value: "delete_sip_trunk.result"
request_idstringoptional
dataobjectoptional
statusstringrequired

…or an error frame echoing request_id with {code, message}.

# CMD pong

Optional client keepalive reply to a `ping`. Currently a no-op on the server side.

Command frame

FieldTypeDescription
typeconstrequired
Value: "pong"
# CMD stop

Client-initiated graceful close. The server stops the recv loop and closes the connection.

Command frame

FieldTypeDescription
typeconstrequired
Value: "stop"

Events (70) server → client

# EVENT leg.ringing

SIP call ringing (inbound or outbound)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.ringing. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.ringing payload envelope.

# EVENT leg.early_media

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.early_media payload envelope.

# EVENT leg.connected

Leg answered/connected

Event payload shape is documented in openapi.yaml under x-webhooks/leg.connected. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.connected payload envelope.

# EVENT leg.disconnected

Leg hung up (CDR-style nested structure)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.disconnected. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.disconnected payload envelope.

# EVENT leg.joined_room

Leg added to a room

Event payload shape is documented in openapi.yaml under x-webhooks/leg.joined_room. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.joined_room payload envelope.

# EVENT leg.left_room

Leg removed from a room

Event payload shape is documented in openapi.yaml under x-webhooks/leg.left_room. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.left_room payload envelope.

# EVENT leg.muted

Leg muted

Event payload shape is documented in openapi.yaml under x-webhooks/leg.muted. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.muted payload envelope.

# EVENT leg.unmuted

Leg unmuted

Event payload shape is documented in openapi.yaml under x-webhooks/leg.unmuted. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.unmuted payload envelope.

# EVENT leg.deaf

Leg deafened (stops receiving room audio)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.deaf. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.deaf payload envelope.

# EVENT leg.undeaf

Leg undeafened (resumes receiving room audio)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.undeaf. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.undeaf payload envelope.

# EVENT leg.hold

Leg put on hold (local or remote)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.hold. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.hold payload envelope.

# EVENT leg.unhold

Leg taken off hold (local or remote)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.unhold. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.unhold payload envelope.

# EVENT leg.command_failed

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.command_failed payload envelope.

# EVENT leg.stream_added

An additional m=audio stream was negotiated on a live dialog

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_added. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_added payload envelope.

# EVENT leg.stream_removed

An audio stream was disabled with a port-0 re-INVITE; its m-line slot survives as a tombstone

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_removed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_removed payload envelope.

# EVENT leg.stream_rejected

The peer refused an additional audio stream, or it could not be negotiated; the call is unaffected

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_rejected. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_rejected payload envelope.

# EVENT leg.stream_failed

An audio stream's media loop failed and the stream was torn down; the call continues on its remaining streams

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_failed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_failed payload envelope.

# EVENT leg.stream_room_changed

An audio stream was attached to or detached from a room (an empty room_id means detached)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_room_changed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_room_changed payload envelope.

# EVENT leg.stream_role_changed

An audio stream's routing role changed; the room's allow-sets were recomputed atomically

Event payload shape is documented in openapi.yaml under x-webhooks/leg.stream_role_changed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.stream_role_changed payload envelope.

# EVENT siprec.session_started

An inbound SIPREC recording session was accepted; carries the participants and the stream-to-participant bindings

Event payload shape is documented in openapi.yaml under x-webhooks/siprec.session_started. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the siprec.session_started payload envelope.

# EVENT siprec.session_ended

A SIPREC recording session ended

Event payload shape is documented in openapi.yaml under x-webhooks/siprec.session_ended. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the siprec.session_ended payload envelope.

# EVENT siprec.metadata_updated

A SIPREC recording session's metadata document was updated on a re-INVITE

Event payload shape is documented in openapi.yaml under x-webhooks/siprec.metadata_updated. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the siprec.metadata_updated payload envelope.

# EVENT siprec.participant_joined

A party joined the call being recorded by a SIPREC session

Event payload shape is documented in openapi.yaml under x-webhooks/siprec.participant_joined. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the siprec.participant_joined payload envelope.

# EVENT siprec.participant_left

A party left the call being recorded by a SIPREC session

Event payload shape is documented in openapi.yaml under x-webhooks/siprec.participant_left. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the siprec.participant_left payload envelope.

# EVENT dtmf.received

DTMF digit received

Event payload shape is documented in openapi.yaml under x-webhooks/dtmf.received. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the dtmf.received payload envelope.

# EVENT rtt.received

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the rtt.received payload envelope.

# EVENT speaking.started

Participant started speaking

Event payload shape is documented in openapi.yaml under x-webhooks/speaking.started. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the speaking.started payload envelope.

# EVENT speaking.stopped

Participant stopped speaking

Event payload shape is documented in openapi.yaml under x-webhooks/speaking.stopped. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the speaking.stopped payload envelope.

# EVENT playback.started

Playback began

Event payload shape is documented in openapi.yaml under x-webhooks/playback.started. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the playback.started payload envelope.

# EVENT playback.finished

Playback ended

Event payload shape is documented in openapi.yaml under x-webhooks/playback.finished. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the playback.finished payload envelope.

# EVENT playback.error

Playback failed

Event payload shape is documented in openapi.yaml under x-webhooks/playback.error. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the playback.error payload envelope.

# EVENT tts.started

TTS synthesis began playing

Event payload shape is documented in openapi.yaml under x-webhooks/tts.started. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.started payload envelope.

# EVENT tts.finished

TTS synthesis finished playing

Event payload shape is documented in openapi.yaml under x-webhooks/tts.finished. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.finished payload envelope.

# EVENT tts.error

TTS synthesis or playback failed

Event payload shape is documented in openapi.yaml under x-webhooks/tts.error. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.error payload envelope.

# EVENT tts.staged

Preflight TTS finished synthesizing and is ready to commit

Event payload shape is documented in openapi.yaml under x-webhooks/tts.staged. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.staged payload envelope.

# EVENT tts.discarded

Staged TTS was dropped without being played

Event payload shape is documented in openapi.yaml under x-webhooks/tts.discarded. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.discarded payload envelope.

# EVENT recording.started

Recording began

Event payload shape is documented in openapi.yaml under x-webhooks/recording.started. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the recording.started payload envelope.

# EVENT recording.finished

Recording ended

Event payload shape is documented in openapi.yaml under x-webhooks/recording.finished. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the recording.finished payload envelope.

# EVENT recording.paused

Recording paused (audio replaced with silence)

Event payload shape is documented in openapi.yaml under x-webhooks/recording.paused. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the recording.paused payload envelope.

# EVENT recording.resumed

Recording resumed from a paused state

Event payload shape is documented in openapi.yaml under x-webhooks/recording.resumed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the recording.resumed payload envelope.

# EVENT leg.transfer_initiated

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.transfer_initiated payload envelope.

# EVENT leg.transfer_requested

We received a SIP REFER from the peer; decide via accept_transfer/decline_transfer (unless SIP_REFER_AUTO_DIAL=true)

Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_requested. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.transfer_requested payload envelope.

# EVENT leg.transfer_progress

Transfer progress reported via NOTIFY sipfrag

Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_progress. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.transfer_progress payload envelope.

# EVENT leg.transfer_completed

Transfer reached terminal 2xx

Event payload shape is documented in openapi.yaml under x-webhooks/leg.transfer_completed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.transfer_completed payload envelope.

# EVENT leg.transfer_failed

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.transfer_failed payload envelope.

# EVENT room.created

Room created

Event payload shape is documented in openapi.yaml under x-webhooks/room.created. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.created payload envelope.

# EVENT room.deleted

Room deleted

Event payload shape is documented in openapi.yaml under x-webhooks/room.deleted. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.deleted payload envelope.

# EVENT room.bridged

Two rooms' mixers were joined

Event payload shape is documented in openapi.yaml under x-webhooks/room.bridged. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.bridged payload envelope.

# EVENT room.bridge_updated

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.bridge_updated payload envelope.

# EVENT room.unbridged

A bridge was torn down

Event payload shape is documented in openapi.yaml under x-webhooks/room.unbridged. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.unbridged payload envelope.

# EVENT room.routing_changed

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, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the room.routing_changed payload envelope.

# EVENT leg.role_changed

A leg's routing role changed

Event payload shape is documented in openapi.yaml under x-webhooks/leg.role_changed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.role_changed payload envelope.

# EVENT stt.text

Speech-to-text transcript

Event payload shape is documented in openapi.yaml under x-webhooks/stt.text. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the stt.text payload envelope.

# EVENT stt.turn

Speech-to-text turn boundary

Event payload shape is documented in openapi.yaml under x-webhooks/stt.turn. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the stt.turn payload envelope.

# EVENT agent.connected

Agent connected to provider

Event payload shape is documented in openapi.yaml under x-webhooks/agent.connected. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the agent.connected payload envelope.

# EVENT agent.disconnected

Agent session ended

Event payload shape is documented in openapi.yaml under x-webhooks/agent.disconnected. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the agent.disconnected payload envelope.

# EVENT agent.user_transcript

User speech transcribed by agent

Event payload shape is documented in openapi.yaml under x-webhooks/agent.user_transcript. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the agent.user_transcript payload envelope.

# EVENT agent.agent_response

Agent generated a response

Event payload shape is documented in openapi.yaml under x-webhooks/agent.agent_response. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the agent.agent_response payload envelope.

# EVENT amd.result

Answering machine detection completed

Event payload shape is documented in openapi.yaml under x-webhooks/amd.result. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the amd.result payload envelope.

# EVENT amd.beep

Voicemail beep tone detected after machine classification

Event payload shape is documented in openapi.yaml under x-webhooks/amd.beep. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the amd.beep payload envelope.

# EVENT sip.registration_attempt

Inbound REGISTER surfaced for a challenge/accept/reject decision (auto-accepts on consult timeout)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.registration_attempt. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.registration_attempt payload envelope.

# EVENT sip.registration_active

SIP AOR registration created or refreshed (one event per Contact)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.registration_active. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.registration_active payload envelope.

# EVENT sip.registration_expired

SIP AOR registration removed (TTL, explicit unregister, force-delete, or single-binding replacement)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.registration_expired. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.registration_expired payload envelope.

# EVENT sip.outbound_registration_active

Outbound SIP trunk REGISTER accepted (initial or refresh)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.outbound_registration_active. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.outbound_registration_active payload envelope.

# EVENT sip.outbound_registration_failed

Outbound SIP trunk REGISTER failed (transport error, non-2xx response, or digest auth rejected)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.outbound_registration_failed. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.outbound_registration_failed payload envelope.

# EVENT sip.outbound_registration_expired

Outbound SIP trunk removed (DELETE, shutdown, or refresh failed past granted lifetime)

Event payload shape is documented in openapi.yaml under x-webhooks/sip.outbound_registration_expired. Full envelope: {type, timestamp, event_id, instance_id, ...event-specific fields}.

Event frame

Payload is the sip.outbound_registration_expired payload envelope.

# EVENT connected

First frame the server sends after the WebSocket upgrade completes. Carries no data.

Event frame

FieldTypeDescription
typeconstrequired
Value: "connected"
# EVENT ping

Periodic application-level keepalive (every ~30 s), carrying a monotonic per-connection counter in `seq`. Clients may reply with `pong` or ignore.

Event frame

FieldTypeDescription
typeconstrequired
Value: "ping"
seqintegerrequiredPer-connection monotonic keepalive counter starting at 1; resets on reconnect.
event_idintegeroptionalDeprecated alias for seq, kept for backwards compatibility. Unrelated to the per-event event_id on streamed event frames, which is a UUID string. Use seq.
# EVENT events_dropped

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

FieldTypeDescription
typeconstrequired
Value: "events_dropped"
countintegerrequiredNumber of events dropped since the last notification.
# EVENT 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}`.

Event frame

FieldTypeDescription
typeconstrequired
Value: "error"
request_idstringoptional
dataobjectrequired
codeintegerrequired
messagestringrequired

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

FieldTypeDescription
statusstringrequired
room_idstringrequired
leg_idstringrequired

AgentMessageResult

FieldTypeDescription
statusstringrequired

AgentStartLegResult

FieldTypeDescription
statusstringrequired
leg_idstringrequired

AgentStartRoomResult

FieldTypeDescription
statusstringrequired
room_idstringrequired

AgentStopResult

FieldTypeDescription
statusstringrequired

AnswerLegStream

FieldTypeDescription
room_idstringoptional
rolestringoptional

BridgeView

FieldTypeDescription
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

ChannelInfo

FieldTypeDescription
channelintegerrequired
start_msintegerrequired
end_msintegerrequired

CreateTrunkRequest

FieldTypeDescription
typestringrequired
app_idstringoptional
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
passwordstringrequired
contact_userstringoptional
expires_secondsintegeroptional
ip_ipobjectoptional
peer_uristringoptional

CreateTrunkResponse

FieldTypeDescription
idstringrequired
typestringrequired
statusstringrequired

ICECandidateInit

FieldTypeDescription
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired

IPIPTrunkSpec

FieldTypeDescription
peer_uristringoptional

IPIPTrunkView

FieldTypeDescription
peer_uristringoptional

LegStreamView

FieldTypeDescription
idstringrequired
midstringoptional
indexintegerrequired
primarybooleanrequired
statestringrequired
directionstringrequired
desired_directionstringoptional
codecstringoptional
sample_rateintegeroptional
local_portintegeroptional
remote_addrstringoptional
labelstringoptional
contentstringoptional
langstringoptional
room_idstringoptional
rolestringoptional

PlaybackStartResult

FieldTypeDescription
playback_idstringrequired
statusstringrequired

PlaybackStopResult

FieldTypeDescription
statusstringrequired

RecordingPauseResumeResult

FieldTypeDescription
statusstringrequired

RecordingStartResult

FieldTypeDescription
statusstringrequired
filestringrequired

RecordingStopLegResult

FieldTypeDescription
statusstringrequired
filestringrequired

RecordingStopRoomResult

FieldTypeDescription
statusstringrequired
filestringrequired
multi_channel_filestringoptional
channelsobjectoptional
omitted_legsarray[string]optional

RegistrationView

FieldTypeDescription
aorstringrequired
contactstringrequired
socketstringrequired
transportstringrequired
user_agentstringoptional
call_idstringoptional
app_idstringoptional
created_atstringrequired
last_refreshstringrequired
expires_atstringrequired
granted_expires_secondsintegerrequired

RegistrationsResponse

FieldTypeDescription
bindingsarray[object]required
aorstringrequired
contactstringrequired
socketstringrequired
transportstringrequired
user_agentstringoptional
call_idstringoptional
app_idstringoptional
created_atstringrequired
last_refreshstringrequired
expires_atstringrequired
granted_expires_secondsintegerrequired

RoomRoutingView

FieldTypeDescription
matrixobjectrequired

RoutingRowUpdate

FieldTypeDescription
listener_rolestringrequired
sourcesarray[string]required

SIPRECParticipantView

FieldTypeDescription
participant_idstringrequired
aorstringoptional
namestringoptional

SIPRECSessionView

FieldTypeDescription
leg_idstringrequired
session_idstringoptional
data_modestringoptional
room_idstringoptional
participantsarray[object]required
participant_idstringrequired
aorstringoptional
namestringoptional
streamsarray[object]required
leg_stream_idstringrequired
midstringoptional
labelstringoptional
directionstringoptional
codecstringoptional
room_idstringoptional
rolestringoptional
participant_idstringoptional
participant_aorstringoptional
participant_namestringoptional
metadatastringoptional

SIPRECStreamView

FieldTypeDescription
leg_stream_idstringrequired
midstringoptional
labelstringoptional
directionstringoptional
codecstringoptional
room_idstringoptional
rolestringoptional
participant_idstringoptional
participant_aorstringoptional
participant_namestringoptional

SIPRegisterTrunkSpec

FieldTypeDescription
registrar_uristringrequired
aorstringrequired
usernamestringoptional
passwordstringrequired
contact_userstringoptional
expires_secondsintegeroptional

SIPRegisterTrunkView

FieldTypeDescription
registrar_uristringrequired
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional

STTFinalizeResult

FieldTypeDescription
statusstringrequired

STTStartLegResult

FieldTypeDescription
statusstringrequired
leg_idstringrequired

STTStartRoomResult

FieldTypeDescription
statusstringrequired
room_idstringrequired
leg_idsarray[string]required

STTStopResult

FieldTypeDescription
statusstringrequired

TTSDiscardResult

FieldTypeDescription
statusstringrequired

TTSStartResult

FieldTypeDescription
tts_idstringrequired
statusstringrequired

TransferLegResult

FieldTypeDescription
statusstringrequired

TrunkView

FieldTypeDescription
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
ip_ipobjectoptional
peer_uristringoptional

TrunksListResponse

FieldTypeDescription
trunksarray[object]required
idstringrequired
typestringrequired
app_idstringoptional
statusstringrequired
last_errorstringoptional
created_atstringrequired
sip_registerobjectoptional
registrar_uristringrequired
aorstringrequired
usernamestringoptional
contact_uristringoptional
requested_expires_secondsintegerrequired
granted_expires_secondsintegeroptional
last_registered_atstringoptional
next_refresh_atstringoptional
call_idstringoptional
cseqintegeroptional
source_addressstringoptional
ip_ipobjectoptional
peer_uristringoptional

WebRTCCandidatesResult

FieldTypeDescription
candidatesarray[object]required
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired
donebooleanrequired

WebRTCOfferRequest

FieldTypeDescription
sdpstringrequired
app_idstringoptional

WebRTCOfferResult

FieldTypeDescription
leg_idstringrequired
sdpstringrequired

acceptRegistrationPayload

FieldTypeDescription
idstringrequired
max_expiresintegeroptional

acceptTransferPayload

FieldTypeDescription
idstringrequired

addLegPayload

FieldTypeDescription
room_idstringrequired
leg_idstringrequired
mutebooleanoptional
deafbooleanoptional
accept_dtmfbooleanoptional
rolestringoptional

agentDeepgramPayload

FieldTypeDescription
idstringrequired
settingsobjectoptional
greetingstringoptional
languagestringoptional
api_keystringoptional

agentElevenLabsPayload

FieldTypeDescription
idstringrequired
agent_idstringrequired
first_messagestringoptional
languagestringoptional
dynamic_variablesobjectoptional
api_keystringoptional

agentMessagePayload

FieldTypeDescription
idstringrequired
messagestringrequired

agentPipecatPayload

FieldTypeDescription
idstringrequired
websocket_urlstringrequired

agentVAPIPayload

FieldTypeDescription
idstringrequired
assistant_idstringrequired
first_messagestringoptional
variable_valuesobjectoptional
api_keystringoptional

answerLegPayload

FieldTypeDescription
idstringrequired
speech_detectionbooleanoptional
codecstringoptional
streamsarray[object]optional
room_idstringoptional
rolestringoptional

bridgeCreatePayload

FieldTypeDescription
room_idstringrequired
bridge_idstringoptional
peer_room_idstringrequired
directionstringoptional

bridgeListPayload

FieldTypeDescription
room_idstringrequired

bridgeRefPayload

FieldTypeDescription
room_idstringrequired
bridge_idstringrequired

bridgeUpdatePayload

FieldTypeDescription
room_idstringrequired
bridge_idstringrequired
directionstringrequired

challengeLegPayload

FieldTypeDescription
idstringrequired
realmstringrequired
usernamestringoptional
passwordstringoptional
ha1stringoptional
algorithmstringoptional
qoparray[string]optional
max_expiresintegeroptional

challengeRegistrationPayload

FieldTypeDescription
idstringrequired
realmstringrequired
usernamestringoptional
passwordstringoptional
ha1stringoptional
algorithmstringoptional
qoparray[string]optional
max_expiresintegeroptional

completeTransferPayload

FieldTypeDescription
idstringrequired
successbooleanrequired
status_codeintegeroptional
reasonstringoptional

declineTransferPayload

FieldTypeDescription
idstringrequired
codeintegeroptional
reasonstringoptional

deleteLegPayload

FieldTypeDescription
idstringrequired
reasonstringoptional

deleteRegistrationPayload

FieldTypeDescription
aorstringrequired
contactstringoptional

dtmfPayload

FieldTypeDescription
idstringrequired
digitsstringrequired

earlyMediaPayload

FieldTypeDescription
idstringrequired
codecstringoptional

idPayload

FieldTypeDescription
idstringrequired

legAMDStartPayload

FieldTypeDescription
idstringrequired
initial_silence_timeoutintegeroptional
greeting_durationintegeroptional
after_greeting_silenceintegeroptional
total_analysis_timeintegeroptional
minimum_word_lengthintegeroptional
beep_timeoutintegeroptional

legStreamAddPayload

FieldTypeDescription
leg_idstringrequired
directionstringoptional
langstringoptional
contentstringoptional
labelstringoptional
room_idstringoptional
rolestringoptional

legStreamPayload

FieldTypeDescription
leg_idstringrequired
stream_idstringrequired

legStreamRoomPayload

FieldTypeDescription
leg_idstringrequired
stream_idstringrequired
room_idstringrequired
rolestringoptional

legStreamUpdatePayload

FieldTypeDescription
leg_idstringrequired
stream_idstringrequired
rolestringoptional

playbackStartPayload

FieldTypeDescription
idstringrequired
urlstringrequired
tonestringrequired
mime_typestringrequired
repeatintegerrequired
volumeintegerrequired

playbackTargetPayload

FieldTypeDescription
idstringrequired
playback_idstringrequired

playbackVolumePayload

FieldTypeDescription
idstringrequired
playback_idstringrequired
volumeintegerrequired

progressTransferPayload

FieldTypeDescription
idstringrequired
status_codeintegerrequired
reasonstringoptional

recordStartPayload

FieldTypeDescription
idstringrequired
storagestringrequired
multi_channelbooleanrequired
s3_bucketstringrequired
s3_regionstringrequired
s3_endpointstringrequired
s3_prefixstringrequired
s3_access_keystringrequired
s3_secret_keystringrequired
gcs_bucketstringrequired
gcs_object_name_prefixstringrequired
filenamestringrequired

rejectRegistrationPayload

FieldTypeDescription
idstringrequired
codeintegeroptional
reasonstringoptional

roomLegPayload

FieldTypeDescription
room_idstringrequired
leg_idstringrequired

roomRoutingSetPayload

FieldTypeDescription
room_idstringrequired
matrixobjectrequired

roomRoutingUpdatePayload

FieldTypeDescription
room_idstringrequired
updatesarray[object]required
listener_rolestringrequired
sourcesarray[string]required

roomSIPRECStartPayload

FieldTypeDescription
idstringrequired
srs_uristringrequired
leg_idsarray[string]optional
session_idstringoptional
app_idstringoptional
auth_usernamestringoptional
auth_passwordstringoptional
headersobjectoptional

rttPayload

FieldTypeDescription
idstringrequired
textstringrequired

setLegRolePayload

FieldTypeDescription
leg_idstringrequired
rolestringrequired

sttStartPayload

FieldTypeDescription
idstringrequired
languagestringrequired
partialbooleanrequired
providerstringoptional
api_keystringoptional
modelstringoptional
keytermsarray[string]optional
endpointingintegeroptional
utterance_end_msintegeroptional
eager_eot_thresholdnumberoptional
eot_thresholdnumberoptional
eot_timeout_msintegeroptional
language_hintsarray[string]optional

transferLegPayload

FieldTypeDescription
idstringrequired
targetstringrequired
replaces_leg_idstringoptional

ttsStartPayload

FieldTypeDescription
idstringrequired
textstringrequired
voicestringrequired
model_idstringrequired
languagestringoptional
promptstringoptional
volumeintegerrequired
providerstringoptional
api_keystringoptional

ttsTargetPayload

FieldTypeDescription
idstringrequired
tts_idstringrequired

vsiStatusResponse

FieldTypeDescription
statusstringrequired

vsiWebRTCAddCandidatePayload

FieldTypeDescription
idstringrequired
candidateobjectrequired
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired