[asterisk-commits] oej: trunk r168636 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 15 07:01:52 CST 2009


Author: oej
Date: Thu Jan 15 07:01:52 2009
New Revision: 168636

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168636
Log:
Add support for setting the Reason header when cancelling a call in the queue 
because someone else answered. Previously, only dial() was supported.

EDV-102

Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=168636&r1=168635&r2=168636
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Jan 15 07:01:52 2009
@@ -2228,9 +2228,13 @@
 	struct callattempt *oo;
 
 	while (outgoing) {
+		/* If someone else answered the call we should indicate this in the CANCEL */
 		/* Hangup any existing lines we have open */
-		if (outgoing->chan && (outgoing->chan != exception))
+		if (outgoing->chan && (outgoing->chan != exception)) {
+			if (exception)
+				ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE);
 			ast_hangup(outgoing->chan);
+		}
 		oo = outgoing;
 		outgoing = outgoing->q_next;
 		if (oo->member)




More information about the asterisk-commits mailing list