How to get a list of all queues from the dialplan?

Colleagues, tell me, please, is there a way to get a list of all queues from the dialplan?

Thank you in advance,
Ogogon.

Given that you are going to have to do significant processing, I’d suggest use AGI and either invoke the CLI command or have the AGI act as an AMI client. You could use the SHELL function to run the CLI, but that is costly and I suspect the length of the output would be too great.

Totally agree with you, the output of the command make it difficult to filter only the queue name, maybe with a proficient usage of grep and awk you could do it

-bash-4.2# asterisk -x "queue show"
default has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

500 has 0 calls (max unlimited) in 'ringall' strategy (24s holdtime, 117s talktime), W:0, C:21, A:22, SL:95.2% within 60s
   Members:
      Local/233@from-queue/n (ringinuse enabled) (Not in use) has taken no calls yet
      ZOIPER PC (Local/106@from-queue/n from hint:106@ext-local) (ringinuse enabled) (Not in use) has taken no calls yet
      Samsung A10S (Local/102@from-queue/n from hint:102@ext-local) (ringinuse enabled) (Not in use) has taken no calls yet
      Ambiorix Rodriguez (Local/100@from-queue/n from hint:100@ext-local) (ringinuse enabled) (Not in use) has taken 1 calls (last was 90550 secs ago)
   No Callers

501 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:3, SL:0.0% within 60s
   Members:
      John (Local/1111@from-queue/n from hint:1111@ext-local) (ringinuse enabled) (Not in use) has taken no calls yet
      israel 2 (Local/202@from-queue/n from hint:202@ext-local) (ringinuse enabled) (Unavailable) has taken no calls yet
   No Callers

I don’t use queues, but wouldn’t something like this work:

asterisk -x 'queue show' | awk '/strategy/ {print $1}'
1 Like

Clever strategy made the strategy

1 Like