System information

are to be used for servicing callers. Let’s say we have a queue called support, and we
have five queue members with various penalties ranging from 1 through 5. If prior to a
caller entering the queue the QUEUE_MIN_PENALTY channel variable is set to a value of 2
and the QUEUE_MAX_PENALTY is set to a value of 4, only queue members whose penalties
are set to values ranging from 2 through 4 will be considered available to answer that
call:
[Queues]
exten => 7000,1,Verbose(2,Entering the support queue)
same => n,Set(QUEUE_MIN_PENALTY=2) ; set minimum queue member penalty to be used
same => n,Set(QUEUE_MAX_PENALTY=4) ; set maximum queue member penalty we'll use
same => n,Queue(support) ; entering the queue with minimum and maximum
; member penalties to be used
What’s more, during the caller’s stay in the queue, we can dynamically change the
values of QUEUE_MIN_PENALTY and QUEUE_MAX_PENALTY for that caller. This allows either
more or a different set of queue members to be used, depending on how long the caller
waits in the queue. For instance, in the previous example, we could modify the mini-
mum penalty to 1 and the maximum penalty to 5 if the caller has to wait more than 60
seconds in the queue.
The rules are defined using the queuerules.conf file. Multiple rules can be created in
order to facilitate different penalty changes throughout the call. Let’s take a look at
how we’d define the changes described in the previous paragraph:
[more_members]
penaltychange => 60,5,1
If you make changes to the queuerules.conf file and reload
app_queue.so, the new rules will affect only new callers in the queue,
not existing callers.
We’ve defined the rule more_members in queuerules.conf and passed the following values
to penaltychange: 60 is the number of seconds to wait before changing the penalty
values, 5 is the new QUEUE_MAX_PENALTY, and 1 is the new QUEUE_MIN_PENALTY. With our
new rule defined, we must reload app_queue.so to make it available to us for use:
*CLI> module reload app_queue.so
-- Reloading module 'app_queue.so' (True Call Queueing)
== Parsing '/etc/asterisk/queuerules.conf': == Found
We can also verify our rules at the console with queue show rules:
*CLI> queue show rules
Rule: more_members
After 60 seconds, adjust QUEUE_MAX_PENALTY to 5 and adjust QUEUE_MIN_PENALTY to 1
286 | Chapter 13:Automatic Call Distribution (ACD) Queues