diff options
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-x | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e6faa6b4e..0daf12f89 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12100,8 +12100,11 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int } if (!strcasecmp(v->name, "outboundproxy")) obproxyfound=1; - else + else { ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost)); + if (!peer->addr.sin_port) + peer->addr.sin_port = htons(DEFAULT_SIP_PORT); + } } } else if (!strcasecmp(v->name, "defaultip")) { if (ast_get_ip(&peer->defaddr, v->value)) { |