I am able to put the conference call on hold, but I would like Twilio to say something like 'This call has been put on hold' to all participants before the music starts playing.
I've been trying to do something like this, but it's not working:
response = Twilio::TwiML::Response.new do |r|
# Loop over participants and print out a property for each one
@client.account.conferences.get(@conference_sid).participants.list.each do |participant|
participant.update(:hold => false) if !params[:hold]
participant.update(:hold => true)
r.Say 'This call has been put on hold.'
I'm not a Ruby developer but I'm a twilio expert.
Hold attribute, you should update the
HoldUrl attribute to
HoldUrl twiml will look like the following.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Say>This call has been put on hold</Say> <Redirect>http://twimlets.com/holdmusic?Bucket=com.twilio.music.classical</Redirect> </Response>
Reference : 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.