Real-Time Queue Monitoring from the Shell

Monitoring Asterisk 18+ -- Last reviewed 2026-03-29 queues monitoring cli agents Found this useful? Upvote it. ×

Real-Time Queue Monitoring from the Shell

When you need to see what a queue is doing right now without setting up a dashboard, these CLI commands and shell loops get you there.

Check a single queue

asterisk -rx "queue show support"

Shows current callers, logged-in members, their status (idle, busy, ringing, unavailable), and call statistics.

Watch a queue in real time

watch -n 5 'asterisk -rx "queue show support" | grep -v "No Callers"'

Refreshes every 5 seconds. The grep -v removes the "No Callers" line to reduce noise when the queue is idle.

Monitor multiple queues

#!/bin/bash
# queue-monitor.sh
# Simple real-time queue monitor. Ctrl+C to stop.

QUEUES="support sales billing"

while true; do
    clear
    date
    echo
    for q in $QUEUES; do
        echo "=== $q ==="
        asterisk -rx "queue show $q" 2>/dev/null | grep -v -e 'Unavailable' -e 'has 0 calls'
        echo
    done
    sleep 5
done

Hides unavailable agents and empty queues to keep the output readable. Add or remove queue names in the QUEUES variable.

Filter the full log for queue events

On a busy system, the Asterisk log scrolls too fast to follow. Filter it:

# Live queue and agent events only
tail -f /var/log/asterisk/full | grep -i -e 'queue' -e 'agent' -e 'AddQueueMember' -e 'RemoveQueueMember'

Check agent login status

# All queue members and their states
asterisk -rx "queue show" | grep -E '^\s+(PJSIP|Local)' | sort

This lists every member across all queues with their current state (Not in use, Busy, Ringing, Unavailable).

User Notes

Know a tip or gotcha for this topic? Share it below and help others.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.
Related Snippets