diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-12-05 23:24:38 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-12-05 23:24:38 +0000 |
commit | 07311720f298dabeb212bfbb344aac2887c236a2 (patch) | |
tree | a9df26dc733db3068847a572c856861f2528b306 /apps | |
parent | fbb542055f8ecccfc141a2d78351ab377fd0ab75 (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@161493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_stack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_stack.c b/apps/app_stack.c index eae4a1dfd..9260f357e 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -383,7 +383,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)); |