14 Apr 2022

SIP DNS Lookup

A fairly common SIP troubleshooting step is to check any DNS records are configured correctly. Typically this involves a combination of querying for SRV and A records. SIP DNS Lookup is a mini site that aims to make that a bit easier.

What does the site do?

It takes a root domain and does various DNS lookups that SIP servers do. SIP end points are often found via DNS SRV records, so instead of just Hostname -> IP (standard ‘A’ record) it’s Hostname -> Hostname, Port, Priority, Weight, and then Hostname -> IP.

SIP DNS in action

Easy view for all those SIP DNS records!

SRV records follow the format _service._protocol.domain.name. Where service in our case is sip and protocol is typically tcp or udp. The SRV wikipedia page does a good job of giving further details and background for those wanting to find out more.

All this means for the troubleshooting engineer to check some SIP DNS they need to manually query the different SRV names, then query again to go from the hostname inside the SRV answers to actual A records and make sure those respond as expected.

SRV hostnames could all be A or AAAA or both depending on whether the SIP provider is IPv4 and/or IPv6 capable. There are also some variations regarding SIP over TLS, with _sips._tcp and _sip._tls both being in use.

In short, there are a lot of lookups to do.

Prototype Tweaks / Extra Features

Having made a first draft site a few weeks ago I found myself wanting to share results. To achieve this the site will take any path supplied in the URL as a domain that you want to query. Good examples are sip-dns.falkus.co/webex.com, or sip-dns.falkus.co/prod.voipdnsservers.com.

For TLS SRV records it’s also common to want to then check the certificate is valid. To aid with this a link is auto generated to Namecheap’s SSL checker tool. I like the Namecheap tool as the interface is clean and it supports checking SSL certificates on any given port rather than assuming only HTTPS/443 is useful. My only complaint is it doesn’t support IPv6 endpoints.

How are the DNS lookups executed?

I don’t know of a way to do SRV DNS queries from JavaScript code running in the browser. However, Cloudflare’s 1.1.1.1 DNS endpoint supports DNS over HTTPS. Ideal for this type of site. It meant development was pure frontend work, giving a nice and quick project build.

Future plans

The site doesn’t do NAPTR records yet, which is yet another layer of DNS ‘fun’. Let me know if this would help you out and I’ll try add it. In my experience it’s nowhere near as prevalent as SRV records on their own are which is why I skipped for now.

SIP Dev SysAdmin
Back to posts