[svn-commits] file: trunk r164659 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 16 09:44:29 CST 2008


Author: file
Date: Tue Dec 16 09:44:28 2008
New Revision: 164659

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164659
Log:
When using externhost make sure the port gets set to the bindaddr port if one was not specified in the externhost value itself.
(closes issue #13634)
Reported by: performer

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=164659&r1=164658&r2=164659
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Dec 16 09:44:28 2008
@@ -22849,6 +22849,9 @@
 			if (ast_parse_arg(externhost, PARSE_INADDR, &externip))
 				ast_log(LOG_WARNING, "Invalid address for externhost keyword: %s\n", externhost);
 			externexpire = time(NULL);
+			/* 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, "externrefresh")) {
 			if (sscanf(v->value, "%d", &externrefresh) != 1) {
 				ast_log(LOG_WARNING, "Invalid externrefresh value '%s', must be an integer >0 at line %d\n", v->value, v->lineno);




More information about the svn-commits mailing list