VSI

Last updated May 26, 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 (73) 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

Currently returns a 501 error directing clients to use POST /v1/legs. Reserved for the future when the originate flow is fully extracted into a do* helper.

Command frame

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

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

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_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

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

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

…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

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

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_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 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 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 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 (50) 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, instance_id, ...event-specific fields}.

Event frame

Payload is the leg.command_failed 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, instance_id, ...event-specific fields}.

Event frame

Payload is the tts.error payload envelope.

# EVENT recording.started

Recording began

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

Event frame

Payload is the recording.started payload envelope.

# EVENT recording.finished

Recording ended

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

Event frame

Payload is the recording.finished payload envelope.

# 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, 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, 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, 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

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

Event frame

Payload is the leg.transfer_requested payload envelope.

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

Event frame

Payload is the stt.text 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, 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, 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, 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, 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, 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, instance_id, ...event-specific fields}.

Event frame

Payload is the amd.beep 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). Clients may reply with `pong` or ignore.

Event frame

FieldTypeDescription
typeconstrequired
Value: "ping"
# 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

BridgeView

FieldTypeDescription
idstringrequired
room_idstringrequired
directionstringrequired
sample_rateintegerrequired

ChannelInfo

FieldTypeDescription
channelintegerrequired
start_msintegerrequired
end_msintegerrequired

ICECandidateInit

FieldTypeDescription
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired

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

RoomRoutingView

FieldTypeDescription
matrixobjectrequired

RoutingRowUpdate

FieldTypeDescription
listener_rolestringrequired
sourcesarray[string]required

STTStartLegResult

FieldTypeDescription
statusstringrequired
leg_idstringrequired

STTStartRoomResult

FieldTypeDescription
statusstringrequired
room_idstringrequired
leg_idsarray[string]required

STTStopResult

FieldTypeDescription
statusstringrequired

TTSStartResult

FieldTypeDescription
tts_idstringrequired
statusstringrequired

TransferLegResult

FieldTypeDescription
statusstringrequired

WebRTCCandidatesResult

FieldTypeDescription
candidatesarray[object]required
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired
donebooleanrequired

WebRTCOfferRequest

FieldTypeDescription
sdpstringrequired

WebRTCOfferResult

FieldTypeDescription
leg_idstringrequired
sdpstringrequired

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

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

deleteLegPayload

FieldTypeDescription
idstringrequired
reasonstringoptional

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

playbackStartPayload

FieldTypeDescription
idstringrequired
urlstringrequired
tonestringrequired
mime_typestringrequired
repeatintegerrequired
volumeintegerrequired

playbackTargetPayload

FieldTypeDescription
idstringrequired
playback_idstringrequired

playbackVolumePayload

FieldTypeDescription
idstringrequired
playback_idstringrequired
volumeintegerrequired

recordStartPayload

FieldTypeDescription
idstringrequired
storagestringrequired
multi_channelbooleanrequired
s3_bucketstringrequired
s3_regionstringrequired
s3_endpointstringrequired
s3_prefixstringrequired
s3_access_keystringrequired
s3_secret_keystringrequired

roomLegPayload

FieldTypeDescription
room_idstringrequired
leg_idstringrequired

roomRoutingSetPayload

FieldTypeDescription
room_idstringrequired
matrixobjectrequired

roomRoutingUpdatePayload

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

rttPayload

FieldTypeDescription
idstringrequired
textstringrequired

setLegRolePayload

FieldTypeDescription
leg_idstringrequired
rolestringrequired

sttStartPayload

FieldTypeDescription
idstringrequired
languagestringrequired
partialbooleanrequired
providerstringoptional
api_keystringoptional

transferLegPayload

FieldTypeDescription
idstringrequired
targetstringrequired
replaces_leg_idstringoptional

ttsStartPayload

FieldTypeDescription
idstringrequired
textstringrequired
voicestringrequired
model_idstringrequired
languagestringoptional
promptstringoptional
volumeintegerrequired
providerstringoptional
api_keystringoptional

vsiStatusResponse

FieldTypeDescription
statusstringrequired

vsiWebRTCAddCandidatePayload

FieldTypeDescription
idstringrequired
candidateobjectrequired
candidatestringrequired
sdpMidstringrequired
sdpMLineIndexintegerrequired
usernameFragmentstringrequired