diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/pbx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c index bab87c423..75a569cd9 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5262,8 +5262,9 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c, * and continue, or we can drop out entirely. */ if (invalid - || !ast_exists_extension(c, ast_channel_context(c), ast_channel_exten(c), 1, - S_COR(ast_channel_caller(c)->id.number.valid, ast_channel_caller(c)->id.number.str, NULL))) { + || (ast_strlen_zero(dst_exten) && + !ast_exists_extension(c, c->context, c->exten, 1, + S_COR(c->caller.id.number.valid, c->caller.id.number.str, NULL)))) { /*!\note * If there is no match at priority 1, it is not a valid extension anymore. * Try to continue at "i" (for invalid) or "e" (for exception) or exit if |