Get number of agents logged

my target is take a decision before route the calls to queue:

  • Are there agents logged?
    * Yes, route to queue
    * No, route to Misc. Destination

Currently I are using the Queue’s feature Join Announcement and Join Empty (Queue Plus Option) but the join announcement is always played (expected behaviour).

how can I get the number the agents logged in a queue before reach the queue?

My FreePBX version is 15.0.37

thanks by advance.


You could use dynamic routing with an Asterisk query to achieve this.

Dynamic Routes Module - PBX GUI - Sangoma Documentation (

You could adapt something like this, you just need to determine the correct variable.
Checking Queue Caller Count with Dynamic Routes - FreePBX / Tips and Tricks - FreePBX Community Forums


Thank you so much. the example was amazing.
Finally I have used:

I don’t know the difference with
but with ‘logged’ doesn’t work.

logged - Returns the number of logged-in members for the specified queue.

count - Returns the total number of members for the specified queue.

again. thank you so much.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.