mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-23 13:09:00 +00:00
Build contact without @ sign if there is no extension
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3590,9 +3590,9 @@ static void build_contact(struct sip_pvt *p)
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
/* Construct Contact: header */
|
||||
if (ourport != 5060)
|
||||
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s@%s:%d>", p->exten, ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport);
|
||||
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s%s%s:%d>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport);
|
||||
else
|
||||
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s@%s>", p->exten, ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip));
|
||||
snprintf(p->our_contact, sizeof(p->our_contact), "<sip:%s%s%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip));
|
||||
}
|
||||
|
||||
/*--- initreqprep: Initiate SIP request to peer/user ---*/
|
||||
|
Reference in New Issue
Block a user