6.3. queues.conf

Queues are defined and configured in queues.conf. This file is - as you are already familiar - divided into sections.
Under [general], we always set persistentmembers = yes, so that agents are re-added to their respective queues when Asterisk is started.
Every queue goes in its own section. In our example, we are configuring a support queue in its own section, [support]. The following parameters are available to us:

musiconhold

Sets the music class of the queue. We choose the above-configured default:
musiconhold = default

announce

Defines an audio file which is played back to the agent before a call is answered. This is so that an agent working in more than one queue will know which queue the incoming call is coming from and be able to answer appropriately.
;announce = queue-support
If you use this option, remember to place a corresponding announcement audio file in the sounds/ directory, e.g. queue-support.gsm.

strategy

Sets the call distribution strategy, i.e. the method used to decide how incoming calls are distributed to agents:
ringall
Ring all agents until one answers (default)
roundrobin
Ring agents in order, until one answers.
leastrecent
Ring the agent who has been idle the longest.
fewestcalls
Ring the agent who has taken the least number of calls in this queue.
random
Ring a random agent.
rrmemory
Round-robin with memory. Begins the round-robin starting with the agent who is next in-line after the last call.
Agents with a lower penalty will always be preferred in all strategies.
strategy = ringall
The appropriate setting depends on the circumstances; ringall can be extremely annoying for agents, while other values can lead to longer wait times for callers, if agents fail to answer.

servicelevel

Sets the service level threshold; i.e. sets the maximum wait time for callers. This is only really useful for statistical analysis (for example, in asking the question "How many calls were answered within the service level threshold of x seconds?").
servicelevel = 60

context

If set, this is the context we pass the caller to if she presses a single digit while waiting in the queue. This digit is treated as an extension and the call is taken out of the queue and routed to the extension in that context.
context = supportqueue-context  ; we could set it like this

; but we will leave it commented out:
;context = supportqueue-Context

timeout

Sets the maximum time a telephone may ring before we treat it as unattended.
timeout = 15

retry

Sets the interval (in seconds) before we ring all the agents again.
retry = 5

weight

The relative importance of the queue compared to other queues. If an agent is a member of multiple queues, calls from higher-weight queues are connected first. For example, you might give an emergency queue higher weight.
weight = 0

wrapuptime

The time interval after an agent has finished a call before the system will pass another call to the agent (default: 0).
; we allow our agent a quick pause for throat-clearing
; and a drink of water, then it's BACK TO WORK! *whip crack*
wrapuptime = 10

maxlen

Maximum number of callers allowed to be waiting in the queue (default: 0 meaning unlimited).
maxlen = 0

announce-frequency

Sets how often a caller will hear an announcement indicating her position in the queue or the estimated wait time (0 turns this completely off).
announce-frequency = 90

announce-holdtime

Sets whether the estimated wait time will be announced after the queue position. Possible values are yes, no or once.
announce-holdtime = yes

announce-round-seconds

Rounding level for wait-time announcements. If 0, only minutes, not seconds, are announced; other possible values are 0, 1, 5, 10, 15, 20 and 30.[32] (For example, when set to 30, a wait time of 2:34 will be rounded to 2:30.)
announce-round-seconds = 0

Announcement sound files

The following parameters define which sound files are used for which announcement types. Usually there is no need to change this:
queue-youarenext = queue-youarenext     ; "You are now first in line."
queue-thereare = queue-thereare         ; "There are" ...
queue-callswaiting = queue-callswaiting ; ... "calls waiting."
queue-holdtime = queue-holdtime         ; "The current est. holdtime is" ...
queue-minutes = queue-minutes           ; ... "minutes"
queue-seconds = queue-seconds           ; ... "seconds"
queue-thankyou = queue-thankyou         ; "Thank you for your patience."
queue-lessthan = queue-less-than        ; ... "less than" ...
queue-reporthold = queue-reporthold     ; "Hold time" ...
periodic-announce = queue-periodic-announce  ; "All reps busy, wait for next"
If these parameters are not provided, the default values shown above apply.

