backport fix from HEAD branch

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-11-21 19:31:26 +00:00
parent 00d7e962a7
commit 3b50570c9b
3 changed files with 8 additions and 1 deletions

View File

@@ -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)) {