A call queue holds callers until an agent is free, then delivers the call fairly. In Asterisk, queues are handled by app_queue and configured in queues.conf (or the Queues module in FreePBX). Queues are the right tool whenever several people answer the same kind of call.
Core concepts
- Queue: the waiting line, with its own settings.
- Members: the agents or phones that answer calls from the queue. They can be static (always in the queue) or dynamic (log in and out).
- Strategy: how Asterisk chooses which member to ring.
Choosing a ring strategy
- ringall: rings every available member until one answers. Fast, good for small teams.
- leastrecent: rings the member who least recently finished a call. Fair distribution.
- fewestcalls: rings the member who has handled the fewest calls.
- random: picks a random available member.
- rrmemory: round robin, remembering where it left off.
- linear: rings members in a fixed order, useful for primary and backup agents.
For most teams, leastrecent or rrmemory spreads calls fairly. Use ringall for small teams where speed matters most.
Important settings
- timeout: how long to ring a member before trying the next.
- retry: how long to wait before ringing again.
- wrapuptime: a pause after each call before a member gets another, giving agents time for notes.
- maxlen: the maximum number of callers allowed to wait.
- joinempty / leavewhenempty: whether callers can join or must leave when no members are available, which matters after hours.
- musicclass: the hold music callers hear.
- announce-position and announce-holdtime: tell callers their place in line and estimated wait.
- periodic-announce: a recurring message, for example offering a callback.
Sending calls to a queue
In the dialplan, the Queue() application sends a caller into a queue, with an optional overall timeout. When the timeout expires, the dialplan continues to the next step, so you decide what happens: voicemail, a message, another queue or a callback offer. Often callers reach the queue through an IVR; see building an IVR in Asterisk.
Dynamic agents
Use dynamic members so agents can log in and out with a feature code or from an agent application. This keeps calls from ringing people who are away, without editing configuration.
Monitoring
queue showin the Asterisk CLI displays callers waiting and member status.- The queue log records every event and can be loaded into reporting tools to calculate service level, wait times and abandons.
- Track abandon rate and average wait by hour to plan staffing. See call center KPIs.
Common problems
- Calls ring agents who are on another call: enable device state checking so busy members are skipped.
- Callers stuck forever: always set a queue timeout and a fallback.
- Agents overwhelmed: add wrap-up time and check the strategy.
Summary
Pick a fair strategy, set timeouts, wrap-up and a sensible maximum length, tell callers where they stand, and always define what happens when the queue can't answer. Then review queue logs to staff for real demand.
Need help with VICIdial, Asterisk or AI voice agents?
SmartAiCalls sets up, secures and supports calling systems for call centers and growing businesses. Talk to us or request a free demo.