summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-10-13 23:48:12 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-10-13 23:48:12 +0000
commit454061ec18a6384b11f62d5ebbff0c5e3d1c55ec (patch)
tree22f9cb83be64820bef171857d75b513095131af9 /channels/chan_sip.c
parent28dacd08151f3759895a33625e1a52520829ac57 (diff)
don't force CLID to be a phone-number-looking-thingie (issue #5325)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 766ecee53..fee4848bb 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4685,7 +4685,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
char tmp[BUFSIZ/2];
char tmp2[BUFSIZ/2];
char iabuf[INET_ADDRSTRLEN];
- char *l = default_callerid, *n = NULL;
+ char *l = NULL, *n = NULL;
int x;
char urioptions[256]="";
@@ -4720,13 +4720,13 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
l = p->owner->cid.cid_num;
n = p->owner->cid.cid_name;
}
- if (!l || (!ast_isphonenumber(l) && default_callerid[0]))
- l = default_callerid;
/* if we are not sending RPID and user wants his callerid restricted */
if (!ast_test_flag(p, SIP_SENDRPID) && ((p->callingpres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED)) {
l = CALLERID_UNKNOWN;
n = l;
}
+ if (!l)
+ l = default_callerid;
if (!n || ast_strlen_zero(n))
n = l;
/* Allow user to be overridden */