O'Reilly logo

Twilio Cookbook Second Edition by Roger Stringer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting the first caller in the queue

Next, we're going to build on our first call queue system and a proper queue manager.

For this, we're going to create our queue a little differently; first, we want to create the queue in advance so that we can get the queue SID. You can also use a queue you previously created using the wait-times.php recipe.

This queue will also work by calling an agent directly rather than having an agent call in, and once they finish their call, the agent will then be connected to the next caller in the queue.

Getting started

The complete code for this recipe can be found in the Code/Recipe4/ folder.

How to do it…

OK, let's set up our files to place all incoming calls in a queue and then call the agent, by performing the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required