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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to