asterisk/configs
Luigi Rizzo 2286afa3af Enhance NAT support as discussed on the -dev list, i.e.:
+ extensive documentation changes both in sip.conf.sample and in the source;

+ allow "externip" and "externhost" to include a port number as well;

+ allow "bindaddr" to have a port number (making bindport unnecessary,
  even though it is still present for backward compatibility);

+ introduce the new "stunaddr" parameter to specify an STUN server to
  be used from the main SIP socket;

+ extend the "sip show settings" output to show all the above.

Internally:

+ change related data structures from struct in_addr to struct sockaddr_in
  to store the port numbers as well;

+ reorganize ast_sip_ouraddrfor() (should also be renamed to sip_ouraddrfor()
  because it is not a generic API, though it might become so if called with
  a socket as an additional argument, in which case it can be moved elsewhere).

As mentioned in the documentation, media sessions still do not use STUN so the
port numbers may still be incorrect when Asterisk is behind a NAT

On passing, some of the debugging messages printing media addresses are
probably using the wrong values, but this will be checked/fixed in a
subsequent commit if needed.

Part of the following chunk in the function that handles a "sip reload" is
probably needed on previous versions as well, to avoid leaking the memory
used for the "localaddr" list:

@@ -17244,13 +17274,17 @@
 
        /* Reset IP addresses  */
        memset(&bindaddr, 0, sizeof(bindaddr));
