Call streaming

Start call streaming

Changed on

Starts streaming the audio of the call identified by call_id to the WebSocket destination in stream_url, in the direction (stream_type) and channel (stream_channel) you configure. The streamed audio can include the remote party's voice.

post/v1/calls/{call_id}/streams

Request

  • Base URL
    https://api.wavix.com
  • URL
    https://api.wavix.com/v1/calls/{call_id}/streams
  • Auth
    HTTP bearer

Path parameters

call_idstring uuid required

The uuid of the call.

Request body

stream_urlstring uri required

WebSocket URL (ws:// or wss://) that receives the call's audio.

stream_type'oneway' | 'twoway' required

Specifies the streaming type. Can be either oneway for unidirectional or twoway for bidirectional streaming.

stream_channel'inbound' | 'outbound' | 'both' required

Audio channel to stream: inbound streams the incoming channel (to Wavix), outbound the outbound channel (from Wavix), and both both channels. For bidirectional call streaming, this setting is ignored and only the inbound channel is streamed.

Example request

{
  "stream_url": "wss://examples.com/stream"
}

Response

Returns the created media stream, including its stream_id.

successboolean

Indicates that the request was successful

stream_idstring uuid

Stream ID

Example response

{
  "success": true,
  "stream_id": "123e4567-e89b-12d3-a456-426614174000"
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property type changed from no type to string

    • breaking

      the request property type changed from no type to string

    • warning

      removed from the request property allOf list

    • warning

      removed from the request property allOf list

    • info

      added the new both enum value to the request property

    • info

      added the new inbound enum value to the request property

    • info

      added the new oneway enum value to the request property

    • info

      added the new outbound enum value to the request property

    • info

      added the new twoway enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status