diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-17 20:01:12 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-17 20:01:12 +0000 |
commit | de20b2e4550b76ddfbf699af9699d92c2488195b (patch) | |
tree | 67ad0cde1a129c5b8f0bac897d2152841b3b44b3 /main | |
parent | 92dd72cc354025cbb58349d1e4da1cd018d8b232 (diff) |
(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: http://svn.digium.com/svn/asterisk/branches/1.4@75403 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/pbx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 73c80ee05..11b614583 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2517,6 +2517,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); |