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.
When someone calls your Twilio number, Twilio can invoke a webhook that you've created to determine how to respond using TwiML. On this page, we will be providing some examples of Functions that can serve as the webhook of your Twilio number.
Twilio makes answering a phone call as easy as responding to an HTTP request. When a Twilio phone number receives an incoming call, Twilio will send an HTTP request to your web application, asking for instructions on how to handle the call. Your web application will respond with an XML document containing TwiML.
TwiML (the Twilio Markup Language) is a set of instructions you can use to tell Twilio what to do when you receive an incoming call, SMS, or fax.
Turns out the way to to do this is by using the <Play>
twiml tag, which accepts a digits
attribute.
<Play digits="94"></Play>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With