Streams

Starts sending selected audio tracks from an active call to a secure WebSocket endpoint. Use it for live call-audio processing; use Conference Streams for an entire voice conference or Video Room Streams for RTMP video broadcasts.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice.

Learn more about API scopes.

post/Accounts/{AccountSid}/Calls/{CallSid}/Streams

Request

  • Base URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
  • URL
    https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams
  • Auth
    HTTP basic

Path parameters

AccountSidstring uuid required

Universal Unique Identifier.

The Project ID that uniquely identifies the Account.

CallSidstring uuid required

Universal Unique Identifier.

The unique identifier for the call.

Request body application/x-www-form-urlencoded

Namestring

Unique name for the Stream, per Call. It is used to stop a Stream by name.

Track'inbound_track' | 'outbound_track' | 'both_tracks'

This attribute can be one of inbound_track, outbound_track, both_tracks. Default is both_tracks.

StatusCallbackMethod'GET' | 'POST'

Whether the request to StatusCallback URL is a GET or a POST. Default is POST.

StatusCallbackstring uri

The URL to request to when stream is available.

Urlstring uri required

Absolute or relative URL. A WebSocket connection to the url will be established and audio will start flowing towards the Websocket server. The only supported protocol is wss. For security reasons ws is NOT supported.

Parameter1.Namestring

Custom parameter name to pass towards the WebSocket server. You can pass up to 99 custom parameters using Parameter1.Name through Parameter99.Name.

Parameter1.Valuestring

Custom parameter value to pass towards the WebSocket server. You can pass up to 99 custom parameters using Parameter1.Value through Parameter99.Value.

Parameter2.Namestring

Custom parameter name to pass towards the WebSocket server.

Parameter2.Valuestring

Custom parameter value to pass towards the WebSocket server.

AuthorizationBearerTokenstring

Bearer token for authorization with the WebSocket server.

Example request

{
  "Name": "my_first_stream",
  "Track": "both_tracks",
  "StatusCallbackMethod": "GET",
  "StatusCallback": "https://your-api-endpoint.com/stream-status",
  "Url": "wss://your-application.com/audiostream",
  "Parameter1.Name": "FirstName",
  "Parameter1.Value": "Jane",
  "Parameter2.Name": "LastName",
  "Parameter2.Value": "Doe",
  "AuthorizationBearerToken": "your-bearer-token"
}

Response

The request has succeeded.

sidstring uuid required

Universal Unique Identifier.

account_sidstring uuid required

Universal Unique Identifier.

call_sidstring uuid required

Universal Unique Identifier.

namestring required

The name of the stream.

status'queued' | 'in-progress' | 'stopped' required

Stream status.

date_updatedstring required

The date, in RFC 2822 GMT format, this stream was updated.

uristring required

The URI for the stream.

Example response

{
  "name": "my_first_stream",
  "date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Streams/b3877c40-da60-4998-90ad-b792e98472st.json"
}

Changes

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • breaking

      the response's property type changed from string to no type, and format from uuid to no format for status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • breaking

      added 'unevaluatedProperties' constraint to the request body

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status

    • info

      added 'unevaluatedProperties' constraint to the response body for the status