From: Russell Bryant Date: Tue, 17 Jul 2007 20:01:54 +0000 (+0000) Subject: Merged revisions 75403 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~2045 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ffd55b6f98281c04f4b3d2f1ff82cec66f90b3e;p=thirdparty%2Fasterisk.git Merged revisions 75403 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r75403 | russell | 2007-07-17 15:01:12 -0500 (Tue, 17 Jul 2007) | 12 lines (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. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75404 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index 4d7ebbaba1..550add495f 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2520,6 +2520,8 @@ static int __ast_pbx_run(struct ast_channel *c) } 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);