+       memset(&stunaddr, 0, sizeof(stunaddr));
+       memset(&internip, 0, sizeof(internip));
+       /* Free memory for local network address mask */
+ --->  ast_free_ha(localaddr);					<-----
        memset(&localaddr, 0, sizeof(localaddr));
        memset(&externip, 0, sizeof(externip));
        memset(&default_prefs, 0 , sizeof(default_prefs));



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21 01:01:10 +00:00
..
adsi.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
adtranvofr.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
agents.conf.sample add the ability to turn off the feature that allows agents to end calls 2006-04-15 22:32:23 +00:00
alarmreceiver.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
alsa.conf.sample Merged revisions 42716 via svnmerge from 2006-09-11 16:41:49 +00:00
amd.conf.sample Changing syntax once again slightly and standardizing 2006-02-20 18:30:49 +00:00
asterisk.adsi remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
cdr.conf.sample Merged revisions 60323 via svnmerge from 2007-04-05 22:40:42 +00:00
cdr_adaptive_odbc.conf.sample Merge cdr_adaptive_odbc from developer branch 2007-05-18 20:21:11 +00:00
cdr_custom.conf.sample Merged revisions 60323 via svnmerge from 2007-04-05 22:40:42 +00:00
cdr_manager.conf.sample This enhancement provided via bug 9993, a patch to upgrade cdr_manager to have cdr_custom capabilities. Many thanks to eserra for this contribution 2007-06-19 20:38:21 +00:00
cdr_odbc.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
cdr_pgsql.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
cdr_sqlite3_custom.conf Merge changes from team/russell/sqlite: 2007-03-13 21:22:33 +00:00
cdr_tds.conf.sample allows the table field to be configurable for 2006-03-08 22:12:20 +00:00
codecs.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
dnsmgr.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
dundi.conf.sample Add the ability to dynamically specify weights for responses to DUNDi queries. 2007-03-07 22:30:52 +00:00
enum.conf.sample Merged revisions 42716 via svnmerge from 2006-09-11 16:41:49 +00:00
extconfig.conf.sample Merge changes from team/russell/sqlite: 2007-03-13 21:22:33 +00:00
extensions.ael.sample Merged revisions 43739 via svnmerge from 2006-09-27 02:46:50 +00:00
extensions.conf.sample Merged revisions 59452 via svnmerge from 2007-03-30 01:16:22 +00:00
extensions_minivm.conf.sample Mini-voicemail - an embryo for a new voicemail system based on building 2007-04-18 07:57:18 +00:00
features.conf.sample Add support for configuring named groups of custom call features in 2007-05-31 18:21:47 +00:00
festival.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
followme.conf.sample remove some extraneous 'followme' in prompt names 2006-08-07 18:47:33 +00:00
func_odbc.conf.sample Issue 9799 - Multirow results for func_odbc 2007-05-31 15:05:56 +00:00
gtalk.conf.sample seperate jingle and gtalk so it will be easier to track 2006-09-18 16:36:14 +00:00
h323.conf.sample Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The 2007-04-30 16:16:26 +00:00
http.conf.sample Merged revisions 60603 via svnmerge from 2007-04-06 21:16:38 +00:00
iax.conf.sample Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The 2007-04-30 16:16:26 +00:00
iaxprov.conf.sample Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The 2007-04-30 16:16:26 +00:00
indications.conf.sample Merged revisions 62497 via svnmerge from 2007-05-01 16:27:14 +00:00
jabber.conf.sample solves some bugs with memory allocation, and adds 2006-06-07 22:43:20 +00:00
jingle.conf.sample asterisk-xmpp merge in 2006-05-22 21:12:30 +00:00
logger.conf.sample Add option to logger to rename log files with timestamp (issue #8020 reported by jmls) 2006-10-02 17:54:21 +00:00
manager.conf.sample Add manager events for RTCP statistics. 2007-06-21 23:07:20 +00:00
meetme.conf.sample Merged revisions 55006 via svnmerge from 2007-02-16 22:50:22 +00:00
mgcp.conf.sample Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The 2007-04-30 16:16:26 +00:00
minivm.conf.sample Mini-voicemail - an embryo for a new voicemail system based on building 2007-04-18 07:57:18 +00:00
misdn.conf.sample added general Jitterbuffer Implementation. #9960 2007-07-05 07:45:21 +00:00
modem.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
modules.conf.sample remove documentation of 'global' section in modules.conf, since it is no longer needed or supported 2006-08-25 14:14:27 +00:00
musiconhold.conf.sample Add a new feature for Music on Hold. If you set the "digit" option for a 2007-05-22 18:52:59 +00:00
muted.conf.sample I've been meaning to add some explanation about muted... here it is 2006-10-04 17:10:53 +00:00
osp.conf.sample Fix a couple of typos in the sample osp.conf. 2007-01-16 01:20:06 +00:00
oss.conf.sample Merged revisions 42716 via svnmerge from 2006-09-11 16:41:49 +00:00
phone.conf.sample Add support for G729 passthrough with Sigma Designs boards. (issue #8829 reported by ywalther) 2007-01-16 17:23:31 +00:00
privacy.conf.sample remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
queues.conf.sample oops - silly typo there 2007-05-14 18:14:56 +00:00
res_config_sqlite.conf Merge changes from team/russell/sqlite: 2007-03-13 21:22:33 +00:00
res_odbc.conf.sample Feature: allow the sanity SQL to be customized per connection class (Issue 6453) 2006-11-13 05:58:14 +00:00
res_pgsql.conf.sample Merged revisions 63329 via svnmerge from 2007-05-07 22:32:50 +00:00
res_snmp.conf.sample Add SNMP support (bug #6439) 2006-02-26 20:46:11 +00:00
rpt.conf.sample Added docs for new features (duplex mode & tailmessages) 2005-12-20 23:53:26 +00:00
rtp.conf.sample Issue #2863 - Improved RTCP support (John Martin, Fredrik Olsson) 2006-06-05 08:39:42 +00:00
say.conf.sample Add support for default "say mode" (whether to use the "old" method or "new" method. "new" method being config file) 2007-07-20 22:25:41 +00:00
sip.conf.sample Enhance NAT support as discussed on the -dev list, i.e.: 2007-07-21 01:01:10 +00:00
sip_notify.conf.sample Merged revisions 59040 via svnmerge from 2007-03-19 15:43:15 +00:00
skinny.conf.sample Add support for regcontext and regexten to chan_skinny 2007-06-29 21:37:43 +00:00
sla.conf.sample Merged revisions 58957 via svnmerge from 2007-03-16 01:43:41 +00:00
smdi.conf.sample Merged revisions 42716 via svnmerge from 2006-09-11 16:41:49 +00:00
telcordia-1.adsi remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
udptl.conf.sample Bug 5090 - sample configuration for udptl packets 2006-01-16 18:05:19 +00:00
users.conf.sample Merged revisions 54002 via svnmerge from 2007-02-12 15:48:28 +00:00
voicemail.conf.sample Added ability to customize which buttons control forward, reverse, pause, and stop during message playback. 2007-06-27 22:47:08 +00:00
vpb.conf.sample Merged revisions 42716 via svnmerge from 2006-09-11 16:41:49 +00:00
zapata.conf.sample These changes were submitted via bug 6683, to allow CID detection in India, with carriers that do Polarity/DTMF CID signalling. 2007-06-19 17:07:28 +00:00