[asterisk-bugs] [Asterisk 0013065]: [patch] sip_nat_settings - script to generate externip and localnet

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 9 16:44:37 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13065 
====================================================================== 
Reported By:                tzafrir
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13065
Category:                   Utilities/NewFeature
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.4.21 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-13 01:23 CDT
Last Modified:              2009-01-09 16:44 CST
====================================================================== 
Summary:                    [patch] sip_nat_settings - script to generate
externip and localnet
Description: 
If an Asterisk system is behind NAT, SIP calls outside will usually have no
audio unless externip and localnet are set.

In most cases (a single network interface) it is possible to give a sane
value for localnet. figuring out externip cannot be done locally. I simply
ended up asking http://whatismyip.org/ (and big thanks to whoever set it
up). 

Naturally those are sane defaults only if I know in advance that the
system is behind NAT.

I used it with asterisk 1.4 on several occasions. AFAIK it is still needed
(and with the same ocnfiguration directives) in trunk.

Example output:

externip = 62.90.10.53
localnet = 192.168.0.255/255.255.255.0

====================================================================== 

---------------------------------------------------------------------- 
 (0097391) mvanbaak (manager) - 2009-01-09 16:44
 http://bugs.digium.com/view.php?id=13065#c97391 
---------------------------------------------------------------------- 
172.16.1.0/255.255.255.0 and 172.16.1.255/255.255.255.0 are the same.
The broadcast is most of the time the last ip in the range, and the
network the first. The subnetmask is just a bitmask that indicates what the
range is.
172.16.1.0/255.255.255.0 and 172.16.1.255/255.255.255.0 both come down to:
172.16.1/24

And since we can get the broadcast and the subnetmask this way it doesn't
matter. It will work both ways.

As for the DNS failure thing: if DNS fails asterisk has more severe issues
with that. Feel free to add some extra stuff to this script if you want,
otherwise I'm ok with how it is now and vote for commit 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-09 16:44 mvanbaak       Note Added: 0097391                          
======================================================================




More information about the asterisk-bugs mailing list