aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 15:47:10 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 15:47:10 +0000
commit23acb02cc41a1c6e8b3fba02fdfe5f315c1eab2a (patch)
tree2df2c1c9493da48eeae92053217bd79fb940af5e
parentb2b7577aed64c53c0f6c3ed9444afc3b06bd88c7 (diff)
Merged revisions 164659 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r164659 | file | 2008-12-16 11:44:28 -0400 (Tue, 16 Dec 2008) | 4 lines 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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@164662 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ff409439e..643b27502 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -21908,6 +21908,9 @@ static int reload_config(enum channelreloadreason reason)
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);