System information

(SIP being one of them). If you want to support SIP lookups on your domain, you will
require a relevant SRV record in order to properly respond.
When a SIP connection does a lookup on leif@shifteight.org, for the purposes of SIP,
the SRV record can respond that the requested service (SIP) is actually found on the
server pbx.shifteight.org (or possibly even on a completely different domain, such as
pbx.tothemoon.net).
Internet hosting providers typically offer a web-based interface for setting up DNS
records, but many of them do not provide a good interface for SRV records (assuming
they offer anything at all). You can generally set up A records and MX records easily
enough, but SRV records can be trickier. If your host does not support SRV records,
you will need to move your DNS hosting to another provider if you want to be able to
support SIP SRV lookups for your domain.
The majority of DNS servers run BIND (Berkeley Internet Name Daemon). The BIND
record for an SRV entry for SIP will look something like this:
_sip._udp.shifteight.org. 86400 IN SRV 0 0 5060 pbx.shifteight.org.
The form of the record is detailed in Table 12-1.
Table 12-1. Components of a SIP SRV record
Name Description Example
Service Symbolic name of service _sip.
Proto Transport protocol _udp.
Name Domain name for this record
a
shifteight.org.
TTL Time to live (in seconds) 86400
Class DNS class field (always IN) IN
Priority Target host priority 0
Weight Relative weight of this record 0
Port TCP/UDP port number 5060
Target Hostname of machine providing this service pbx.shifteight.org.
a
Note the trailing dot.
When you configure an SRV record, you can test it with the following Linux command:
# dig SRV _sip._udp.shifteight.org
The result will contain several components, but the section you are interested in is:
;; ANSWER SECTION:
_sip._udp.shifteight.org. 14210 IN SRV 0 0 5060 pbx.shifteight.org.
This means that your DNS server is responding correctly to an SRV lookup for
SIP to your domain by responding with the hostname of your PBX (in this case,
pbx.shifteight.org).
DNS and SIP URIs | 239