[asterisk-users] check if devices reachable in queue

Dale Noll dnoll at wi.rr.com
Mon Nov 21 05:53:40 CST 2011


On 11/20/2011 02:49 PM, Matt Hamilton wrote:
>
>
> 2. if the devices/members in the queue are not reachable, I would like 
> to forward him to a phone B.

> I'm looking for a fast/practical way of accomplishing the second one. 
> In other words, before sending a call to a queue, I would like to see 
> if the members/devices in that queue are available/reachable.
>
>
> I define the members statically in queue.conf and QUEUE_MEMBER_COUNT 
> gives the count of those - doesn't care if  they are 
> available/reachable or not (even if phone is unhooked, still counted).
>
> I should be able to loop through each member and use  
> ${DEVICE_STATE(<sip phone>)}. for every incoming call, isn't this 
> overkill? Any other way?
Have you tried, instead of pre-processing the caller before calling 
Queue(), checking the ${QUEUESTATUS} variable.  On a Timeout, it will be 
TIMEOUT, but there are also JOINEMPTY, LEAVEEMPTY, JOINEUNAVAIL and 
LEAVEUNAVAIL options as well (core show application Queue).  If you set 
your queues.conf to consider the queue to be empty when the members are 
unavailable, invalid or unknown, the Queue() app should return 
immediately to the next dialplan step with the QUEUSTATUS of JOINEMPTY.

Dale

-- 
"The truth speaks for itself. I'm just the messenger."
      Lyta Alexander - Babylon 5

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111121/ca25df9b/attachment.htm>


More information about the asterisk-users mailing list