Look for faxexten in the main context, too (bug #3634)
authorMark Spencer <markster@digium.com>
Mon, 28 Feb 2005 00:18:28 +0000 (00:18 +0000)
committerMark Spencer <markster@digium.com>
Mon, 28 Feb 2005 00:18:28 +0000 (00:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5100 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 835eb94..d1729ea 100755 (executable)
@@ -4193,7 +4193,7 @@ struct ast_frame  *zt_read(struct ast_channel *ast)
                        if (!p->faxhandled) {
                                p->faxhandled++;
                                if (strcmp(ast->exten, "fax")) {
                        if (!p->faxhandled) {
                                p->faxhandled++;
                                if (strcmp(ast->exten, "fax")) {
-                                       if (ast_exists_extension(ast, ast->context, "fax", 1, ast->cid.cid_num)) {
+                                       if (ast_exists_extension(ast, ast_strlen_zero(ast->macrocontext) ? ast->context : ast->macrocontext, "fax", 1, ast->cid.cid_num)) {
                                                if (option_verbose > 2)
                                                        ast_verbose(VERBOSE_PREFIX_3 "Redirecting %s to fax extension\n", ast->name);
                                                /* Save the DID/DNIS when we transfer the fax call to a "fax" extension */
                                                if (option_verbose > 2)
                                                        ast_verbose(VERBOSE_PREFIX_3 "Redirecting %s to fax extension\n", ast->name);
                                                /* Save the DID/DNIS when we transfer the fax call to a "fax" extension */