[asterisk-users] Is a device a member of a queue?
Peter Childs
pchilds at bcs.org
Sun Jul 11 04:40:34 CDT 2010
I'm looking for a function I can put in my dial plan that tells me if
a device is a member of a queue, but I can seem to find one. Basically
I want to be able to dial to join a queue and if I'm already on the
queue, leave......
exten => 4,1,GotoIf(${is_queue_member(queuename,SIP/${ext})}?leave:join)
exten => 4,n(leave),RemoveQueueMember(queuename,SIP/${ext})
exten => 4,n,Hangup
exten => 4,n(join),AddQueueMember(queuename,SIP/${ext})
or simular, If such a function exists it would be very handy....
The only way I can see of doing this is to use
queue_member_list(queue) and then loop through the returned list using
cut searching for the device.
So.
1. Is there a function I'm missing to do this say..
is_queue_member(queuename,channel)
or
2. Is there some way of creating such a function.
Thanks in advanced
Peter Childs
More information about the asterisk-users
mailing list