Hello, Previous week, we had a problem while testing the NAT. SipXecs sends OPTIONS messages once every 20 seconds to provide NAT keepalive. But these OPTIONS messages have empty Via fields. While some softphones like Bria, Eyebeam can handle such a condition by sending back "Missing Mandatory field" messages; some phones cannot. For instance, our phones was crushing and re-registering every time they get an OPTIONS message. This was causing registration drops, call drops, etc.
So I investigated the reason and found that: In NatTraversalAgent::adjustViaForNatTraversal there is a conditional statement that adjusts the via field according to the keepalive message's sendProtocol. But sendProtocol is never being set. So I added a statement in NatMaintainer.cpp, just before it calls sendUdpKeepAlive(), to set UDP as the protocol of OPTIONS message. I tested and it is working now. I prepared a patch for that and it is attached. I appreciate, if you can check and confirm this. Best Regards, Kemal
From e9a1e11d72ee7336800b73d71dd94365e403035f Mon Sep 17 00:00:00 2001 From: Kemal Eroglu <[email protected]> Date: Tue, 7 Jun 2011 13:23:38 +0300 Subject: [PATCH] UC-1011 - Fix for Phone reregistration problem in 20 sec on NAT setup (For Master Branch) --- .../NatTraversalAgent/NatMaintainer.cpp | 1 + .../NatTraversalAgent/NatTraversalAgent.cpp | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/sipXproxy/lib/authplugins/NatTraversalAgent/NatMaintainer.cpp b/sipXproxy/lib/authplugins/NatTraversalAgent/NatMaintainer.cpp index 1144eec..f3b3a24 100755 --- a/sipXproxy/lib/authplugins/NatTraversalAgent/NatMaintainer.cpp +++ b/sipXproxy/lib/authplugins/NatTraversalAgent/NatMaintainer.cpp @@ -244,6 +244,7 @@ void NatMaintainer::sendKeepAliveToEndpoint( const char* pIpAddress, uint16_t po UtlString branchId = callId; branchId.appendNumber( mNextSeqValue, "%d" ); + mpKeepAliveMessage->setSendProtocol(OsSocket::UDP); mpKeepAliveMessage->setTopViaTag( branchId.data(), "branch" ); mpSipRouter->sendUdpKeepAlive( *mpKeepAliveMessage, pIpAddress, portNumber ); } diff --git a/sipXproxy/lib/authplugins/NatTraversalAgent/NatTraversalAgent.cpp b/sipXproxy/lib/authplugins/NatTraversalAgent/NatTraversalAgent.cpp index d694c0b..22444c1 100755 --- a/sipXproxy/lib/authplugins/NatTraversalAgent/NatTraversalAgent.cpp +++ b/sipXproxy/lib/authplugins/NatTraversalAgent/NatTraversalAgent.cpp @@ -586,6 +586,7 @@ void NatTraversalAgent::adjustViaForNatTraversal( SipMessage& message, const cha newVia += ";"; newVia += viaParams; } + break; default: Os::Logger::instance().log(FAC_SIP, PRI_CRIT, "NatTraversalAgent::adjustViaForNatTraversal" -- 1.7.2.3
_______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev/
