aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_stack.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-05 23:29:48 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-05 23:29:48 +0000
commit3ce15e3cc794bd5ea5877b7676fbe3164599b03e (patch)
tree00954ae24f7cec2a50d3bc4f67d49070abde6f55 /apps/app_stack.c
parentb5eafe5d519a36a2fd240f8970e524c17a49e770 (diff)
Merged revisions 161493 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r161493 | mmichelson | 2008-12-05 17:24:38 -0600 (Fri, 05 Dec 2008) | 8 lines If the autoloop flag is set on a channel, then we need to add 1 to the priority when checking if the extension exists. Otherwise, gosubs will fail. This was discovered when investigating an asterisk-users mailing list post made by Gary Hawkins. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@161496 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_stack.c')
-rw-r--r--apps/app_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c
index e890f338a..37a0fe62b 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -282,7 +282,7 @@ static int gosub_exec(struct ast_channel *chan, void *data)
return -1;
}
- if (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
+ if (!ast_exists_extension(chan, chan->context, chan->exten, ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? chan->priority + 1 : chan->priority, chan->cid.cid_num)) {
ast_log(LOG_ERROR, "Attempt to reach a non-existent destination for gosub: (Context:%s, Extension:%s, Priority:%d)\n",
chan->context, chan->exten, chan->priority);
ast_copy_string(chan->context, newframe->context, sizeof(chan->context));