Check out our upcoming events and meetups! View events →
Starts streaming media from a call to a specific WebSocket address.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.texml.accounts.calls.streamsJson('call_sid', {
account_sid: 'account_sid',
});
console.log(response.account_sid);{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"name": "My stream",
"status": "in-progress",
"date_updated": "2023-08-11T19:12:11Z",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The id of the account the resource belongs to.
The CallSid that identifies the call to update.
Start streaming media from a call
Url where status callbacks will be sent.
"http://webhook.com/callback"
HTTP method used to send status callbacks.
GET, POST "GET"
Tracks to be included in the stream
inbound_track, outbound_track, both_tracks "both_tracks"
The user specified name of Stream.
"My stream"
Configures method of bidirectional streaming (mp3, rtp).
mp3, rtp "rtp"
Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive.
PCMU, PCMA, G722 "G722"
The destination WebSocket address where the stream is going to be delivered.
"wss://www.example.com/websocket"
Successful call streaming create response
"61bf923e-5e4d-4595-a110-56190ea18a1b"
"v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA"
Identifier of a resource.
"e9cea0be-7dbd-4b98-98b1-c0089d9d43b0"
The user specified name of Stream.
"My stream"
The status of the streaming.
in-progress "in-progress"
"2023-08-11T19:12:11Z"
The relative URI for this streaming resource.
"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.texml.accounts.calls.streamsJson('call_sid', {
account_sid: 'account_sid',
});
console.log(response.account_sid);{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA",
"sid": "e9cea0be-7dbd-4b98-98b1-c0089d9d43b0",
"name": "My stream",
"status": "in-progress",
"date_updated": "2023-08-11T19:12:11Z",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}