Step-by-step call center tutorial part 3

Step-by-step call center tutorial part 3

Creating a call queue

The application we created at the previous step has a flaw: it’s unclear what to do if the second user calls while the first one is still talking to the operator. Our web and mobile SDK can accept multiple incoming calls (and the phone app supports two lines to demonstrate it), but a human operator can speak only with one person at a time. This can be solved by a call queue: while the operator speaks with a user, all other users are waiting in a queue, with optional waiting music being played and/or the synthesized message informing the users about the remaining waiting time.

VoxImplant provides the Call Queue abstraction to automatically handle a queue of incoming calls. To use a queue, you need to create a queue object. Open the VoxImplant control panel, select Settings on the top menu and click Queues. The queue control interface will be displayed. Click Add queue and enter the queue name. At this step, name the queue ‘main’ and click Add to confirm the operation.



After the queue is created, it can be used instead of callUser to enqueue the calls to the call center. But if there’s more than one operator available, how to define which one will receive the call? For this purpose, we have a skill group concept that adds operators into a queue and assigns target operators to handle specific questions. For a call queue to work, you need to add a skill group and users to it. Open the VoxImplant control panel, select Settings on the top menu and click Skills. Click Create skill and enter the skill name. At this step, name the skill ‘general’, select the queue named ‘main’ and click Assign users to select the user you added at the previous step. Click Add to confirm the new skill creation. The call queue itself works like a filter: it allows to enqueue requests only to operators who have all the skills that are set for the specific queue. Queues also provide additional features like priority or maximum wait duration.



  Modify the code created at the previous step by using enqueueACDRequest instead of callUser and subscribing to the queue events:


VoxEngine.addEventListener(AppEvents.CallAlerting, e => {
  const inc =;
  const incId = e.callerid;
  inc.addEventListener(CallEvents.Connected, () => {
    const request = VoxEngine.enqueueACDRequest("main", incId);
    request.addEventListener(ACDEvents.OperatorReached, e => {
      const out = e.operatorCall;
      VoxEngine.sendMediaBetween(inc, out);

With the updated scenario, the second caller will not be connected to the operator until the first finishes his or her conversation. This simple example also has a few pitfalls that you need to keep in mind:

  • Voximplant web phone have special engines to work with the call queues. The operator needs to change his or her status to ‘ready’ to be able to receive calls. If the operator fails to answer the call, he or she becomes non-responsive and the status is changed to ‘banned’ for some time. Then the operator needs to change the status to ‘online’ and then to ‘ready’.
  • Up to this step, the scenario doesn’t have any code to handle user disconnections. So, if a user terminates a phone call, the operator will not be disconnected automatically. To accept the second user’s call, the operator needs to manually click Disconnect. At the next step, we will show how you can handle disconnections properly.

To troubleshoot the call queue, use the queue control panel interface. Click Refresh to the right of the queue row to see the number of users talking to operators, users waiting in the queue and number of operators. All Voximplant control panel features are also available via HTTP API

Tags:call center
B6A24216-9891-45D1-9D1D-E7359CEB8282 Created with sketchtool.


Add your comment

To leave a comment, first confirm that you are not a robot. It's free


Get your free developer account or talk with our sales team to learn more about Voximplant solutions
Contact sales

Please complete this field.

Please complete this field.

Please complete this field.

Choose the solution

Please complete this field.

Please complete this field.