Date post: | 18-Aug-2015 |
Category: |
Engineering |
Upload: | ravi-surulikamu |
View: | 69 times |
Download: | 3 times |
Locating SIP Servers & ENUM
Ravi S06 August, 2009
Locating SIP Server
Defined in RFC 3263Uses DNSResolve the SIP URI
Next hop IP Address, Port & Transport
Failover & Load balancing
ENUM
Defined in RFC 3761Uses DNSIdentify services associated with tel URI
SIP Service is of importance to us
A little background...
(DNS & DNS Records)
Very few protocols...
When Internet was invented, there were very few protocolsE-mail – SMTPWorld Wide Web – HTTPDirectory lookup – LDAPetc.
Very simple DNS records...
What is the IP address of example.com ?A Record
What is the Mail Exchange server for example.com ?
MX Record
Very simple DNS procedure...
IP Address – found with DNS lookupA record lookup & MX record lookup
Port – fixedHTTP on 80, SMTP on 25 etc.
Transport – fixed
Protocols grew...
But DNS procedures remained sameIP Address is identified by A record lookupEach protocol is bound to its portTransport selection is handled independently by application
SRV record
Query based on service & protocolEg. sip/udp, http/tcp etc.
Services can run on any portSRV query returns the port
Failover & Loadbalancing support
SRV record – How to query?
Input to SRV query are domain-name, service and protocolConstruct SRV query string from the input
_service ._protocol .domain-name
Perform SRV lookup on the constructed query string
SRV record – How to query? (example)
For locating a UDP SIP server of example.comSRV query string is _sip._udp.example.comPerform SRV lookup on _sip._udp.example.com
SRV record – Result$ORIGIN example.com.
_sip._udp SRV 0 1 5060 p1.example.com. SRV 0 3 5061 p2.example.com. SRV 1 0 5060 p3.example.com. SRV 2 0 6070 p4.example.com.
SRV record - Failover
Least priority is "most preferred"_sip._udp SRV 0 0 5060 p1.example.com. SRV 1 0 5060 p2.example.com. SRV 2 0 5060 p3.example.com.
On failure to reach "most preferred" entry, the "next preferred" entry is attempted
_sip._udp SRV 0 0 5060 p1.example.com. SRV 1 0 5060 p2.example.com. SRV 2 0 5060 p3.example.com.
SRV record – Load Balancing$ORIGIN example.com.
_sip._udp SRV 0 1 5060 p1.example.com. SRV 0 3 5061 p2.example.com. SRV 0 6 5060 p3.example.com.
p3.example.com - 60%p2.example.com - 30%p1.example.com - 10%
Limitations of SRV record
Cannot query the list of services supportedCannot query the list of protocols supportedMultiple DNS query is required to find next-hop
NAPTR record
Query only on domain nameNAPTR response contains list of all services supported as individual recordVery flexibleApplication unique string -> Data
NAPTR record – Result$ORIGIN example.com. NAPTR 90 50 "s" "SIP+D2T" "" _sip._tcp NAPTR 100 50 "s" "SIP+D2U" "" _sip._udp NAPTR 100 50 "s" "http+I2R" "" _http._tcp NAPTR 100 50 "s" "ftp+I2R" "" _ftp._tcp
Locating SIP Server
Locating SIP Server (Explicit IP)
sip:[email protected] hop is (192.168.60.150, 5060, UDP)
sip:[email protected]:5070Next hop is (192.168.60.150, 5070, UDP)
sip:[email protected];transport=tcpNext hop is (192.168.60.150, 5060, TCP)
sip:[email protected]:5070;transport=tcpNext hop is (192.168.60.150, 5070, TCP)
Locating SIP Server (Domain & Explicit Port)
sip:[email protected]:5070Next hop is (A record of example.com, 5070, UDP)
sip:[email protected]:5070;transport=tcpNext hop is (A record of example.com, 5070, TCP)
Locating SIP Server (Domain & Explicit transport)
sip:[email protected];transport=tcpPerform SRV query on _sip._tcp.example.com IP Address is 'A' record of SRV responsePort is taken from SRV responseTransport is TCP
Locating SIP Server (Domain)
sip:[email protected] NAPTR query on example.com Filter responses based on service "SIP+D2U" / "SIP+D2T"Perform SRV query on the NAPTR responseIP Address is 'A' record of SRV responsePort is taken from SRV responseTransport is taken from NAPTR service field
ENUM
ENUM
Application Unique String - Tel URIConvert "Application Unique String" into "SIP URI"
ENUM - The Process
Normalize "Application Unique String"Create "Query String" from "Application Unique String"Perform NAPTR query on "Query String"Filter the response based on service "sip+E2U"Apply regex rule on "Application Unique String" to get "SIP URI"
ENUM - An example
"Application Unique String" - + 442079460148"Query String" - 8.4.1.0.6.4.9.7.0.2.4.4.e164.arpaPerform NAPTR query on 8.4.1.0.6.4.9.7.0.2.4.4.e164.arpaFilter the response based on service "sip+E2U"Apply regex rule on "Application Unique String" to get "SIP URI"
ENUM - An example (Contd.)$ORIGIN 8.4.1.0.6.4.9.7.0.2.4.4.e164.arpa.NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:[email protected]!" .