[asterisk-commits] file: trunk r100833 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 29 09:30:19 CST 2008
Author: file
Date: Tue Jan 29 09:30:19 2008
New Revision: 100833
URL: http://svn.digium.com/view/asterisk?view=rev&rev=100833
Log:
Make externip work as documented. If no port is specified it will use the value of bindport instead of always being 5060.
(closes issue #11858)
Reported by: hmodes
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=100833&r1=100832&r2=100833
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jan 29 09:30:19 2008
@@ -19895,7 +19895,6 @@
ourport_tcp = STANDARD_SIP_PORT;
ourport_tls = STANDARD_TLS_PORT;
bindaddr.sin_port = htons(STANDARD_SIP_PORT);
- externip.sin_port = htons(STANDARD_SIP_PORT);
global_srvlookup = DEFAULT_SRVLOOKUP;
global_tos_sip = DEFAULT_TOS_SIP;
global_tos_audio = DEFAULT_TOS_AUDIO;
@@ -20192,6 +20191,9 @@
if (ast_parse_arg(v->value, PARSE_INADDR, &externip))
ast_log(LOG_WARNING, "Invalid address for externip keyword: %s\n", v->value);
externexpire = 0;
+ /* If no port was specified use the value of bindport */
+ if (!externip.sin_port)
+ externip.sin_port = bindaddr.sin_port;
} else if (!strcasecmp(v->name, "externhost")) {
ast_copy_string(externhost, v->value, sizeof(externhost));
if (ast_parse_arg(externhost, PARSE_INADDR, &externip))
More information about the asterisk-commits
mailing list