System information

With our rule now loaded into memory, we can modify our dialplan to make use of it.
Just modify the Queue() line to include the new rule, like so:
[Queues]
exten => 7000,1,Verbose(2,Entering the support queue)
same => n,Set(QUEUE_MIN_PENALTY=2) ; set minimum queue member penalty
same => n,Set(QUEUE_MAX_PENALTY=4) ; set maximum queue member penalty
; Queue(queuename[,options[,URL[,announceoverride[,timeout[,AGI[,macro
; [,gosub[,rule[,position]]]]]]]]])
same => n,Queue(support,,,,,,,,more_members) ; entering queue with minimum and
; maximum member penalties
The queuerules.conf file is quite flexible. We can define our rule using relative instead
of absolute penalty values, and we can define multiple rules:
[more_members]
penaltychange => 30,+1
penaltychange => 45,,-1
penaltychange => 60,+1
penaltychange => 120,+2
Here, we’ve modified our more_members rule to use relative values. After 30 seconds, we
increase the maximum penalty by 1 (which would take us to 5 using our sample
dialplan). After 45 seconds, we decrease the minimum penalty by 1, and so on. We can
verify our new rule changes after a module reload app_queue.so at the Asterisk console:
*CLI> queue show rules
Rule: more_members
After 30 seconds, adjust QUEUE_MAX_PENALTY by 1 and adjust QUEUE_MIN_PENALTY by 0
After 45 seconds, adjust QUEUE_MAX_PENALTY by 0 and adjust QUEUE_MIN_PENALTY by -1
After 60 seconds, adjust QUEUE_MAX_PENALTY by 1 and adjust QUEUE_MIN_PENALTY by 0
After 120 seconds, adjust QUEUE_MAX_PENALTY by 2 and adjust QUEUE_MIN_PENALTY by 0
Announcement Control
Asterisk has the ability to play several announcements to callers waiting in the queue.
For example, you might want to announce the caller’s position in the queue, the average
wait time, or make periodic announcements thanking your callers for waiting (or what-
ever your audio files say). It’s important to tune the values that control when these
announcements are played to the callers, because announcing their position, thanking
them for waiting, and telling them the average hold time too often may annoy them,
causing them to either hang up or take it out on your agents.
There are several options in the queues.conf file that you can use to fine-tune what and
when announcements are played to your callers. The full list of queue options is avail-
able in “The queues.conf File” on page 275, but we’ll review the relevant ones here.
Table 13-5 lists the options you can use to control when announcements are played to
the caller.
Advanced Queues | 287