0

In my simple scenario, single calls to single-agent works perfectly fine with Twilio.device.incoming.

Once it comes to handle many incoming calls to many available agents with hold/unhold feature. Everyone it is recommended to use <conference>. after using conference it is putting customer into a conference call with waitUrl music but how the agent will receive an incoming ring and can accept this new call with hold/unhold feature.

I am using PHP and Javascript SDK. it is using Twilio.Device.incoming.

James Z
  • 12,209
  • 10
  • 24
  • 44
Ashish Dwivedi
  • 109
  • 2
  • 10

1 Answers1

0

Twilio developer evangelist here.

When you receive the incoming webhook and respond by placing the caller into a conference, you should also place a new outbound call to your agent to have them join the conference too.

You can do this with the conference participants resource:

$participant = $twilio->conferences("CONFERENCE_NAME")
                      ->participants
                      ->create("YOUR_TWILIO_NUMBER", "AGENT_ADDRESS");
philnash
  • 70,667
  • 10
  • 60
  • 88