With Twilio, is it possible to receive user input during a conference call?

五迷三道 提交于 2019-12-08 01:04:09

问题


The Twilio documentation mentions that you can collect user keypad input while they are listening to a message:

You can nest the following verbs within Gather: Say, Play, Pause. But you can't nest Gather within any other verbs.

The Conference tag cannot be nested within the Gather tag, so is there another way to collect user digits once they are connected to a conference room using the Conference tag?


回答1:


Twilio evangelist here.

There isn't a way to <Gather> while in a conference call, but there is a work around. You can leverage the <Dial> verbs hangupOnStar attribute.

<Response>
    <Dial hangupOnStar="true">
        <Conference>example</Conference>
    </Dial>
    <Gather action="/redirectIntoConference?name=example" numDigits="1"></Gather>
</Response>

When the user presses the * key, Twilio will disconnect them fro mthe conference call and immediately start to listen for them to press tones. When the Gather completes you would just redirect them back into the conference call.

This enables you to do things like the standard *6 key combination to mute.

Hope that helps.



来源:https://stackoverflow.com/questions/28621852/with-twilio-is-it-possible-to-receive-user-input-during-a-conference-call

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