Question
How can I send or inject DTMF digits into an active call while using bidirectional Media Streams (<Connect><Stream>) without interrupting the existing WebSocket connection?
Product
Programmable Voice, Media Streams
Answer
The raw Media Streams WebSocket protocol does not currently support outbound DTMF injection. Using <Play digits="..."/> is the only way to emit RFC-2833 DTMF, but it requires interrupting and reconnecting the stream.
Consider these alternatives to avoid interrupting the active call:
-
Twilio Conversation Relay: If building an AI voice agent, Conversation Relay natively supports sending mid-call DTMF directly over the WebSocket via a
sendDigitsmessage without dropping the stream. -
Pre-Dialing (
SendDigits): If the IVR path is known in advance, pass theSendDigitsparameter (e.g.,SendDigits="wwww1234#") when creating the outbound call via the REST API to play the tones automatically upon answer.