[Asterisk-Dev] sip nat autodetect?

John Todd jtodd at loligo.com
Sat Oct 18 17:05:41 MST 2003


At 3:03 PM -0400 10/18/03, Jared Mauch wrote:
>On Fri, Oct 17, 2003 at 11:42:55PM -0700, John Todd wrote:
>>  >	I'm wondering if there is a way I can set in
>>  >my sip.conf a block of ip ranges that if it sees the
>>  >registers from that ip it can change the sip peer to nat=yes automatically.
>  > >
>  > >	eg: 10/8, 172.16/14, 192.168/16, etc..?
>>  >
>  > >	- jared
>  >
>>  Yes, I thought of that same idea some time ago, but then I thought:
>>  why would it be a problem to put "nat=yes" in for all hosts?
>
>	That doesn't work for non-natted 7960's in my environment
>at least.
>
>>  However, I do see your point, and there are perhaps instances where
>>  "nat=yes" can do some harm if the host is not behind NAT.  Do I hear
>>  you volunteering for a patch?  ;-)
>
>	I was hoping there was a nat=autodetect choice that
>I was unaware of :)
>
>	- Jared

No such luck, I'm afraid.  I think I actually proposed that some time 
ago, but as with so many things, if nobody codes it, it doesn't 
appear in the CVS tree.  :-)  I think it would be a good addition, 
because I've now been told that some (all?) of the Grandstreams have 
problems if nat= is set incorrectly.  I'm sure there may be others 
that choke on the wrong settings, as well.


I'm interested in the problems you're having with 7960's and 
non-natted environments not working with "nat=1" - I have several 
7960's that aren't behind NAT, but I have "nat=1" set for them.  No 
problems, ever.  They are running 4.4, and here's the snip of the 
relevant config files for the Cisco 7960 that the pull from my tftp 
server:


# NAT/Firewall Traversal
nat_enable: "1"
nat_address: ""
voip_control_port: "5060"
start_media_port: "16384"
end_media_port:  "32766"
nat_received_processing: "1"


JT



More information about the asterisk-dev mailing list