v56

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-0710368288.1 KB
Legs

Fork a single call to an external SIPREC recording server

Originates a SIPREC recording session (RFC 7866) carrying one call as two sendonly sections: what the far end says, and what this server sends them. No room is involved. leg_ids is ignored here — the two sections are fixed. Returns the resulting siprec_out leg; delete it to end the session. Requires SIPREC_SRC_ENABLED=true.

post/legs/{id}/siprec

Request body

srs_uristring required

SIP URI of the session recording server, e.g. "sip:srs@recorder.example.com:5060". A recording session carries the metadata document alongside the SDP and exceeds the UDP message limit, so the target should accept TCP.

leg_idsstring[]

Which participants to record. Each entry is either a leg ID (that leg's own audio) or "<legID>#<streamID>" for one of a leg's secondary audio streams mixed into the room. Empty or absent records every participant. An entry that is not in the room is a 404.

session_idstring

Communication session identifier put in the recording metadata. Defaults to the room ID.

app_idstring

Application identifier tagged onto the resulting leg and its events.

auth_usernamestring

SIP digest username, when the recording server challenges the INVITE.

auth_passwordstring

SIP digest password, when the recording server challenges the INVITE.

headersobject

Extra SIP headers to include in the INVITE. Require: siprec is always sent.

Response

Recording session established

instance_idstring

Instance identifier

idstring required

Unique leg identifier (UUID)

type'sip_inbound' | 'sip_outbound' | 'webrtc' | 'whatsapp_in' | 'whatsapp_out' | 'websocket_in' | 'websocket_out' | 'moq_in' | 'livekit_publish' | 'livekit_participant' required

Leg type

state'ringing' | 'early_media' | 'connected' | 'held' | 'hung_up' required

Leg state

room_idstring

Room ID if the leg is in a room, empty otherwise

mutedboolean required

Whether the leg is muted (cannot be heard by others)

deafboolean required

Whether the leg is deaf (cannot hear others)

accept_dtmfboolean required

Whether the leg receives DTMF digits broadcast from other legs in the same room. Defaults to true.

heldboolean required

Whether the call is on hold (SIP legs only)

rolestring

Routing role used by the room's audio routing matrix (e.g. "customer", "agent", "supervisor"). Empty string means unroled (full mesh).

app_idstring

Application identifier for event stream filtering.

sip_headersobject

Deprecated: X-* headers from the inbound INVITE. Only present on sip_inbound legs. Use headers for new code; it carries the same map plus surfaces handshake headers for websocket legs.

headersobject

Custom protocol headers exposed by the leg's transport — X-/P- headers from a SIP INVITE, the WebSocket upgrade request, or supplied at outbound dial time.