It's possible that a channel can have an async goto on the successful execution of an application as well.

Closes issue #12172.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2008-04-11 21:35:16 +00:00
parent 7bce362fa7
commit 6007dc7814

View File

@@ -2439,7 +2439,7 @@ static int __ast_pbx_run(struct ast_channel *c)
if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
c->_softhangup =0;
c->_softhangup = 0;
} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
/* atimeout, nothing bad */
} else {
@@ -2449,7 +2449,9 @@ static int __ast_pbx_run(struct ast_channel *c)
break;
}
}
if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c,c->context,"T",1,c->cid.cid_num)) {
if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
c->_softhangup = 0;
} else if (c->_softhangup == AST_SOFTHANGUP_TIMEOUT && ast_exists_extension(c,c->context,"T",1,c->cid.cid_num)) {
set_ext_pri(c, "T", 0); /* 0 will become 1 with the c->priority++; at the end */
/* If the AbsoluteTimeout is not reset to 0, we'll get an infinite loop */
c->whentohangup = 0;