periodic-announce-frequency

Sets the interval, in seconds, for periodic announcements (periodic-announce, e.g. "We thank you for your patience; all our agents are currently serving other callers. Please continue to hold").
periodic-announce-frequency = 60

monitor-format

When set, recording (as with the Monitor() application) is turned on and the recording format defined. (If not defined, recording is off.) You may specify gsm, wav (caution: huge files!) or wav49.
; if you want recordings, uncomment this line:
;monitor-format = gsm
By default, files are named (one -in and one -out) according to ${UNIQUEID}. You can change this as needed by putting Set(MONITOR_FILENAME=filename) before Queue() in extensions.conf. We leave it unset in our example.
For more information on call recording, see Section B.68, “Monitor().

monitor-join

Combines the ...-in and ...-out files of a recording into one file. Allowed values: yes or no.
monitor-join = yes
For more information on call recording, see Section B.68, “Monitor().

joinempty

Sets whether callers can be placed in a queue with no agents.
yes
Callers may be placed in queues without active agents (the queue may have no agents logged in, or agents may be logged in but unavailable).
no
Callers may not be placed in queues without active agents.
strict
Callers may not be placed in a queue without agents, but may be placed in a queue with unavailable agents.
Unavailable should not be confused with busy (that is, on a call). An agent is unavailable if he is a member of the queue but not currently registered on the system (see also member). Caution: statically defined queue members (see member) are always considered available!
If the caller is not accepted into a queue, Queue() ends and execution continues in the next priority in the dialplan.
joinempty = no  ; we don't want our callers waiting in empty queues.

leavewhenempty

Sets whether waiting callers are removed from the queue when all the agents have logged out. Allowed values are the same as for joinempty. After leaving the queue, execution continues in the next priority in the dialplan.
leavewhenempty = strict  ; don't make 'em wait

eventwhencalled

Sets whether events are created in the Manager interface: AgentCalled, AgentDump, AgentConnect, AgentComplete. Possible values are yes and no.
eventwhencalled = yes

eventmemberstatus

Sets whether QueueMemberStatus-Events are created in the Manager interface (use with caution -- this can generate a lot of events!). Possible values are yes and no.
eventmemberstatus = no

reportholdtime

Sets whether the wait time for the incoming caller will be announced to the agent before the call is patched. This is a matter of personal preference[33] . Possible values are yes and no.
reportholdtime = no

memberdelay

Sets the interval of silence (in seconds) that the caller hears before she is connected with an agent.
memberdelay = 1

timeoutrestart

Sets whether the answer-timeout of an agent is reset after a BUSY or CONGESTION signal. This can be useful for agents who are allowed to refuse calls.
timeoutrestart = yes

autopause

Sets whether an agent who has failed to answer is automatically paused or not.
autopause = no

ringinuse

Sets whether agents who are in a call will be rung. So far, the only channel driver which provides this information is SIP.
ringinuse = no

member

It is possible to statically define agents in queues.conf like so:
member => technology/resource[,penalty]
- for example member => Zap/2 (may be used more than once, see queues.conf). Should be employed with caution with joinempty and leavewhenempty , since these queue members are always treated as available, even if the telephone is unattended. The other disadvantage is that an agent is always bound to specific workstation and cannot log in at another workstation.
In our example, we prefer to use the dynamic agents and add agents in the format
member => Agent/agentID
For two agents 1001 and 1002, the configuration looks like this:
member => Agent/1001
member => Agent/1002
These agents must still be defined in agents.conf (see below)[34]. The agent number is a freely selectable number which uniquely identifies each agent. The number has nothing to do with the extensions that the agent may eventually use.


[32] Older versions accepted other values, which could result in confusing announcements. See see Bug 9514.

[33] Some people like to know if a caller has been waiting a long time, because that caller might be irate :)

or they would be secret agents ;-)