[asterisk-commits] russell: branch 1.4 r75403 - /branches/1.4/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 17 15:01:13 CDT 2007


Author: russell
Date: Tue Jul 17 15:01:12 2007
New Revision: 75403

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75403
Log:
(closes issue #10209)
Reported by: juggie
Patches:
      10209-trunk-2.patch uploaded by juggie
Tested by: juggie, blitzrage

In ast_pbx_run(), mark a channel as hung up after an application returned -1, 
or when it runs out of extensions to execute.  This is so that code can detect
that this channel has been hung up for things like making sure DeadAGI is used
on actual dead channels, and is beneficial for other things, like making sure
someone doesn't try to start spying on a channel that is about to go away.

Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=75403&r1=75402&r2=75403
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Tue Jul 17 15:01:12 2007
@@ -2517,6 +2517,8 @@
 	}
 	if (!found && !error)
 		ast_log(LOG_WARNING, "Don't know what to do with '%s'\n", c->name);
+	if (res != AST_PBX_KEEPALIVE)
+		ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING);
 	if ((res != AST_PBX_KEEPALIVE) && ast_exists_extension(c, c->context, "h", 1, c->cid.cid_num)) {
 		if (c->cdr && ast_opt_end_cdr_before_h_exten)
 			ast_cdr_end(c->cdr);




More information about the asterisk-commits mailing list