[Asterisk-Users] SER vs STUND with Asterisk..

WipeOut wipe_out at lycos.co.uk
Wed Oct 15 14:58:55 MST 2003


Olle E. Johansson wrote:

> WipeOut wrote:
>
>> One for the gurus..
>
> Obviously not for me, but I'll dare to give it a shot anyway ;-)
>
>> Anyway, I decided to go and have a quick read through the SER docs 
>> and in the section about NAT they say that the best way to address 
>> NAT is to use STUN or uPNP..
>
>
> STUN is helpful, but as I understand it analyzes the situation and 
> reports
> the configuration of a NAT. It doesn't help you keeping the NAT 
> session open,
> as SER module nathelper or the FWD/Jasomi solution.
> Check here http://www.voip-info.org/wiki-SER+module+nathelper
> It's ugly, but what it does is sending UDP packets from the outside to 
> the
> NAT to keep the ports open for incoming calls. NAT is an ugly thing,
> so it propably needs ugly solutions... ;-) 

Looking at that page you mentioned it still seems to me that the 
"nathelper" module for SER and adding nat=yes to the sip.conf 
essentially do the same thing apart from the "NAT pings" you mentioned 
below..

>
>
> As I understand it, it works like this:
> * Client on the inside of a NAT registers to an outside SIP Proxy
> * THe outside SIP Proxy keeps sending UDP packets ("NAT PINGS") to the
>   client to keep the UDP session open in the NAT
> * When someone calls, the session is open and the client (UAC/S) may
>   answer...
> * In addition to the solution for handling SIP this way, there's a
>   need for an RTP media server to handle the RTP stream.

I guess that if you use SER or STUN and Asterisk the RTP is still going 
to be an issue if the call is needing to go between two SIP UA's that 
are both behind NAT (UA---NAT--Internet--NAT--UA) so the RTP streams are 
going to have to go via the central server (aka canreinvite=no in 
Asterisk).. So if NAT is in the picture you have no choice but to load 
the server with all the traffic..

>
>> So my question is would it not be better to couple STUND (Vovida.org) 
>> with Asterisk and then use nat=yes in the sip.conf for UA's that do 
>> not support STUN, instead of using SER which would be like learning 
>> Asterisk all over again and would require you to learn how to use the 
>> SER config language to manage your NAT transtaltions..
>
>
> Integrating a STUN server into ASterisk... I don't see the point. But if
> you're talking about asterisk as a SIP client (registrering to other SIP
> servers) supporting STUN to find out if it's behind a NAT and how the
> NAT works, yes, that's a good idea.

I wasn't talking about intergrating STUN into asterisk, I was thinking 
more along the lines of using STUND in conjunction with Asterisk instead 
of SER and Asterisk.. :)

>
>> To me the idea of using STUND just seems far simpler that using SER 
>> and they can probably quite easily run side bt side on the same server..
>>
>> Maybe I am missing something and someone can explain to me what it 
>> is? :)
>
> Well, in my mind it depends on the number of clients. For a large user
> base using SIP, SER is a better SIP proxy IMHO. But SER can't do all
> the things Asterisk is good at - PRI, ISDN, VoiceMail, Codec 
> conversion etc
> So the combination is a good solution.
>
> I have a request in for an outbound SIP proxy in the SIP.CONF for 
> Asterisk
> as a SIP client. If Asterisk supported Outbound SIP Proxys, I believe I
> could reach Free World Dialup from my Asterisk inside of my NAT. And
> the Free World Dialup /Jasomi proxy would keep the NAT session open.
>
> Maybe you could add STUN as another request on the SIP client side.
> BTW, X-lite now runs STUN at startup, if you want to debug.
>
> Ok. That was my 10c.
>
> /O

Your 10c is appreciated.. :)

Later..




More information about the asterisk-users mailing list