]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If callerid is configured in sip.conf use that for checking the presence of an extens...
authorJoshua Colp <jcolp@digium.com>
Wed, 7 Nov 2007 23:53:25 +0000 (23:53 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 7 Nov 2007 23:53:25 +0000 (23:53 +0000)
(closes issue #11185)
Reported by: spditner

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

channels/chan_sip.c

index 18b1e8ffff509b96f59a521f04038f64958f7da1..72137a975686bbf2053e2de69140d1df4d7c1e73 100644 (file)
@@ -8718,7 +8718,7 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
                /* Check the dialplan for the username part of the request URI,
                   the domain will be stored in the SIPDOMAIN variable
                   Return 0 if we have a matching extension */
-               if (ast_exists_extension(NULL, p->context, uri, 1, from) ||
+               if (ast_exists_extension(NULL, p->context, uri, 1, S_OR(p->cid_num, from)) ||
                    !strcmp(uri, ast_pickup_ext())) {
                        if (!oreq)
                                ast_string_field_set(p, exten, uri);
@@ -8741,7 +8741,7 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
 
        /* Return 1 for pickup extension or overlap dialling support (if we support it) */
        if((ast_test_flag(&global_flags[1], SIP_PAGE2_ALLOWOVERLAP) && 
-           ast_canmatch_extension(NULL, p->context, uri, 1, from)) ||
+           ast_canmatch_extension(NULL, p->context, uri, 1, S_OR(p->cid_num, from))) ||
            !strncmp(uri, ast_pickup_ext(), strlen(uri))) {
                return 1;
        }