Media Streaming
Media streaming is how Teler hands you raw call audio in real time. When your
Call Flow returns a stream
action, Teler opens a WebSocket to your ws_url and streams base64-encoded PCM
audio in both directions for the duration of the call.
What it’s for
Section titled “What it’s for”- AI voice agents: pipe caller audio to STT/LLM/TTS, send the response back.
- Live transcription: consume audio one-way and feed your transcription pipeline.
- Real-time analysis: fraud detection, sentiment scoring, compliance monitoring.
How it works
Section titled “How it works”| Step | What happens |
|---|---|
| 1 | A call starts (inbound to your Teler number, or outbound via the API). |
| 2 | Teler POSTs your flow URL asking what to do. |
| 3 | You return a stream flow with a ws_url. |
| 4 | Teler opens a WebSocket to your ws_url. |
| 5 | Audio flows: Teler → your bridge (caller’s voice) and your bridge → Teler (audio to play to the caller). |
| 6 | The call ends. Teler closes the WebSocket. |
Audio format
Section titled “Audio format”| Property | Value |
|---|---|
| Encoding | audio/l16 (linear 16-bit PCM) |
| Channels | mono (1) |
| Sample rate | The Stream flow’s sample_rate accepts "8k" or "16k" (default "8k"), but the start message currently always advertises 8000 |
| Transport | base64 strings inside JSON messages |
What you’ll find here
Section titled “What you’ll find here” WebSocket Messages The five JSON message types: start, audio (in/out), interrupt, clear.
Bridge Architecture and call lifecycle for inbound and outbound streams.
Recipes Reference integrations with OpenAI Realtime, ElevenLabs, Gemini, and more.
Stream Webhooks Lifecycle events for media stream creation and termination.