[Asterisk-Users] Asterisk behind LinkSys NAT Routing

Chris Albertson chrisalbertson90278 at yahoo.com
Mon Nov 3 19:49:42 MST 2003


--- John Todd <jtodd at loligo.com> wrote:
> >I'm replying to my own post because it is not clear.
> >
> >1) STUN can find all the firewalls between Aterisk
> >and whatever else.  It can also find what your public
> >IP address it.
> 
> Correct.
> 
> >2) THere is an easy to use opensource STUN library
> >available but I'm not yet sure how acivly developed it is
> >currently.  It's e-mail list seems very inactive.
> 
> My perception of the STUN code is that it's fairly simple to 
> understand, and that it "just works," therefore there are few 
> questions on a mature package that needs no additional features at 
> this time.  I could be wrong...

The developers describe their work as "alpha" Perhaps that description
needs updating but they've not done so yet.  Current version is
0.8.3  But it dose look resonably complete and easy to use
> 
> >3) Suggestions please:  Where is Asterisk should STUN
> >code go?  I figure  not in any of the chan_*.c routines
> >as NAT environment is global to all channels.  You can't
> >just do it once at startup either as the environment may
> >be dynamic
> 
> I don't see why it wouldn't go into the respective channel 
> configuration files, and into the applications that ran against those
> 
> files.  Perhaps reference some shared library, but I suspect that the
> 
> configurations should be in each file independently, so each channel 
> type can carry it's own data structures for internal/external IP 
> address data (which you may want to be different on a 
> channel-by-channel or even host-by-host basis.)

What "STUN" tells you is the characteristics of a firewall.
Hard to see how a firewall possibly not even under your
control can chage on a per-channel basis.   Possibly, I think
we make a STUN module that any channel can call.  The module
contains a cache of stun results.  I think this lets each
channel look at different interfaces while reducing the global
number of STUN querries.

WHat I'm afraid of is the time.  A call to the STUN library can take
many seconds to return.  You can't hang a channel waiting that long.
The call to the stun lib should be asynchronus


> 
> JT
> 
> 
> >
> >--- Chris Albertson <chrisalbertson90278 at yahoo.com> wrote:
> >
> >>
> >>  Hasn't anyone simply _looked_ at the code?  This sounds like the
> >>  patch that was posted here to this mailing list last week.
> >>  Did it make it into CVS already?
> >>
> >>  Yes, "STUN" is the way to go.  It can find out what your external
> >>  IP address is and what kind of firewall you have.
> >>
> >>  I'm currently trying to learn more about STUN and how it could be
> >>  added
> >>  into Astrisk.  You certaily can't have Asterisk block and wait
> >>  for a STUN server so I think STUN goes in a new thread.  Who
> >>  to do that?  There seem to be enough examples already in Asterisk
> >>  I'm reading these.  The other problem is trying to contact the
> >>  maintainer of the STUN library.  So far my own post asking "Who
> >>  maintains this?" is the only message  I've seen on their list.
> >>  Perhaps the answer is "no one"?
> >
> >
> >=====
> >Chris Albertson
> >   Home:   310-376-1029  chrisalbertson90278 at yahoo.com
> >   Cell:   310-990-7550
> >   Office: 310-336-5189  Christopher.J.Albertson at aero.org
> >   KG6OMK
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users


=====
Chris Albertson
  Home:   310-376-1029  chrisalbertson90278 at yahoo.com
  Cell:   310-990-7550
  Office: 310-336-5189  Christopher.J.Albertson at aero.org
  KG6OMK

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/



More information about the asterisk-users mailing list