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: Aymeric Moizard
Subject: Re: [Linphone-developers] STUN support in linphone 3.0.0
Date: Thu, 2 Jul 2009 15:50:51 +0200 (CEST)



On Thu, 2 Jul 2009, Simon Morlat wrote:

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.

I know one!
The "outbound" specification (which is coming to an rfc soon?) use
stun keep alive with a stun server on the same socket used by the
SIP server. Thus, the information provided by this stun server is
correct and match the "received" and "rport".

The really interesting feature is that you can send each 20 seconds
a STUN request to your SIP server so that you are aware if you loosed
your binding or don't have access to your server.

This helped much to realize very soon that your nat has rebooted for
example or that you lost connectivity and have to register again.

That's needed for high availability of SIP phone ;)
-the other way: sending REGISTER/OPTIONS each 20 seconds is too much
overload for the SIP server and is not a good solution for high availability and scalability-

Tks!
Aymeric


Aymeric MOIZARD / ANTISIP
amsip - http://www.antisip.com
osip2 - http://www.osip.org
eXosip2 - http://savannah.nongnu.org/projects/exosip/


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



_______________________________________________
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]