Improved chances of properly detecting public IP address from behind NAT.

git-svn-id: http://yate.null.ro/svn/yate/trunk@569 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-11-08 13:52:50 +00:00
parent c478390a2f
commit 68263e0317
2 changed files with 3 additions and 2 deletions

View File

@ -414,6 +414,7 @@ void SIPMessage::complete(SIPEngine* engine, const char* user, const char* domai
tmp << version << "/" << getParty()->getProtoName();
tmp << " " << getParty()->getLocalAddr() << ":" << getParty()->getLocalPort();
hl = new SIPHeaderLine("Via",tmp);
hl->setParam("rport");
header.append(hl);
}
if (!(isAnswer() || hl->getParam("branch"))) {

View File

@ -2326,8 +2326,8 @@ bool YateSIPLine::process(SIPEvent* ev)
m_localAddr = msg->getParty()->getLocalAddr();
if (!m_localPort)
m_localPort = msg->getParty()->getLocalPort();
DDebug(&plugin,DebugInfo,"SIP line '%s' on local address %s:%d",
c_str(),m_localAddr.c_str(),m_localPort);
Debug(&plugin,DebugInfo,"Detected local address %s:%d for SIP line '%s'",
m_localAddr.c_str(),m_localPort,c_str());
}
m_partyAddr = msg->getParty()->getPartyAddr();
m_partyPort = msg->getParty()->getPartyPort();