REST ClientCalling

stream

View as MarkdownOpen in Claude

Start streaming audio from an active call to a WebSocket endpoint. This is commonly used for real-time speech processing, analytics, or archival. Pass a control_id to name the stream so you can stop it later with stream_stop(). The response never carries control_id back — omit it and you have no way to stop this stream afterward.

Request

idstringRequiredformat: "uuid"
The unique identifying ID of an existing call.
paramsobjectRequired
An object of parameters that will be utilized by the active command.

Response

Call LegobjectRequired
Returned when the call is a standard PSTN, SIP, or WebRTC call.
OR
Fabric Subscriber Device LegobjectRequired

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
client.calling.stream(
call_id="call-id-xxx",
control_id="stream-1",
url="wss://example.com/audio-stream",
)