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

Olle E. Johansson oej at edvina.net
Wed Oct 15 13:46:07 MST 2003


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... ;-)

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.

> 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.

> 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




More information about the asterisk-users mailing list