Top Banner
Locating SIP Servers & ENUM Ravi S 06 August, 2009
27
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Locating SIP Server & ENUM

Locating SIP Servers & ENUM

Ravi S06 August, 2009

Page 2: Locating SIP Server & ENUM

Locating SIP Server

Defined in RFC 3263Uses DNSResolve the SIP URI

Next hop IP Address, Port & Transport

Failover & Load balancing

Page 3: Locating SIP Server & ENUM

ENUM

Defined in RFC 3761Uses DNSIdentify services associated with tel URI

SIP Service is of importance to us

Page 4: Locating SIP Server & ENUM

A little background...

(DNS & DNS Records)

Page 5: Locating SIP Server & ENUM

Very few protocols...

When Internet was invented, there were very few protocolsE-mail – SMTPWorld Wide Web – HTTPDirectory lookup – LDAPetc.

Page 6: Locating SIP Server & ENUM

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

Page 7: Locating SIP Server & ENUM

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

Page 8: Locating SIP Server & ENUM

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

Page 9: Locating SIP Server & ENUM

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

Page 10: Locating SIP Server & ENUM

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

Page 11: Locating SIP Server & ENUM

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

Page 12: Locating SIP Server & ENUM

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.

Page 13: Locating SIP Server & ENUM

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.

Page 14: Locating SIP Server & ENUM

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%

Page 15: Locating SIP Server & ENUM

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

Page 16: Locating SIP Server & ENUM

NAPTR record

Query only on domain nameNAPTR response contains list of all services supported as individual recordVery flexibleApplication unique string -> Data

Page 17: Locating SIP Server & ENUM

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

Page 18: Locating SIP Server & ENUM

Locating SIP Server

Page 19: Locating SIP Server & ENUM

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)

Page 20: Locating SIP Server & ENUM

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)

Page 21: Locating SIP Server & ENUM

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

Page 22: Locating SIP Server & ENUM

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

Page 23: Locating SIP Server & ENUM

ENUM

Page 24: Locating SIP Server & ENUM

ENUM

Application Unique String - Tel URIConvert "Application Unique String" into "SIP URI"

Page 25: Locating SIP Server & ENUM

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"

Page 26: Locating SIP Server & ENUM

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"

Page 27: Locating SIP Server & ENUM

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]!" .