---
title: "Streaming start"
method: POST
path: "/calls/{call_control_id}/actions/streaming_start"
tags: ["Call Commands"]
---

# Streaming start

`POST /calls/{call_control_id}/actions/streaming_start`

Start streaming the media from a call to a specific WebSocket address or Dialogflow connection in near-realtime. Audio will be delivered as base64-encoded RTP payload (raw audio), wrapped in JSON payloads.

Please find more details about media streaming messages specification under the [link](https://developers.telnyx.com/docs/voice/programmable-voice/media-streaming).

## Path parameters

- `call_control_id` string, required

## Request body

- StartStreamingRequest
  - `stream_url` string — The destination WebSocket address where the stream is going to be delivered.
  - `stream_track` 'inbound_track' | 'outbound_track' | 'both_tracks' — Specifies which track should be streamed.
  - `stream_codec` 'PCMU' | 'PCMA' | 'G722' | 'OPUS' | 'AMR-WB' | 'L16' | 'default' — Specifies the codec to be used for the streamed audio. When set to 'default' or when transcoding is not possible, the codec from the call will be used.
  - `stream_bidirectional_mode` 'mp3' | 'rtp' — Configures method of bidirectional streaming (mp3, rtp).
  - `stream_bidirectional_codec` 'PCMU' | 'PCMA' | 'G722' | 'OPUS' | 'AMR-WB' | 'L16' — Indicates codec for bidirectional streaming RTP payloads. Used only with stream_bidirectional_mode=rtp. Case sensitive.
  - `stream_bidirectional_target_legs` 'both' | 'self' | 'opposite' — Specifies which call legs should receive the bidirectional stream audio.
  - `stream_bidirectional_sampling_rate` 8000 | 16000 | 22050 | 24000 | 48000 — Audio sampling rate.
  - `enable_dialogflow` boolean — Enables Dialogflow for the current call. The default value is false.
  - `dialogflow_config` DialogflowConfig
    - `analyze_sentiment` boolean — Enable sentiment analysis from Dialogflow.
    - `partial_automated_agent_reply` boolean — Enable partial automated agent reply from Dialogflow.
  - `client_state` string — Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
  - `command_id` string — Use this field to avoid duplicate commands. Telnyx will ignore any command with the same `command_id` for the same `call_control_id`.
  - `custom_parameters` object[] — Custom parameters to be sent as part of the WebSocket connection.
    - `name` string — The name of the custom parameter.
    - `value` string — The value of the custom parameter.
  - `stream_auth_token` string — An authentication token to be sent as part of the WebSocket connection. Maximum length is 4000 characters.

## Response `200`

Successful response upon making a call control command.

- object
  - `data` CallControlCommandResult
    - `result` string

## Other responses

- `422` — Unprocessable entity. The request was well-formed but could not be processed due to semantic errors. This includes validation errors, invalid parameter values, call state errors, conference errors, queue errors, recording/transcription errors, and business logic violations.
- `default` — Unexpected error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api/versions/e32d46c5945b/schema)
