Adding incoming callers to a call queue
In this recipe, we're going to set up a simple call queue. We're going to have this work with two separate numbers: one number is the number that the callers will call on and a second number will handle the agents who call in.
Callers will get placed in a queue, and when an agent calls the agent number, they will be connected to the first caller who is waiting to speak to someone.
Getting started
The complete code for this recipe can be found in the Code/Recipe1/
folder.
How to do it…
OK, let's set up our listener.php
file to place all incoming calls in a queue and agent.php
to connect our agents to callers by performing the following steps:
Download the Twilio Helper Library available at https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.Upload
config.php
to your web server using the following code:<?php $accountsid = ''; // YOUR TWILIO ACCOUNT SID $authtoken = ''; // YOUR TWILIO...