How to build administrative functions in Twilio Programmable Voice (Conference) - twilio

I'm playing around Twilio programmable Voice (Conference) along with PHP.
I'm unable to implement administrative functions like muting/un-muting all participants, start & stop recording etc by moderator of the conference, I preferably would like to use *1, *2, *3, *4 as keypad presses by moderator to have control over the active ongoing conference call.
Appreciate your feedback.
The flow I've created so far as prototype is working good.
Participant/moderator dials Twilio number
TwiML greets users by and prompts to capture PIN code by using
PIN code validated by action URL on my server
When two participant & moderator joins conference is working.

Twilio developer evangelist here.
In order to achieve this, you need to add a couple of things to your conference.
First, add the hangupOnStar attribute to the <Dial> for your moderator. That will allow the moderator to temporarily leave the conference by dialling *.
When they do, Twilio will request the URL in the action attribute. You will want to respond to that request with TwiML that allows the moderator to perform the muting action, so you'll need a <Gather>. The <Gather> will need an action attribute that receives the Digits pressed by the moderator, performs the action (muting/unmuting) using the REST API and returns TwiML to put the moderator back into the <Conference>.
Does that help?

Related

Twilio Flex Post caller ID's phone number to external webpage

I am setting up a Twilio Flex acct and am wanting when a caller calls and lets say says or presses # 2 I want to ultimately take the callers phone number from the caller id and do a post to an external webpage. I am looking for documentation on this. Anyone have any suggestions?
The Twilio Studio flow I am having issues with it
Twilio developer evangelist here.
By default, incoming calls to a Flex number are directed through a Twilio Studio flow. The default flow passes the caller straight through to get assigned to an agent in Flex, but you can add other widgets to ask for input or direct the call any way you want.
One of the available Studio widgets is the Make HTTP Request widget which allows you to make an HTTP request to a URL of your choice. You can add data to the body of the request using the widget. To get the phone number of the caller you can use the variables set by the inbound trigger. In the case of the phone number of the caller, you need {{trigger.call.From}}.

Twilio Outbound Voice Decisioning

I am trying to have twilio make an outbound call to my bank and enter my information to authenticate.
Unfortunately my bank's IVR menu is not static but rather a limited number of paths that can be taken.
Is there a way to use the Record TwiMl verb and then enter the info for that path?
I'm not sure if this is the possible. TIA.

Twilio Client Call Routing

Looking over the Twilio Client setup am I correct in thinking that for each person I want to route a call to that I need to have a TwiML app set up for that person.
That way they each have a unique name to register with to accept inbound calls. Then I am also limited to only haveing 1,000 apps
Twilio evangelist here.
You should only need to have a single TwiML App, but you can dynamically generate the TwiML returned from that apps Voice Request URL with whatever client name you are trying to reach.
Hope that helps.

Can you do peer to peer calls with Twilio?

If I wanted to create an interoffice phone system with Twilio can you call between two registered clients on Twilio, i.e. can I call my co-worker in the office across from me?
Bonus prize, if you can do that, can you enqueue the call to the other person, essentially creating a multi-line phone for people?
Thanks!
Twilio evangelist here.
Sure, you can absolutely make a Client to Client call. The Twilio Client for JavaScript Quickstart has a walk-through showing you how to do this:
https://www.twilio.com/docs/quickstart/php/client/browser-to-browser-calls
You can also use the Queue verb in a client-to-client call.
Lets say you want to put Call A (lets call them 'customer') into a queue. To do that you would create a new TwiML App and point it at a URL that returns the <Enqueue> verb. When you initiate that client you would use that TwiML Apps SID to generate the Capability token.
Now for Call B (lets call them 'agent'). If you want to connect them to callers in your Queu, you would create another TwiML app whose URL returns TwiML with the <Dial> verb containing the <Queue> noun. This tells Twilio to connect the 'agent' with the first caller in the queue. As with the 'customer', when you initialize the 'agent', you would use the 'agent' specific TwiML App SID to generate the Capability token.
Hope that helps.
Devin

Twilio Voice - Add a person to an exisiting confrence call

I am using Twilio Voice, Now what i want to do is, If i already created a conference call between 2 people, and then while they are talking, they decided to add a 3rd person to the call with them on the conference, Can someone please help me how to have this done with a sample or something ?
Thanks!
Twilio Developer Evangelist here. So, it depends on how this is setup. I presume your conference call TwiML looks like this:
<Response>
<Dial>
<Conference>someroom</Conference>
</Dial>
</Response>
In that case, you can just have another person dial the number and provide the same TwiML to add them to the same conference room. If you want the people on the call to invite someone in, you will need to use so that they can provide the other person's number, or have some sort of web interface. Then use the REST API to dial that person into the conference, again with the same TwiML.
Is this what you needed?

Resources