Free Accounts & Free Advice

Call Queue

This example shows how to use Twilio's
Queue feature to create a simple
call queuing system. The application serving as the example shows how to accept
an incoming call, place it into a queue. The example then shows how to connect
a live caller with the call waiting in the queue.

For this demonstration, we'll use two Twilio phone numbers - one for callers and
one for agents. By callers and agents, we mean to create a conceptual
distinction between those who enter the queue and those who answer the queue.
A caller could be for example a customer of yours looking for customer service.
An agent then would be an employee helping the customers that we are placing in
the Queue. With this caller/agent distinct, we create one TwiML app for the caller
going into the Queue and another for the agent that we want to answer the
Queue.

Concepts

This example shows how to use the Enqueue verb and the Queue noun to manage
inbound callers and answering agents.

Twilio receives call from agent, and requests TwiML. When Twilio receives
the call to the phone number for agents, Twilio makes a POST request to the
Voice Request URL to connect the agent with the first caller in the Queue.