Creating stream
A stream object can be started in the following ways: 1. Starting a stream via the REST API API reference: Start streaming media from a call Using the REST API, an application can explicitly start streaming media from an active call. When this endpoint is invoked, a stream object is created and audio begins streaming from the specified call according to the provided configuration. This method allows streaming to be initiated dynamically at any point during the call lifecycle. 2. Starting a stream via the TeXML<Stream> verb
Streams can also be initiated as part of TeXML execution using the <Stream> verb, which supports two operational modes:
- Asynchronous streaming via
<Start>
<Stream> verb is nested inside a <Start> verb, the stream is started asynchronously. In this mode, streaming begins in parallel with the ongoing call flow, allowing audio to be streamed without interrupting or blocking other TeXML instructions.
- Synchronous streaming via
<Connect>
<Stream> verb is nested inside a <Connect> verb, streaming is initiated synchronously. In this mode, the call flow waits for the streaming operation to stop before proceeding to the next TeXML instruction.
In both cases, execution of the <Stream> verb results in the creation of a stream object associated with the active call.