3

I got two people in the same conference room #1, then I moved only one person to another conference #2, but kept the conference room #1 alive.

I was expecting that Twilio plays the hold music for the person left alone in the conference #1 until the other person goes back from #2 to #1, but since the conference was already started, there was only silence.

How can I make Twilio play the hold music when someone is left alone in the conference room, even though the conference was already started?

Thanks,

Update

I saw the new participant hold feature, tried to use it instead but no luck as well. See here: https://github.com/twilio/twilio-php/issues/368

Solved

I found a participant hold feature which does exactly what I want, without having to move an user to another conference. It had a bug (per my update above), but it was fixed. So the solution would be to update the participant with Hold => true:

$this->client
->conferences($conferenceSid)
->participants($memberCallSid)
->update(['Hold' => 'true']);

Moving him to a new conference as suggested here should solve this as well.

2 Answers 2

4

I ran into this issue a while back and was suggested by the twilio support team to transfer the remaining caller to a new empty conference room and this will trigger the hold music. They said you can't play hold music again after the conference room has started.

1
  • 1
    They actually had a bug, and the code I wrote on my Github issue now works. Your suggestion should also work as a workaround though..
    – Brayan
    Aug 29, 2016 at 22:19
3

Besides updating the participant by setting the Hold attribute to true, you need to update the HoldUrl attribute.

According to the Twilio documentation,

The 'HoldUrl' attribute lets you specify a URL for music that plays when a participant is held. The URL may be an MP3, a WAV or a TwiML document that uses Play, Say or Redirect.

Your code should look like below :

$this->client
     ->conferences($conferenceSid)
     ->participants($memberCallSid)
     ->update(
         [
             'Hold' => 'true', 
             'HoldUrl' => 'some url to mp3 file, wav file or twiml'
         ]
     );

Hope it helps.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.