How many calls are in a queue

queue
Tags: #<Tag:0x00007fafc29233e8>

(JM11811) #1

Hi everybody.

I’m trying to create a web tool for monitoring some settings in my FreePBX instance.

Actually I have a queue that keeps onhold the incoming calls while there are not free pjSIP agents. I know if I access by Asterisk CLI I will get the number of enqueue calls using “queue show queueName”:

998877 has 0 calls (max unlimited) in ‘fewestcalls’ strategy (0s holdtime, 11s talktime), W:0, C:86, A:40, SL:100.0% within 60s

I also know the traces of the queues are saved in /var/log/asterisk/queue_log.

The principal issue is I need to pick up this information in my web application (in php/javascript) in real time (or almost real time with few seconds delay) and I don’t know what tool of Asterisk / FreePBX I can use for achieving it.

Thanks a lot.


(Lorne Gaetz) #2

Very simple project here that you can use as a basis for what you want https://github.com/POSSA/QueueCallers

It’s not elegant, instead of using the AMI, it just takes the Asterisk ‘queue show’ console output and parses it. As a result it tends to break with asterisk version updates.