如何在出站呼叫中从呼叫接收者收集Twilio DTMF输入 [英] How to gather Twilio DTMF input from call recipient on outbound call

查看:102
本文介绍了如何在出站呼叫中从呼叫接收者收集Twilio DTMF输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发Twilio可编程语音应用程序,该应用程序可以从人员列表中进行选择,并向其常规电话号码发出出站呼叫.

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.

一旦呼叫接通,我们希望能够与对方通话,然后从呼叫接收者那里收集dtmf输入,以便根据输入的dtmf代码触发一些特定的TwiML代码.

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可编程语音文档未指定如何在出站呼叫中从呼叫接收者收集dtmf输入,但是我想这在某种程度上是可行的.任何建议或想法将不胜感激!

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!

推荐答案

此处是Twilio开发人员的福音.

Twilio developer evangelist here.

使用Twilio的呼出电话实际上与呼入电话非常相似.当您接到入站呼叫时,Twilio发出webhook请求以查找下一步操作,然后您使用TwiML进行响应,例如

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.

拨打电话时,您开始使用REST API进行调用,然后在调用连接时,Twilio向您的URL发出Webhook请求.在此阶段,您将使用TwiML进行响应以告诉Twilio该怎么做,并且在此阶段您也可以使用<Gather>进行响应.

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.

有帮助吗?

这篇关于如何在出站呼叫中从呼叫接收者收集Twilio DTMF输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