mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
Put number in name field if name field is NULL *or* has 0 length
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2264,11 +2264,12 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, char *cmd, c
|
|||||||
if (!l || !ast_isphonenumber(l))
|
if (!l || !ast_isphonenumber(l))
|
||||||
l = callerid;
|
l = callerid;
|
||||||
}
|
}
|
||||||
if (!n)
|
if (!n || !strlen(n))
|
||||||
n = l;
|
n = l;
|
||||||
/* Allow user to be overridden */
|
/* Allow user to be overridden */
|
||||||
if (strlen(p->fromuser))
|
if (strlen(p->fromuser))
|
||||||
l = p->fromuser;
|
l = p->fromuser;
|
||||||
|
|
||||||
if ((ourport != 5060) && !strlen(p->fromdomain))
|
if ((ourport != 5060) && !strlen(p->fromdomain))
|
||||||
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s:%d>;tag=as%08x", n, l, strlen(p->fromdomain) ? p->fromdomain : inet_ntoa(p->ourip), ourport, p->tag);
|
snprintf(from, sizeof(from), "\"%s\" <sip:%s@%s:%d>;tag=as%08x", n, l, strlen(p->fromdomain) ? p->fromdomain : inet_ntoa(p->ourip), ourport, p->tag);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user