diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-07 23:53:25 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-07 23:53:25 +0000 |
commit | 52f8eb0ac8db4eccf93d30f825802da41aeb2056 (patch) | |
tree | ffd211022fbfa035ecfa06cf2fea29268a700213 /channels | |
parent | d7a7df7cb6fc9a36a305d6455d246f8c5beae22e (diff) |
If callerid is configured in sip.conf use that for checking the presence of an extension in the dialplan.
(closes issue #11185)
Reported by: spditner
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89095 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 18b1e8fff..72137a975 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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; } |