From ba8c1b5243bb6ba81a35d0f860a91913ab6167fc Mon Sep 17 00:00:00 2001
From: Mark Michelson <mmichelson@digium.com>
Date: Thu, 6 Sep 2007 16:31:30 +0000
Subject: [PATCH] Merged revisions 81713 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81713 | mmichelson | 2007-09-06 11:25:40 -0500 (Thu, 06 Sep 2007) | 6 lines

Fixes an issue where valid DTMF had to be pressed twice to exit a queue if a member's phone
was ringing.

(closes issue #10655, reported by strider2k, patched by me)


........


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

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 6054670a65..ed8ff54261 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2637,11 +2637,11 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
 			/* Must gotten hung up */
 			res = -1;
 		} else {
+			/* User exited by pressing a digit */
 			res = digit;
-			if (res > 0 && !valid_exit(qe, res))
-				res = 0;
 		}
-		ast_debug(1, "%s: Nobody answered.\n", qe->chan->name);
+		if (res == -1)
+			ast_debug(1, "%s: Nobody answered.\n", qe->chan->name);
 	} else { /* peer is valid */
 		/* Ah ha!  Someone answered within the desired timeframe.  Of course after this
 		   we will always return with -1 so that it is hung up properly after the
-- 
GitLab