0

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.

1 Answers1

1

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?

philnash
  • 70,667
  • 10
  • 60
  • 88
  • I'm slowly getting there, but I can't wait to thank you for the help and pointing me in right direction. – Mohammed Moinuddin Waseem Dec 05 '18 at 17:45
  • I'm glad it's working for you. Hope the rest of the application goes well! – philnash Dec 09 '18 at 07:18
  • Hi @philnash, one more clarification. I reached performing action muting/unmuting participant during active conference using the REST API. $participant = $twilio->conferences("CFb...")->participants("CA4...")->update(array("muted" => True)); I realized I can only mute/unmute single participant by using CallSid (CAXXXXXXXXXXXXXXX). I also assume from your earlier answer (link below) that I have to keep record of all CallSid in my app using statusCallback` to receive webhooks for each participant joining the conference. Kindly confirm. https://stackoverflow.com/questions/42481929 – Mohammed Moinuddin Waseem Dec 09 '18 at 16:58
  • 1
    In order to keep all the CallSids that were part of the conference, then yes, I recommend you store them when you receive the webhook. If you just need to enumerate the participants during the conference, you can use the [participants resource to list the current participants](https://www.twilio.com/docs/voice/api/conference-participant). – philnash Dec 10 '18 at 05:45