kevev22
kevev22

Reputation: 3775

Play wait music whenever there is only a single participant in a Twilio conference

I'm creating a Twilio conference that will contain at most 2 participants - an agent and a prospect. startConferenceOnEnter and endConferenceOnExit are true for the agent, and false for the prospect. The agent will stay on the line and multiple prospects will come and go but only one at a time.

In Twilio, when a conference first starts and there is only one participant you are able to play wait music by specifying a waitUrl. When another participant joins the wait is over and the music stops. If one of the participants leaves, is it possible to start the waitUrl music for the single participant (agent) again?

Additionally I would like to avoid putting the agent on hold if possible, unless it's possible to "automatically" take them off hold when another participant joins (ie without having to set up a webhook for participant-join).

Upvotes: 0

Views: 131

Answers (1)

Alan
Alan

Reputation: 10781

You cat set the EndConferenceOnExit to true for the prospect as well, then continually redirect the agent into another conference with the same name. It will have a different conference SID but otherwise do what you want.

Upvotes: 1

Related Questions