Start streaming media from a call.
POST/texml/Accounts/:account_sid/Calls/:call_sid/Streams.json
Starts streaming media from a call to a specific WebSocket address.
Request
Path Parameters
The id of the account the resource belongs to.
The CallSid that identifies the call to update.
- application/x-www-form-urlencoded
Body
Start streaming media from a call
Url where status callbacks will be sent.
Possible values: [GET
, POST
]
Default value: POST
HTTP method used to send status callbacks.
Possible values: [inbound_track
, outbound_track
, both_tracks
]
Default value: inbound_track
Tracks to be included in the stream
The user specified name of Stream.
Possible values: [mp3
, rtp
]
Default value: mp3
Configures method of bidirectional streaming (mp3, rtp).
Possible values: [PCMU
, PCMA
, G722
]
Default value: PCMU
Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive.
The destination WebSocket address where the stream is going to be delivered.
Responses
200: Successful call streaming create response
- application/json
404: Resource not found
- application/json
Request samples
curl -L -X POST 'https://api.telnyx.com/v2/texml/Accounts/:account_sid/Calls/:call_sid/Streams.json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"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": "Fri, 11 Aug 2023 19:12:11 +0000",
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls/v3:KBnLO0ZK3DhKM5s7bE9VluaSmKsOchKht_fUYvxcp8ysbmzCCtpkmA/Streams/b08f0fa1-a32c-4218-b3b5-9cf78941ccac.json"
}
{
"errors": [
{
"detail": "Resource not found"
}
]
}