Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page

Fork Stream


Studio widgets represent various parts of Twilio's functionality that you can combine in your Studio Flow to build out robust applications that don't require you to do any coding.

(information)

Info

New to Twilio Studio? Check out our Getting Started guide.

The Fork Stream widget allows you to send real-time audio streams of a phone call over the Internet. Websocket and SIPREC protocols are supported.

Fork Stream widget with stream_1 label and websocket URL wss://twilio.com.

Required Configuration for Fork Stream

required-configuration-for-fork-stream page anchor

The Fork Stream widget requires an action specification to function properly. The action designates whether the Flow should start or stop streaming the phone call.

NameDescriptionExample
ActionWhether you want to Start or Stop a stream.Start

Optional Configuration for Fork Stream

optional-configuration-for-fork-stream page anchor

The Fork Stream widget also accepts a number of configuration options that you can use to configure Stream properties and additional parameters to be sent.

NameDescriptionExample
Stream NameFriendly name given to the Stream.AudioStream
Stream TypeTransport protocol, one of WebSocket or SIPREC.WebSocket
URLURL of the service where to stream the audio. This is required when the Stream Type is WebSocket. The only supported protocol is wss.wss://cool.process.io
Connector NameName of the Twilio Marketplace Add-on use to configure the Stream. This is required when Stream Type is SIPREC.Gridspace_1
TracksSelect audio streams to be sent. Can be any of: Inbound Track, Outbound Track or Both TracksInbound Track
Stream ParametersZero or more extra parameters expressed as key/value pairs that will be sent to the remote service during connection.Key: Custom1, Value: Bob

These events trigger transitions from this widget to another widget in your Flow. For more information on working with Studio transitions, see this guide.

NameDescription
NextFires immediately after the Stream connection has been created (Start) or terminated (Stop).

Example: Fork for Processing

example-fork-for-processing page anchor

In the call flow screenshot below the audio streams of an incoming call are forked for real-time processing while the call is bridged to another phone number.

Flow diagram showing trigger options leading to websocket start, call connection, and websocket stop.

Now that you know the basics of the Fork Stream widget, why not learn more about Media Streams?

Let's build something amazing.