Fix channel opaquification slip-up in r365477
authorMatthew Jordan <mjordan@digium.com>
Mon, 7 May 2012 18:58:40 +0000 (18:58 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 7 May 2012 18:58:40 +0000 (18:58 +0000)
Those channels are opaque now...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365480 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
main/pbx.c

index da974fc..55aec5d 100644 (file)
@@ -5835,8 +5835,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                        e[0] = *code;
                        if (strchr(ecodes, e[0]) == NULL
                                && ast_canmatch_extension(chan,
-                                       (!ast_strlen_zero(options->exitcontext) ? options->exitcontext : chan->context),
-                                       e, 1, S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
+                                       (!ast_strlen_zero(options->exitcontext) ? options->exitcontext : ast_channel_context(chan)),
+                                       e, 1, S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
                                strncat(ecodes, e, sizeof(ecodes) - strlen(ecodes) - 1);
                        }
                }
index 75a569c..e4774f2 100644 (file)
@@ -5263,8 +5263,8 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c,
 
                if (invalid
                        || (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)))) {
+                               !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)))) {
                        /*!\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