twiliovoice

Play a menu to a participant in a conference


I have built an integration with Twilio Voice. My software has a built in queue mechanism, so we dont want to hand off the management of the Queue to Twilio.

We use conferences to place callers into a "queue like" state. Our software selects an agent and then joins them to the conference.

While in the conference, and prior to an agent joining I would like to give the waiting caller options to choose to leave a voice mail.

I can see there the api supports an announceUrl which at least would allow us to play a message to the customer, but is there a mechanism to play offer a menu without taking the caller out of the conference?


Solution

  • I took the approach of generating a queue per call.

    When an agent is available I make use of this feature https://www.twilio.com/docs/voice/api/call-resource#update-a--call-in-progress-with-url to generate a conference and move the call into it.

    The agent is added via the conference status callback.