twilio conference - get dialedin participants phone input - twilio

All the participants to my twilio conference are muted except the presenter.
I need to implement a feature where the dialed in participant wants to ask a question by dialing a key on his phone.
Essentially a 'raise hand' feature. He can then be unmuted by the moderator and allowed to ask his question.
I already have a build in dashboard to mute/unmute the participants.
is there a way that the caller can hit *1 or some combination of keys that I can then use in my callback.
I've tried using * with hanguponstar functionality but it basically exits the caller from the conference.
Thanks,
Amit

Twilio developer evangelist here.
If you use hangupOnStar and add further TwiML after the <Dial> then the call will continue for the user. So, you could do something like:
<Response>
<Dial hangupOnStar="true">
<Conference>MyConferenceRoom</Conference>
</Dial>
<Redirect>/handUp</Redirect>
</Response>
You would redirect the caller through a /handup action. In this action you could register the caller's question and respond with TwiML to dial them back into the <Conference>.
Note, if you have an action attribute for your <Dial> then the call will follow that rather than carry on with the TwiML in the original action.
Let me know if that helps at all.

Related

Gather verb is not working for 1st participant in conference only work for last connected participant

basically I want to connect third participant (A PSTN no) on ongoing call when conference owner press a key
here is my Twiml :-
<Response>
<Dial hangupOnStar="true">
<Conference">PSTNConf</Conference>
</Dial>
<Gather action="/action/url" digits="1"/>
</Response>
this is work fine till second participant not connect when second participant join the conference Gather verb is not work for 1st participant
I want both participants in a conference then Conference owner (1st participant) decided to add third participant using gather verb
Twilio developer evangelist here.
<Gather> cannot actually work with a <Conference>. You can only nest <Say>, <Play> or <Pause> within a <Gather> element.
The nearest you can get to this is to include the hangupOnStar="true" attribute on the <Dial> element as well as an action URL. Then, when one of your callers presses * they will drop out of the conference and Twilio will request the action URL, you can then return TwiML including a <Gather> if you want to take more input, or just use the webhook to dial another caller into the conference.
If you complete the action by returning TwiML that dials the caller back into the original conference, then they will rejoin and continue.
Let me know if that helps at all.

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

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?
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.

TWIML Whisper Announce

I'm using a simple twiml to to forward and record a call. What I would like to do is say a message to the callee to say this is a potential sales call, and it may be recorded. I don't want the caller to hear it.
Here's my current twiml.
<Response>
<Dial record="true">18885551212</Dial>
</Response>
Twilio evangelist here.
You'll need to use the <Number> noun within the <Dial> verb. Number has a parameter named url that lets you give Twilio a URL that returns TwiML to play to the dialed party before they are connected.
There is a How To that walks you through creating a Whisper:
https://www.twilio.com/docs/howto/ivrs-call-screening-and-recording
Hope that helps.

Twilio Conference Call: how to add options menu

Hello to Twilio Developer Evangelists here :)
Is there an easy way to add options menu (not sure if I call it right) to conference call, so all participants have ability to perform some actions by pressing numbers.
At this moment the only way I can see how this can be implemented - add outgoing call with to conference call. But I'm still playing with it, so not sure if this would work...
Thank you!
Twilio evangelist here :)
One way I've done this before is by using the hangupOnStar attribute of the <Dial> verb.
As long as you've not provided an action parameter on the <Dial> verb, if the caller hits * while in the conference room, Twilio will disconnect them from the conference room and execute the next verb in your Twilio document, which could be a <Gather> containing a menu:
<Response>
<Dial hangupOnStar="true">
<Conference>YourConference</Conference>
</Dial>
<Gather action="http://example.com/processConferenceMenu?confName=YourConference" numDigits="1">
<Say>To mute all participants, press one</Say>
<Say>To leave the conference, press two</Say>
</Gather>
</Response>
In the processConferenceMenu endpoint you would process whatever value the caller has input durung the gather and then if needed put then right back into the same conference room.
I've created systems which let users use *6 (the standard self-mute command) without any menu prompts and the lag between when the user leaves and then re-enters the conference muted was barely noticeable.
Hope that helps.

Twilio checking if human representative is on the line

I'm thinking of a scenario where web app with twilio api first makes an outbound call to a customer service number, send digits to get transferred to the agent, and instead of waiting on hold, I would like the web app to detect when human picks up the call and calls the user's phone number. Is there a way to do this?
Twilio evangelist here.
There isn't an automated way to detect that a human has answered the call. You could put a prompt in the phone call that the agent can input in order to indicate that they have answered the call. Something like:
<Response>
<Gather action="process/" numDigits="1">
<Say>Please press one to connect to the incoming call</Say>
</Gather>
</Response>
Hope that helps.

Resources