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

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jul 13 12:58:35 CDT 2008


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:                     new
Asterisk Version:           1.4.21 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-13-2008 01:23 CDT
Last Modified:              07-13-2008 12:58 CDT
====================================================================== 
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

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

---------------------------------------------------------------------- 
 mvanbaak - 07-13-08 12:58  
---------------------------------------------------------------------- 
This is how OpenBSD outputs interface info with ifconfig:

$ /sbin/ifconfig trunk0
trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:15:58:c6:24:d8
	trunk: trunkproto loadbalance
		trunkport wpi0 active
		trunkport em0 active
	groups: trunk egress
	media: Ethernet autoselect
	status: active
	inet6 fe80::215:58ff:fec6:24d8%trunk0 prefixlen 64 scopeid 0x5
	inet 192.168.2.106 netmask 0xffffff00 broadcast 192.168.2.255
	inet6 2001:888:152c:0:215:58ff:fec6:24d8 prefixlen 64 autoconf pltime
604533 vltime 2591733 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-13-08 12:58  mvanbaak       Note Added: 0090167                          
======================================================================




More information about the asterisk-bugs mailing list