From 458e89f6479fce3466cb9f1d55e2119d3517d0c6 Mon Sep 17 00:00:00 2001 From: oej Date: Wed, 30 Aug 2006 14:36:46 +0000 Subject: Issue #7822 - don't issue SRV lookups if it's disabled. (barthek) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41335 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'channels') diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ce231bf3b..efc89caaa 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15296,7 +15296,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int peer->expire = -1; ast_clear_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC); if (!obproxyfound || !strcasecmp(v->name, "outboundproxy")) { - if (ast_get_ip_or_srv(&peer->addr, v->value, "_sip._udp")) { + if (ast_get_ip_or_srv(&peer->addr, v->value, srvlookup ? "_sip._udp" : NULL)) { ASTOBJ_UNREF(peer, sip_destroy_peer); return NULL; } @@ -15653,7 +15653,7 @@ static int reload_config(enum channelreloadreason reason) } else if (!strcasecmp(v->name, "fromdomain")) { ast_copy_string(default_fromdomain, v->value, sizeof(default_fromdomain)); } else if (!strcasecmp(v->name, "outboundproxy")) { - if (ast_get_ip_or_srv(&outboundproxyip, v->value, "_sip._udp") < 0) + if (ast_get_ip_or_srv(&outboundproxyip, v->value, srvlookup ? "_sip._udp" : NULL) < 0) ast_log(LOG_WARNING, "Unable to locate host '%s'\n", v->value); } else if (!strcasecmp(v->name, "outboundproxyport")) { /* Port needs to be after IP */ -- cgit v1.2.3