Can I send digits to an incoming twilio call with twiml?
Asked Answered
E

1

9

I have a twilio number that can process incoming calls with twiml. These incoming calls expect the recipient to press some digits after the call is connected.

If I were making an outgoing call, I could use the sendDigits attribute of a <Dial> tag. However, I can't figure out how to do this in response to an incoming call.

If I were receiving the call in a web client, I could use connection.sendDigits

Is there a way to do this in just twiml? Should I just play a recording file of various DTMF tones?

Edit: To clarify, I'm receiving calls from another automated system that expects additional numbers to be dialed after the call is connected.

Egotist answered 25/8, 2015 at 4:47 Comment(0)
E
11

Turns out the way to to do this is by using the <Play> twiml tag, which accepts a digits attribute.

<Play digits="94"></Play>
Egotist answered 25/8, 2015 at 20:51 Comment(2)
What if I want to hear the calling party's prompt or a real person before deciding to press some digitsTransalpine
This saved me a day of pain.Carder

© 2022 - 2024 — McMap. All rights reserved.