2
votes

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

2 Answers

3
votes

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.

2
votes

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 will looks like the following :

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

Hope it helps.