[asterisk-users] Count Available Queue members

Steve Edwards asterisk.org at sedwards.com
Sat Jul 18 11:57:32 CDT 2009


> Gabriel Ortiz Lour wrote:

>>   Someone know how can I check for available members on a queue Before 
>> I queue the call, so I can do something else with it? Note that is not 
>> the case for joinempty

On Sat, 18 Jul 2009, Alex Balashov wrote:

> It's going to take some sort of hack, since there appears to be no 
> dialplan app to do this succinctly.
>
> One option is to call an AGI script that in turn runs:
>
>    asterisk -rx 'queue show your-queue-name' |
>        egrep 'SIP\/.+ \(Not in use\)' | wc -l
>

You could reduce the number of process creations from 4 (AGI, asterisk 
-rx, egrep, wc) to 1 (AGI) by using AMI in the AGI.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list