For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
        • Accounts
        • Applications
        • Calls
          • create
          • delete
          • get
          • list
          • startRecording
          • startStream
          • stopStream
          • update
          • updateRecording
        • Conferences
        • Faxes
        • LAML Bins
        • Messages
        • Phone Numbers
        • Queues
        • Recordings
        • Tokens
        • Transcriptions
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientCompatCalls

startStream

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

stopStream

Next
Built with

Start a media stream on an active call, sending real-time audio to a WebSocket URL.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Project ID that uniquely identifies the Account.
CallSidstringRequiredformat: "uuid"
The unique identifier for the call.

Request

UrlstringRequiredformat: "uri"
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.
NamestringOptional
Unique name for the Stream, per Call. It is used to stop a Stream by name.
TrackenumOptionalDefaults to both_tracks
This attribute can be one of inbound_track, outbound_track, both_tracks. Default is `both_tracks`.
Allowed values:
StatusCallbackMethodenumOptionalDefaults to POST
Whether the request to `StatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
Allowed values:
StatusCallbackstringOptionalformat: "uri"
The URL to request to when stream is available.
Parameter1.NamestringOptional
Custom parameter name to pass towards the WebSocket server. You can pass up to 99 custom parameters using `Parameter1.Name` through `Parameter99.Name`.
Parameter1.ValuestringOptional
Custom parameter value to pass towards the WebSocket server. You can pass up to 99 custom parameters using `Parameter1.Value` through `Parameter99.Value`.
Parameter2.NamestringOptional
Custom parameter name to pass towards the WebSocket server.
Parameter2.ValuestringOptional
Custom parameter value to pass towards the WebSocket server.
AuthorizationBearerTokenstringOptional
Bearer token for authorization with the WebSocket server.

Response

sidstringRequiredformat: "uuid"
The unique identifier for the stream.
account_sidstringRequiredformat: "uuid"
The unique identifier for the account.
call_sidstringRequiredformat: "uuid"
The unique identifier for the call.
namestringRequired
The name of the stream.
statusenumRequired
The status of the stream.
Allowed values:
date_updatedstringRequired
The date, in RFC 2822 GMT format, this stream was updated.
uristringRequired
The URI for the stream.

Response Example

Response
1{
2 "sid": "b3877c40-da60-4998-90ad-b792e98472st",
3 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
4 "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
5 "name": "my_first_stream",
6 "status": "queued",
7 "date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
8 "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"
9}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com",
7});
8
9const stream = await client.compat.calls.startStream("CA...", {
10 Url: "wss://stream.example.com",
11});