Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

twilio

dtmf

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.

like image 254
hughes Avatar asked Aug 25 '15 04:08

hughes


People also ask

What happens if someone calls a Twilio number?

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.

How does Twilio handle incoming calls?

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.

What is TwiML in Twilio?

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.


1 Answers

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

<Play digits="94"></Play>
like image 168
hughes Avatar answered Oct 13 '22 04:10

hughes