2
votes

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

1 Answers

15
votes

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.