System information

For joinempty, prior to placing a caller into the queue, all the members are checked for
availability using the factors you list as criteria. If all members are deemed to be un-
available, the caller will not be permitted to enter the queue, and dialplan execution
will continue at the next priority.
For the leavewhempty option, the members’ statuses
are checked periodically against the listed conditions; if it is determined that no
members are available to take calls, the caller is removed from the queue, with dialplan
execution continuing at the next priority.
An example use of joinempty could be:
joinempty=paused,inuse,invalid
With this configuration, prior to a caller entering the queue the statuses of all queue
members will be checked, and the caller will not be permitted to enter the queue unless
at least one queue member is found to have a status that is not paused, inuse, or invalid.
The leavewhenempty example could be something like:
leavewhenempty=inuse,ringing
In this case, the queue members’ statuses will be checked periodically, and callers will
be removed from the queue if no queue members can be found who do not have a status
of either inuse or ringing.
Previous versions of Asterisk used the values yes, no, strict, and loose as the available
values to be assigned. The mapping of those values is shown in Table 13-8.
Table 13-8. Mapping between old and new values for controlling when callers join and leave queues
Value Mapping (joinempty) Mapping (leavewhenempty)
yes (empty) penalty,paused,invalid
no penalty,paused,invalid (empty)
strict penalty,paused,invalid,unavailable penalty,paused,invalid,unavailable
loose penalty,invalid penalty,invalid
Using Local Channels
The use of Local channels as queue members is a popular way of executing parts of the
dialplan and performing checks prior to dialing the actual agent’s device. For example,
it allows us to do things like start recording the call, set up channel variables, write to
a log file, set a limit on the call length (e.g., if it is a paid service), or do any of the other
things we might need to do once we know which location we’re going to call.
When using Local channels for queues, they are added just like any other channels. In
the queues.conf file, adding a Local channel would look like this:
If the priority n+1 from where the Queue() application was called is not defined, the call will be hung up.
Advanced Queues | 293