linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] STUN support in linphone 3.0.0


From: Simon Morlat
Subject: Re: [Linphone-developers] STUN support in linphone 3.0.0
Date: Thu, 2 Jul 2009 15:35:12 +0200
User-agent: KMail/1.11.4 (Linux/2.6.29-2-amd64; KDE/4.2.4; x86_64; ; )

Hi,

Stun is used to guess external routable address for RTP streams only.
STUN is useless for SIP, since proxy replies have the 'rport' and 'received' 
parameters in their via field. SIP proxies should stay in the loop of calls 
using record routes and fix contact addresses.
Furthermore, linphone does double-registration, so that the second register 
fixes the registered contact using the rport/received parameters.
Objectively there is no more good reasons to have stun for SIP.

Simon

Le mercredi 1 juillet 2009 14:16:50, address@hidden a écrit :
> Hello,
>
>
> I have a problem with the configuration of the STUN server in linphone
> 3.0.0. I use the linux command line interface. If I configure the
> following in .linphonerc:
>
> firewall_policy=2
> stun_server=stun.sipgate.de:10000
>
> then I see that STUN is not used during the registration.
>
> So I decided to analyze the source code I found out the following
> fragment in "linphonecore":
>
>                         /* we no more use stun for sip socket*/
> #if 0
>                         int mport=0;
>                         ms_message("doing stun lookup for local
> address..."); if
> (stun_get_localip(lc,sock,linphone_core_get_sip_port(lc),result,&mport)){
>                                 if (!lc->net_conf.nat_sdp_only)
>                                        
> eXosip_masquerade_contact(result,mport);
>                                 return;
>                         }
>                         ms_warning("stun lookup failed, falling back
> to a local interface...");
> #endif
>
>
> So this clearly explains why STUN is not used during the registration
> process. I tried to compile linphone with un-commented stun support,
> but the compilation fails. I also checked the source code of previous
> versions of linphone (2.1.1) and there (according to the source code)
> STUN is enabled
>
>
> When I looked further in "eXosip.c" I found out also the following
> strange thing, which might have a connection with the disabled STUN
> support
>
>
> if (now - jr->r_last_tr->birth_time > 900)
>           {
>             /* automatic refresh */
>             eXosip_register_send_register (jr->r_id, NULL);
>        }
>
>
> So my questions are
>
>
> 1. Is it possible to re-activate STUN again?
> 2. What is the purpose of these hard-coded 900 seconds?
>
> Thanks & Best Regards,
> Vesselin
>
>
> -------------------------------------
>
> Преоткрийте света със специалните младежки цени на турски авиолинии
> от 1 юни до 30 септември специални възможности за младежи
>   http://www.thy.com/bg-BG/index.aspx
>
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]