diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 15:45:46 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 15:45:46 +0000 |
commit | e018a5bfd897a2ead340801f79bd19dc8f1257e5 (patch) | |
tree | b9bbce8d719a909c2e34999bff246f31f40e9d56 /channels | |
parent | 87abeb28af5ce25e39ced23a24d06209ecfe240c (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.0@164660 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e544de462..fb7ac928d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -21297,6 +21297,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); |