Asterisk Call Center: Queue Strategies (ringall, leastrecent, fewestcalls, linear) (Latest Versions)
Updated guide for modern Asterisk (PJSIP era): queue strategies (ringall, leastrecent, fewestcalls, linear) with real configs, common mistakes, and troubleshooting steps.
In an Asterisk call-center environment, the queue strategy determines how incoming calls are distributed among available agents.
While queues may appear simple, the chosen distribution algorithm directly affects:
- Customer wait time
- Agent workload balance
- Service-level agreement (SLA) compliance
- Overall call-center efficiency
Selecting the correct queue strategy is therefore a business-critical architectural decision, not just a configuration detail.
How Queue Distribution Works Internally
When a caller enters a queue:
- Asterisk checks which agents are logged in and not paused
- The selected strategy algorithm chooses the next agent
- The call is delivered according to penalties, timeouts, and retry rules
Different strategies optimize for different goals such as fairness, speed, or simplicity.
Common Queue Strategies in Asterisk
- linear → fixed order routing
- leastrecent → agent idle longest gets call
- fewestcalls → agent with lowest call count gets call
- random → random distribution
- rrmemory → round-robin with memory
This article focuses on the three most widely used enterprise production strategies: linear, leastrecent, and fewestcalls.
Linear Strategy (Predictable but Unbalanced)
The linear strategy always calls agents in the same order.
strategy=linear
Behavior
- Agent 1 rings first
- If busy → Agent 2 rings
- Order never changes
Advantages
- Simple and predictable
- Useful for small teams or priority routing
Disadvantages
- First agents receive most calls
- Uneven workload distribution
- Poor scalability in real call centers
Leastrecent Strategy (Fair Idle-Time Distribution)
The leastrecent strategy sends the next call to the agent
who has been idle for the longest time.
strategy=leastrecent
Behavior
- Tracks last call completion time for each agent
- Selects the longest-idle agent
Advantages
- Balanced idle time across agents
- Improves fairness in workload
- Common in customer support centers
Disadvantages
- Does not account for total call count
- Agents with shorter calls may still receive more calls
FewestCalls Strategy (Balanced by Volume)
The fewestcalls strategy routes calls to the agent who has
handled the lowest total number of calls.
strategy=fewestcalls
Behavior
- Maintains cumulative call counters per agent
- Chooses the lowest count first
Advantages
- Best long-term workload balance
- Prevents agent burnout
- Common in sales or outbound teams
Disadvantages
- May ignore real-time idle duration
- Slightly higher computational overhead
Real-World Strategy Selection Guide
| Environment | Recommended Strategy |
|---|---|
| Small office (2-3 agents) | linear |
| Customer support center | leastrecent |
| Sales or outbound team | fewestcalls |
| Large enterprise contact center | fewestcalls or rrmemory |
Queue Configuration Example
[support]
strategy=leastrecent
timeout=15
retry=5
wrapuptime=10
maxlen=0
Strategy tuning must always be combined with:
- Agent penalties
- Wrap-up time
- Retry intervals
- Queue length limits
Common Production Problems
- Agents receiving uneven call volume due to wrong strategy
- Idle agents not getting calls because of pause state
- Service levels dropping from poor timeout tuning
- Queue appearing “stuck” when strategy conflicts with penalties
Debugging Queue Behavior
queue show support
This reveals:
- Agent status and pause state
- Call distribution order
- Total calls handled per agent
MYLINEHUB Architecture Insight
In MYLINEHUB call-center deployments:
- Queue strategy is selected per campaign or organization
- Dynamic agent state is stored in database
- Real-time analytics track fairness and SLA performance
- AI-driven routing may override classical strategies when needed
This enables scalable, multi-tenant, enterprise-grade telecom distribution logic.
Final Takeaway
Queue strategies define how fairly and efficiently customers are connected to agents.
The correct choice depends on:
- Team size
- Business objective (speed vs fairness)
- Operational metrics and SLA goals
Understanding and tuning queue strategies is essential for building a high-performance, enterprise-ready Asterisk call center.
Want to see API-driven CRM + Telecom workflows in action? Try the WhatsApp bot or explore the demos.
Comments (0)
Be the first to comment.