Re: [OpenSIPStack] STUN support bug?
Brought to you by:
joegenbaclor
From: H.Kropf <mai...@gl...> - 2007-07-26 15:54:26
|
Hi I could not force STUN-client to work correctly It is necessary : 1. Check NAT presence and Nat type 2. If Nat type is ConeNat, in that case it is necessary to enable STUN support 3. If Nat type is other, in that case it is necessary to disable STUN support How to make it? I have tried to use such method: in SoftPhoneManager::InitializeSIP() function before m_SIPEndPoint->GetProfile().GetTransportProfile().EnableUDP( sipIface, sipPort ); this piece of code has been inserted if( SetSTUNServer("stun.mysrv.com") != NAT::SIPSTUNClient::ConeNat ) SetSTUNServer(""); and... nothing... NAT type is SymmetricNat, (for ConeNat it work correctly) The call of function SetSTUNServer("") destroys object SIPTransportManager::m_STUNClient and object OpalManager::stun but OSS for some reason remembers (where? how?) NAT address after SetSTUNServer("stun.mysrv.com") and inserts it into fields of REGISTER requests Via: SIP/2.0/UDP [NAT IP-address]:5060;.... Contact: "100008" <sip:100008@[NAT IP-address]:5060;...... Tell me please how to solve a problem using only OSS, without other libraries? |