[asterisk-users] Count Available Queue members

Leif Madsen leif.madsen at asteriskdocs.org
Mon Jul 20 09:02:22 CDT 2009


Tilghman Lesher wrote:
>> My understanding of QUEUE_MEMBER_COUNT just give a total of "agents" in the
>> queue.
>>
>> Synopsis  Count number of members answering a queue
> 
> It may or may not be the answer to the OP's question, depending upon what he
> meant by "available".  Without clarification, it's impossible to know.

And along with this, even if it just returns the total number of queue members 
available, that could be useful if you're calling via something like a Local 
channel, where you could use the GROUP() and GROUP_COUNT() functions.

Place a GROUP() in the Local channel prior to calling the member, and then you 
can do:

exten => start,n,Set(MEMBERS_TO_TAKE_CALLS=$[${GROUP_COUNT(agents)} - 
${QUEUE_MEMBER_COUNT(queue)}])

Something like that anyways.

Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk



More information about the asterisk-users mailing list