Stream
The Stream
instruction starts streaming the media from a call to a specific WebSocket address in near-real-time. Audio will be delivered as base64-encoded RTP payloads (no headers), wrapped in JSON payloads.
Attributes
ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
---|---|---|---|
url | The destination WebSocket address where the stream is going to be delivered. | - | |
track | Specifies which track should be streamed. | inbound_track , inbound_track , inbound_track | inbound_track |
name | Specifies custom name for the stream instance | - | |
codec | Specifies the codec to be used for the streamed audio. When set to 'default' or when transcoding is not possible, the codec from the call will be used. Currently, transcoding is only supported between PCMU and PCMA codecs. | PCMU , PCMA , G722 , OPUS , AMR-WB ,
default | default |
bidirectionalMode | Bidirectional streaming mode | mp3 , rtp | mp3 |
bidirectionalCodec | Bidirectional streaming codec, used only with bidirectionalMode=rtp | PCMU , PCMA , G722 , OPUS , AMR-WB | PCMU |
Example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Start>
<Stream url="wss://yourdomain.com/stream" track="both_tracks" />
</Start>
</Response>