From e736c8a27bb1fb2c3df0dde385e8648d53ba7f41 Mon Sep 17 00:00:00 2001
From: BJ Weschke <bweschke@btwtech.com>
Date: Sat, 2 Sep 2006 18:36:53 +0000
Subject: [PATCH]  With the somewhat recent addition (from one of the
 Astridevcon Europe sessions) of more detailed device states, we need to
 change strategy in app_queue in how we determine whether a queue member is
 "in use" or not. Basically, instead of specifically looking for that device
 state as we did previously, now we're going to observe any other device state
 aside from the two that we know for sure are "not in use" as "in use". This
 will cause some other states to fall through that we know will never be
 available (eg - "INVALID","UNAVAILABLE",etc) but there's other code already
 within to handle those conditions. (#7433 - tgrman reporting)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 878c67a4af..ae02378472 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1561,7 +1561,7 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
 		return 0;
 	}
 
-	if (!qe->parent->ringinuse && (tmp->member->status == AST_DEVICE_INUSE)) {
+	if (!qe->parent->ringinuse && (tmp->member->status != AST_DEVICE_NOT_INUSE) && (tmp->member->status != AST_DEVICE_UNKNOWN)) {
 		if (option_debug)
 			ast_log(LOG_DEBUG, "%s in use, can't receive call\n", tmp->interface);
 		if (qe->chan->cdr)
-- 
GitLab