Keywords: asterisk

## queues.conf

First of all, set up call queues in queue.conf

Here is an example:

-        =========== queues.conf ===========
         | ; Cool Digium Queues            |
         | [general]                       |
         | persistentmembers = yes         |
         |                                 |
         | ; General sales queue           |
         | [sales-general]                 |
         | music=default                   |
         | context=sales                   |
         | strategy=ringall                |
         | joinempty=strict                |
         | leavewhenempty=strict           |
         |                                 |
         | ; Customer service queue        |
         | [customerservice]               |
         | music=default                   |
         | context=customerservice         |
         | strategy=ringall                |
         | joinempty=strict                |
         | leavewhenempty=strict           |
         |                                 |
         | ; Support dispatch queue        |
         | [dispatch]                      |
         | music=default                   |
         | context=dispatch                |
         | strategy=ringall                |
         | joinempty=strict                |
         | leavewhenempty=strict           |
         ===================================

In the above, we have defined 3 separate calling queues: sales-general, customerservice, and dispatch.

Please note that the sales-general queue specifies a context of "sales", and that customerservice specifies the context of "customerservice", and the dispatch queue specifies the context "dispatch". These three contexts must be defined somewhere in your dialplan. We will show them after the main menu below.

In the [general] section, specifying the persistentmembers=yes, will cause the agent lists to be stored in astdb, and recalled on startup.

The strategy=ringall will cause all agents to be dialed together, the first to answer is then assigned the incoming call.

"joinempty" set to "strict" will keep incoming callers from being placed in queues where there are no agents to take calls. The Queue() application will return, and the dial plan can determine what to do next.

If there are calls queued, and the last agent logs out, the remaining incoming callers will immediately be removed from the queue, and the Queue() call will return, IF the "leavewhenempty" is set to "strict".