From 82a9a22e991b4ec5b4996b7db813f1db464bd09c Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 7 Feb 2005 14:56:43 +0000 Subject: [PATCH] Fix callerid segfault in rare combination (bug #3519) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4980 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d168e2846d..24af559fe8 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3746,7 +3746,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, char *cmd, c l = p->owner->cid.cid_num; n = p->owner->cid.cid_name; } - if ((!l || !ast_isphonenumber(l)) && default_callerid[0]) + if (!l || (!ast_isphonenumber(l) && default_callerid[0])) l = default_callerid; /* if user want's his callerid restricted */ if (p->callingpres & AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED) {