How to gather Twilio DTMF input from call recipient on outbound call

岁酱吖の 提交于 2019-12-13 03:34:11

问题


We're developing a Twilio programmable voice app that can select from a list of persons, and place an outbound call to their regular telephone number.

Once the call is connected, we want to be able to speak to the party and then gather dtmf input from the call recipient in order to trigger some specific TwiML code based on the dtmf code entered.

Twilio programmable voice docs don't specify how to gather dtmf input from a call recipient on an outbound call, but I would like to think this is in some way possible. Any advice or ideas would be appreciated!


回答1:


Twilio developer evangelist here.

Outbound calls with Twilio are actually very similar to inbound calls. When you get an inbound call, Twilio makes the webhook request to find out what to do next and you respond with TwiML, for example a <Gather> when you want to take information.

When you make an outbound call, you start the call with the REST API and then when the call connects Twilio makes a webhook request to your URL. At this stage, you respond with TwiML to tell Twilio what to do and you can respond with a <Gather> at this stage too.

Does that help?



来源:https://stackoverflow.com/questions/53809214/how-to-gather-twilio-dtmf-input-from-call-recipient-on-outbound-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!