Add multiple participants to Twilio conference

915 Views Asked by At

I am trying to move our existing call routing backend to conference to make advanced features available. Is there a possibility that I can take (1-1) simple calls that are going on, and place them inside a conference without loosing the connection? Basically I wanna be able to use conference only if specific features in conference (like whisper, barge) are required?

Or, do I have to start the call with the conference leg to be able to do this?

Here's what I've tried:

  1. Start a simple Call from A - B (C1 -> call from browser client to twilio bridge, C2-> bridge to PSTN)
  2. Call connects A to B for voice comms
  3. If conference features are requested, I create new conference and try add both calls conference. It does work sometimes, but more often one of the calls ends up dropping.
1

There are 1 best solutions below

0
On

Twilio developer evangelist here.

The issue you have with one call dropping as you move the other to the conference is that when you move that call, the other call then goes to the next TwiML verb (or the action attribute of a <Dial>). If there is no next TwiML to execute, then the call finishes.

The easiest way to achieve what you want here is to start in a conference.

If you want to achieve this with a 1:1 call first and then a conference, you will need to move the PSTN call first and provide more TwiML after your <Dial> so that the browser client has something to do until you can also move them to the conference. An example here could be to add a <Pause> after the <Dial> that would give you time to update the call using the REST API. Alternatively, if you know what the conference name will be beforehand, you could follow the initial <Dial> with a second <Dial><Conference> and the caller will be dropped straight into that conference as the other leg is moved.