Wire format
JSON text frames with base64 mu-law media payloads
Integrations / Twilio
Bridge a customer-owned Twilio call through a bidirectional Media Stream.
Wire format
JSON text frames with base64 mu-law media payloads
Sample rate
8 kHz
Flush queued playback
{"event":"clear","streamSid":"..."}
When the caller interrupts, stop generation and flush the carrier's queued audio. Doing only the first half still talks over the caller.
You own the Twilio account, number, webhook, routing, consent, and Twilio charges.
Return TwiML from your voice webhook that opens a bidirectional stream to your bridge.
<Response>
<Connect>
<Stream url="wss://your-host/twilio" />
</Connect>
</Response>Official references · 13 September 2026
Protocol references are official starting points, not proof that an account is enabled. Confirm the current carrier contract and account capabilities before implementation.
Stream element, bidirectional media, and message envelopes.
Machine handoff available
Create /v2/voice/sessions from a trusted server with X-Api-Key. The response returns a short-lived, one-use stream URL; never put the project key in browser code or adapt an earlier account-wide request.