Twilio documentation提到您可以在用户收听消息时收集用户键盘输入:
You can nest the following verbs within Gather: Say, Play, Pause. But you can't nest Gather within any other verbs.
session 标签不能嵌套在Gather标签内,因此,一旦使用 session 标签将用户数字连接到 session 室,还有另一种方法来收集用户数字吗?
最佳答案
Twilio的传播者在这里。
在电话 session 中无法使用<Gather>
,但可以解决。您可以利用<Dial>
动词hangupOnStar属性。
<Response>
<Dial hangupOnStar="true">
<Conference>example</Conference>
</Dial>
<Gather action="/redirectIntoConference?name=example" numDigits="1"></Gather>
</Response>
当用户按下
*
键时,Twilio将在电话 session 中断开它们的连接,并立即开始收听它们的按键音。聚会结束后,您只需将其重定向回电话 session 中即可。这使您能够执行一些操作,例如将标准
*6
组合键静音。希望能有所帮助。
关于twilio - 使用Twilio,可以在电话 session 期间接收用户输入吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28621852/