[asterisk-commits] branch 1.2 r25518 - /branches/1.2/apps/app_queue.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 8 06:11:33 MST 2006


Author: bweschke
Date: Mon May  8 08:11:32 2006
New Revision: 25518

URL: http://svn.digium.com/view/asterisk?rev=25518&view=rev
Log:
 Don't recheck valid_exit() after getting the result from say_position (which already checks it). Should prevent another loop if the caller hits digits during the position announcement. #6776 (tgj reporting)


Modified:
    branches/1.2/apps/app_queue.c

Modified: branches/1.2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_queue.c?rev=25518&r1=25517&r2=25518&view=diff
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Mon May  8 08:11:32 2006
@@ -1184,7 +1184,9 @@
 	/* Set our last_pos indicators */
  	qe->last_pos = now;
 	qe->last_pos_said = qe->pos;
-	ast_moh_start(qe->chan, qe->moh);
+	/* Don't restart music on hold if we're about to exit the caller from the queue */
+	if (!res)
+		ast_moh_start(qe->chan, qe->moh);
 
 	return res;
 }
@@ -2989,7 +2991,7 @@
 					/* Make a position announcement, if enabled */
 					if (qe.parent->announcefrequency && !ringing)
 						res = say_position(&qe);
-					if (res && valid_exit(&qe, res)) {
+					if (res) {
 						ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos);
 						break;
 					}



More information about the asterisk-commits mailing list