Start streaming call audio to a WebSocket endpoint. Returns a
StreamAction that you can use to
stop the stream or wait for it to finish.
This method emits calling.call.stream events. See Call Events for payload details.
WebSocket URL to stream audio to (e.g., "wss://example.com/stream").
A name for this stream, useful for identifying multiple concurrent streams.
Audio codec for the stream.
"PCMU" — G.711 mu-law (default for North America)"PCMA" — G.711 A-law (default for international)"OPUS" — Opus codec (higher quality, variable bitrate)Which audio track to stream.
"inbound" — audio received from the caller"outbound" — audio sent to the caller"both" — audio in both directionsURL to receive stream status webhooks.
HTTP method for status webhooks.
"GET" — send status updates via GET request"POST" — send status updates via POST requestBearer token for authenticating with the WebSocket server.
Custom key-value pairs sent with the stream start message.
Custom control ID. Auto-generated if not provided.
Callback invoked when the stream ends.
Promise<StreamAction> — An action handle with
stop() and wait() methods.