Setup
- Ubuntu VM (Azure) behind Caddy reverse proxy (TLS)
- Telnyx Call Control app with bidirectional RTP streaming
- Deepgram Voice Agent API connects and works
- Phone number: US local number via Telnyx
What works
- Inbound/outbound calls connect ✅
call.initiated, call.answered, streaming.started all fire ✅
- WebSocket media stream connects ✅
- Deepgram receives audio from caller (transcribes speech correctly) ✅
- Deepgram generates TTS responses ("Hello! How can I help you?") ✅
- LLM (OpenClaw via chat completions proxy) responds correctly ✅
- Deepgram sends binary TTS audio back (960-byte PCMU chunks) ✅
What doesn't work
- Caller hears nothing. TTS audio never plays on the phone.
- We've tried:
- Raw binary WebSocket frames → silent
- JSON
{event: "media", media: {track: "outbound", payload: base64}, stream_id: ...} → silent
stream_bidirectional_mode: "rtp" with PCMU codec in streaming_start → no difference
Streaming start config
{
"stream_url": "wss://our-host/telnyx/media",
"stream_track": "both_tracks",
"stream_codec": "PCMU",
"stream_bidirectional_mode": "rtp",
"stream_bidirectional_codec": "PCMU",
"stream_bidirectional_sampling_rate": 8000,
"stream_bidirectional_target_legs": "opposite"
}
Key log timeline
18:43:28 - call.initiated
18:43:29 - streaming_start 200 OK
18:43:30 - Deepgram connected, settings applied
18:43:30 - Assistant: Hello! How can I help you?
18:43:30 - streaming.started
18:43:33 - User: Hello? (Deepgram transcribed caller's speech)
18:43:42 - Assistant: Hey there! I'm here. What's on your mind?
18:44:06 - call.hangup
Caller reported hearing nothing throughout the entire call.
Related
Issue #5 (Telnyx outbound audio choppy) was solved by switching from Tailscale to ngrok. We're behind Caddy (TLS reverse proxy) which may have similar WebSocket latency issues, but the audio IS flowing through the WebSocket — it's just not playing on the phone.
Question
What is the exact format Telnyx expects for outbound audio via bidirectional media streaming? Is there a working reference for the Telnyx provider?
Setup
What works
call.initiated,call.answered,streaming.startedall fire ✅What doesn't work
{event: "media", media: {track: "outbound", payload: base64}, stream_id: ...}→ silentstream_bidirectional_mode: "rtp"with PCMU codec instreaming_start→ no differenceStreaming start config
{ "stream_url": "wss://our-host/telnyx/media", "stream_track": "both_tracks", "stream_codec": "PCMU", "stream_bidirectional_mode": "rtp", "stream_bidirectional_codec": "PCMU", "stream_bidirectional_sampling_rate": 8000, "stream_bidirectional_target_legs": "opposite" }Key log timeline
Caller reported hearing nothing throughout the entire call.
Related
Issue #5 (Telnyx outbound audio choppy) was solved by switching from Tailscale to ngrok. We're behind Caddy (TLS reverse proxy) which may have similar WebSocket latency issues, but the audio IS flowing through the WebSocket — it's just not playing on the phone.
Question
What is the exact format Telnyx expects for outbound audio via bidirectional media streaming? Is there a working reference for the Telnyx provider?