Integrations / Twilio

Bring TwilioTwilio media to Dvaarik

Bridge a customer-owned Twilio call through a bidirectional Media Stream.

adapterlicensed logo

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.

Your responsibility

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.

Twilio carrier response
<Response>
  <Connect>
    <Stream url="wss://your-host/twilio" />
  </Connect>
</Response>

Official references · 13 September 2026

Verify the current stream contract

Protocol references are official starting points, not proof that an account is enabled. Confirm the current carrier contract and account capabilities before implementation.

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.