System information

; assign the first field of QueueMember to Technology using the hyphen separator
same => n,Set(Technology=${CUT(QueueMember,-,1)})
; assign the second field of QueueMember to Device using the hyphen separator
same => n,Set(Device=${CUT(QueueMember,-,2)})
; Increase the value of the group inside the queue_members category by one
same => n,Set(GROUP(queue_members)=${Technology}-${Device})
; Check if the group@category is greater than 1, and, if so, return Congestion()
; (too many channels)
;
; *** This line should not have any line breaks
same => n,ExecIf($[${GROUP_COUNT(${Technology}-${Device}@queue_members)} > 1]
?Congestion())
; dial the agent
same => n,Dial(${Technology}/${Device})
same => n,Hangup()
The passing back of Congestion() will cause the caller to be returned to the queue (while
this is happening, the caller gets no indication that anything is amiss and keeps hearing
music until we actually connect to the device). While this is not an ideal situation
because the queue will keep trying the member over and over again (or at least include
it in the cycle of agents, depending on how many members you have and their current
statuses), it is better than an agent getting multiple calls at the same time.
We’ve also used this same method to create a type of reservation process. If you want
to call an agent directly (for example, if the caller needs to follow up with a particular
agent), you could reserve that agent by using the GROUP() and GROUP_COUNT() functions
to essentially pause the agent in the queue until the caller can be connected. This is
particularly useful in situations where you need to play some announcements to the
caller prior to connecting her with the agent, but you don’t want the agent to get con-
nected to another caller while the announcements are being played.
Queue Statistics: The queue_log File
The queue_log file located in /var/log/asterisk/ contains information about the queues
defined in your system (when a queue is reloaded, when queue members are added or
removed, etc.) and about calls into the queues (e.g., their status and what channels the
callers were connected to). The queue log is enabled by default, but can be controlled
via the logger.conf file. There are three options related to the queue_log file specifically:
queue_log
Controls whether the queue log is enabled or not. Valid values are yes or no (de-
faults to yes).
296 | Chapter 13:Automatic Call Distribution (ACD) Queues