[asterisk-commits] mjordan: trunk r396365 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 7 16:38:18 CDT 2013


Author: mjordan
Date: Wed Aug  7 16:38:17 2013
New Revision: 396365

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396365
Log:
Perform Ring-No-Answer checks before processing Hangup logic

The rna() routine will raise a Stasis message involving both the caller and the
agent. This doesn't work so well if we already hung up the agent channel, as
the channel doesn't quite exist. Not surprisingly, this will crash. This patch
properly runs the rna subroutine (performing all of the Ring-No-Answer logic)
prior to hanging up the agent channel.

(closes issue ASTERISK-22258)
Reported by: Kiril Valchev
Tested by: Kiril Valchev


Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=396365&r1=396364&r2=396365
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Aug  7 16:38:17 2013
@@ -4584,10 +4584,10 @@
 						case AST_CONTROL_BUSY:
 							ast_verb(3, "%s is busy\n", ochan_name);
 							ast_channel_publish_dial(qe->chan, o->chan, on, "BUSY");
-							do_hang(o);
 							endtime = (long) time(NULL);
 							endtime -= starttime;
 							rna(endtime * 1000, qe, o->chan, on, membername, qe->parent->autopausebusy);
+							do_hang(o);
 							if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
 								if (qe->parent->timeoutrestart) {
 									start_time_tv = ast_tvnow();




More information about the asterisk-commits mailing list