diff options
author | Olle Johansson <oej@edvina.net> | 2007-02-14 16:20:48 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2007-02-14 16:20:48 +0000 |
commit | 276b570c3ead6ea119ca750fb6674fa4c5ece593 (patch) | |
tree | 3751c85c88bb9e693f39c8c87ca5d064145810ea | |
parent | 0653be0c33fc07f2066274c56171306b9125ca9d (diff) |
Issue #9060 - host= parameter in sip.conf stopped working
caused by outbound proxy patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 92b4da339..1b470358a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16261,6 +16261,11 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ast_sched_del(sched, peer->expire); peer->expire = -1; ast_clear_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC); + if (ast_get_ip_or_srv(&peer->addr, v->value, global_srvlookup ? "_sip._udp" : NULL)) { + unref_peer(peer); + return NULL; + } + ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost)); if (!peer->addr.sin_port) peer->addr.sin_port = htons(STANDARD_SIP_PORT); |