diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 15:44:28 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 15:44:28 +0000 |
commit | a152ac5a7afa274aed07f0f1e8f028a6fd956cb4 (patch) | |
tree | 2f8ed116f16277f2d79db370a09482f027e1b51b /channels | |
parent | 2e4ad7641c082e35fb32dfa93d69c54abc4b6067 (diff) |
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/trunk@164659 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 834472e7c..de7378fa0 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -22849,6 +22849,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); |