[Asterisk-Users] Asterisk behind LinkSys NAT Routing

Chris Albertson chrisalbertson90278 at yahoo.com
Mon Nov 3 20:04:31 MST 2003


> In Bug ID 0000104, a patch was suggested that takes the netmask into 
> effect and makes the right decision for phones on either side of the
> NAT. 
> However, the code that was added for "externip" in the current CVS
> isn't 
> that patch; it's just a way of giving me a choice of having SIP
> phones on 
> the outside of the NAT working, or having SIP phones on the inside of
> the 
> NAT working, but not both at the same time.


There were two patches last wheek that did the "right thing".
and checked before stuffing in the external IP address.
These were developed independently.
Who ever put the code into CVS goofed if the subnet check was
ommitted.  Easy enough to fix your
own prevate copy of chan_sip.c until things get put right.





> 
> I guess I'm curious why the hard-coded global option was used,
> because it 
> doesn't really solve the problem in the general case. The whole
> trouble 
> with NAT is that Asterisk may need to use a different IP address 
> depending on the IP address of the SIP client it's communicating
> with, 

I'm assuming the "reason" why is simply a cut and past goof up.

STUN reduce the need for much manual configuration.  The "final fix"
will be to have chan_sip.c look at the results of a STUN query and
then put the "right stuff" in the SIP packets, be that the 
external IP address or something else.

Another very much needed fix to SIP is to allow Astrisk to
use SIP proxys.  Just this one thing would allow Asterisk to
rout SIP via (say) SER.  and SER can do magic with the headers
and users a "perl-like" config file that alows complex SIP
routing.

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