How to tell a VICIdial server is idle before you touch it
The database can look quiet while calls are still up. How to quiesce a VICIdial floor and which single command proves nothing is on the wire.

To the point
A VICIdial server is idle only when Asterisk says it holds zero channels. The database records what the application intends, so it can look quiet while calls are still up.
- Run
asterisk -rx 'core show channels count'on every live node. Zero on all of them is idle. vicidial_live_agents,vicidial_auto_callsand the campaignactiveflag each miss part of the picture.- Take the reading twice, a few seconds apart, and once more right before a destructive step.
- A heartbeat in
server_updaterolder than about two minutes means a dead node.
The only honest check
Run the command on each dialer node and read the active channels. If it is zero, nothing is on the wire. If it is anything else, the floor is not idle, whatever the database says.
asterisk -rx 'core show channels count'
It prints active channels, active calls and calls processed since start. Read the first two. A box that has just emptied can show a few channels while recent calls tear down, so count twice.
Why the database lies
Three places look like they should answer the question. Each fails differently.

vicidial_auto_calls is a MEMORY table. It is rebuilt empty on every restart, and if a dialer process has just died it can be empty while Asterisk still holds the channels. Asterisk is what holds the calls, so ask Asterisk.
On a cluster, ask every live node
The servers table lists what the cluster was configured to be. The server_updater table shows what is running, because each node writes a heartbeat to its last_update column.
mysql -e "SELECT server_id, server_ip, last_update FROM server_updater ORDER BY last_update DESC"
A row older than about two minutes is a dead node. Counting it overstates the cluster, and waiting for it means waiting for a box that is not there. Show the age of each heartbeat so a person can judge. Then run the channel count on each live node.
The database name, user, password and port are in /etc/astguiclient.conf (the VARDB_* lines). On some builds they are randomised, so do not assume asterisk and 3306.
Getting to zero, in order
If you cannot wait for the floor to empty, this is the order we use.

Every step changes a live floor, so tell the people on it first. A warning that agents are logged in should be a warning, not a block. Whether a maintenance window is worth waiting for is the owner's call.
What idle does not prove

For the hopper, see why a campaign is not dialing. Decide the number you accept before you start. For a restart of a web service a few calls may be fine. For a database wipe or a cutover, the number is zero on every node.
When the count will not fall
If the count stays up after campaigns are closed and agents logged out, something is still dialing. Look at what holds the channels with asterisk -rx 'core show channels'. Check for a long inbound call, a remote agent, a conference or a stuck local channel.
A stuck channel with no matching call in vicidial_auto_calls will not clear by itself. A restart of Asterisk is what is left, and it drops anything real on the line. That is a decision for the person who owns the floor, not for a script.
Questions people ask
Can I trust an empty vicidial_live_agents table?
No. It only means nobody is logged in to the agent screen. Remote agent lines and calls still up after the agent screen has gone are not covered.
Does setting a campaign to inactive stop the calls in flight?
No. active='N' stops new calls. The ones already placed finish by themselves, which in our runs took seconds, not minutes.
What does mysqlcheck report on the MEMORY tables?
It says the storage engine does not support check. That is noise, not damage.
Next steps
Pick your accepted number, run the count on every live node, and write down the time. If you want a second pair of eyes before a cutover, a managed migration shows the result before anything is deleted. For where the new server lives and what it costs, see VICIdial hosting and pricing. The copy rules are in what we copy and what we never copy.
VICIdial is a trademark of its owner. Trustane is an independent hosting provider.
Sources
- Migration ground truth, quiescing a live floor
- Migration audit, guards before a destructive step
- MySQL reference manual, MEMORY storage engine
- Cover photo by panumas nikhomkhai on Pexels
Managed VICIdial hosting


