From: Jason Parker Date: Fri, 11 Apr 2008 21:35:16 +0000 (+0000) Subject: It's possible that a channel can have an async goto on the successful execution of... X-Git-Tag: 1.4.20-rc1~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6007dc7814db0d9eb6727b30b4a516f4772a53c7;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/pbx.c b/main/pbx.c index 41027c35a1..685610583c 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -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;