Re: [OpenSIPStack] STUN support bug?
Brought to you by:
joegenbaclor
From: H.Kropf <mai...@gl...> - 2007-07-24 14:01:27
|
Ilian Jeri C. Pinzon wrote: Thanks. I shall try it. Also look at it =================================================== OpalOSSEndPoint.cxx =================================================== BOOL OpalOSSEndPoint::SendRegister( const PString & userName, const PString & password, const PString & uri, const PString & _domain, BOOL synchronous ) { ........ WORD contactPort; ........ ........ if( !transport->GetListenerAddress( SIPTransport::UDP, targetAddress, contactAddress, contactPort ) ) return FALSE; OStringStream contact; contact << contactAddress << ":" << contactPort; profile.AppendContact( contact.str() ); ........ ........ ........ } =================================================== SIPTransportManager.cxx =================================================== BOOL SIPTransportManager::GetListenerAddress( SIPTransport::Protocol proto, const PIPSocket::Address & target, PIPSocket::Address & listenerAddress, WORD & listenerPort ) { .... .... TranslateIPAddress( listenerAddress, listenerPort ); //// WORD listenerPort? instead of const PIPSocket::Address ? return ok; } //---------------------------------------------------------------- BOOL SIPTransportManager::TranslateIPAddress( PIPSocket::Address & localAddress, const PIPSocket::Address & remoteAddress ) { if (m_TranslationAddress.IsLoopback()) return FALSE; // Have nothing to translate it to if (!m_TranslationAddress.IsValid()) return FALSE; // Have nothing to translate it to if (!SIPTransport::IsLocalAddress(localAddress)) return FALSE; // Is already translated if (SIPTransport::IsLocalAddress(remoteAddress)) // !!! return FALSE; // Does not need to be translated // Tranlsate it! localAddress = m_TranslationAddress; return TRUE; } //---------------------------------------------------------------- > Hi, > > SetSTUNServer should work when it is called before the transport has > been set up. Have you tried calling this during initialization? > > Regards, > Ilian > > H.Kropf wrote: > >> Hello >> >> I try to use OSS SoftPhone client (OSS 1.1.7 CVS) with server OpenSER >> and with NAT of type NAT::SIPSTUNClient::ConeNat >> Calling of function SetSTUNServer connect succefully to my STUN-server. >> SoftPhone receive true NAT IP-address and NAT port. >> But after, when i call SoftPhone::SendRegister() then OpenSER register >> client like "NAT, without STUN" >> >> Exemples: (correct and wrong) >> =============================== >> >> REGISTER requests via NAT using STUN: (aliases: 111.111.111.111 - >> instead of local SIP-client IP, 222.222.222.222 - instead of NAT IP, >> 333.333.333.333 - instead of SIP-server IP) >> >> CORRECT (hardware Zyxel SIP-client) >> >> |