DNS lookup question - Domain URI appended by local domain attempts on SRV lookup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DNS lookup question - Domain URI appended by local domain attempts on SRV lookup

Jock McKechnie
Good afternoon;

We have a few customers that we send calls to their network by domain
name - for example, sip:[hidden email].

OpenSIPS' default behaviour is to initially look for an SRV record and
then if it cannot locate one, to search for an A record. This is the
correct behaviour, of course.

In our example, let us assume the Fully Qualified Domain Name of the
OpenSIPS server is: handoff.rackA.datacentreB.provider.com
And, further, that this customer does not have an SRV record and only
an A record.

What I have discovered is that OpenSIPS follows a DNS lookup pattern like this:
Query ServerA: SRV? _sip._udp.server01.customer123.com. (NXDOMAIN)
Query ServerB: SRV? _sip._udp.server01.customer123.com. (NXDOMAIN)
(up to dns_retr_no times)
Query ServerA: SRV?
_sip._udp.server01.customer123.com.rackA.datacentreB.provider.com.
(SERVFAIL)
Query ServerB: SRV?
_sip._udp.server01.customer123.com.rackA.datacentreB.provider.com.
(SERVFAIL)
(up to dns_retr_no times)
Query ServerA: A? server01.customer123.com (A: 10.10.10.123)

At which point, at least in my example, we now get a valid A record back.

Unfortunately there's a twist here - while searching for the SRV of
the customer domain gets an NXDOMAIN, which is cached appropriately by
the resolvers, the combined "destination+local" address
(_sip._udp.server01.customer123.com.rackA.datacentreB.provider.com)
does not for reasons I am unsure of, and instead gets a SERVFAIL. This
is *not* cached and subsequently for every single lookup we're getting
some not insignificant delays - worse yet, we've just added a whole
bunch of nameservers which have made it bad enough we've noticed it.
We could reduce the number of nameservers we query (Thank you,
dns_servers_no) but we want to give best chance that we can do a
successful DNS lookup (and faulty resolvers have recently bitten us).

I need DNS look up, and I need SRV look up to happen. But there will
*never* be a case where we will pass a call to a local destination
that needs the local domain name to be tacked onto it. Is there any
way to not do this? To search for
"_sip._udp.server01.customer123.com." and then skip right to the A
record?

It's entirely possible this is done somewhere inside libresolv and
it's completely outside of OpenSIPS' control, but I wanted to ask in
case I'm just completely missing it in the 'core parameters'
documentation.

As always, my thanks for your time;

 - Jock

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users