Re: [OpenSIPStack] STUN support bug?
Brought to you by:
joegenbaclor
From: Joegen E. B. <joe...@gm...> - 2007-07-27 02:27:32
|
Hi, You can use SIPSTUNClient::NatTypes SIPTransportTools::STUNGetNATType( const OString & server ); To get the NAT type instead of calling SetSTUNServer(). Only call SetSTUNSErver() once you have decided whether you want to use STUN or not. Setting the STUN server is a point of no return and will always use the stun address through out the lifetime of the application. H.Kropf wrote: > 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? > > > > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > opensipstack-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > > |