260 likes | 497 Views
RFC3824 Using E.164 numbers with the Session Initiation Protocol(SIP). Presented by: Jui-Pang Chen( 陳瑞邦 ) SID :94325524 Teacher: Quincy Wu . Outline. Introduction What is E.164 & SIP? How to use E.164 with SIP? ENUM Include DNS Security Considerations Summary. SIP Proxy. SIP Proxy.
E N D
RFC3824Using E.164 numbers with the Session Initiation Protocol(SIP) • Presented by: Jui-Pang Chen(陳瑞邦) • SID :94325524 • Teacher: Quincy Wu
Outline • Introduction • What is E.164 & SIP? • How to use E.164 with SIP? • ENUM • Include DNS • Security Considerations • Summary
SIP Proxy SIP Proxy Introduction ENUM Server 022341313 1 3 IP Network 4 SIP Phone PSTN Gateway 2 PSTN 1. IP<->IP OK 2. PSTN<->PSTN OK 3. IP->PSTN OK INVITE sip:022345678@xxx.com 4. PSTN->IP??? 022345678
What is E.164 • Defined by the ITU-T (International Telecommunication Union-Telecommunications) • ITU-T verifies the right to use of the country code ,Registerin IANA (Internet Assigned Numbers Authority) • People know how to use phone numbers • The number has uniqueness and popularization • Ex:+886-2-23411313(0223411313) (Fully E.164 Number) (Country Code ) (Area Code) (Block Code)
What is SIP • Originally Developed in the MMUSIC (Multiparty Multimedia Session Control), Sep. 1999 • 由IETF的SIP Working Group 發展,開始於1995 • Proposed standard RFC2543, February 1999 • New Version of SIP - RFC 3261, June 2002 • A Signaling Protocol • Application Layer • Create, Modify, Terminate Multimedia Sessions • Use IP • Client / Server • Similar to HTTP ,but peer-peer • Text-Based
What is ENUM • RFC2916,Telephone Number Mapping(ENUM) • ENUM is a mechanism to translate an E.164 number into list of URI • How to use ENUM • Register a number in official e164.arpa tree • Populate the DNS with NAPTR records • Lookup the records ENUM Mechanism E.164 Number URI with Service Domain Name System
Why use the DNS • DNS(Domain Name Service) • RFC1034 • Advantage • ENUM下使用者只需記住E.164 Number即可 • 使用者不用記憶IP address • 正解記錄檔 • Property • 分散式架構 • 分層輪詢 • Use the reason • 使用廣泛,全球通用,存取快速,架構開放 • 低成本而又能和 IP 相結合
正解記錄檔 $TTL 86400 ;預設 TTL value,每筆 RR TTL value可以此值代替 yahoo.com. IN SOA ns1.yahoo.com. hostmaster.yahoo-inc.com. ( 2002021301 ; serial 10800 ; refresh 3600 ; retry 604800 ; expire 86400 ; min ttl ) yahoo.com. IN NS ns1.yahoo.com. yahoo.com. IN NS ns2.yahoo.com ns2.yahoo.com. IN A 66.218.71.63 ns2.yahoo.com. IN A 66.163.169.170 www.yahoo.com. IN A 66.94.234.13 ftp.xxx.com.tw. IN CNAME www.yahoo.com. yahoo.com.tw. IN MX 10 mx4.mail.yahoo.com. • Resource Record (RR) • 各記錄檔每一行,都是一筆Resource Record
Resource Record • NS(Name server) RR (RFC1035) • 記錄之 OWNER 需接一 FQDN (Fully Qualified Domain Name)記錄,不可用 IP,記錄的取用順序是隨機決定 yahoo.com. 86400 IN NS ns1.yahoo.com. yahoo.com. 86400 IN NS ns2.yahoo.com. OWNER TTL CLASS TYPE RDATA • A(Address) RR (RFC1035) • 記錄為指出某一 FQDN 其 IP 為何 ns1.yahoo.com. 86400 IN A 66.218.71.63 ns2.yahoo.com. 86400 IN A 66.163.169.170 OWNER TTL CLASS TYPE RDATA
Resource Record(cont) • NS/A RR sample
Resource Record(cont) • CNAME(Canonical Name)RR (RFC1035) • Host(RDATA)別名的記錄 rc.tpe.yahoo.com. 86400 IN A 202.43.195.13 www.kimo.com.tw. 86400 IN CNAME rc.tpe.yahoo.com. CANONICAL-NAMETTL CLASS TYPE RDATA • CNAME RR sample
Resource Record(cont) • MX(Mail eXchange)RR (RFC1035) • 設定OWNER所使用的Mail Server yahoo.com. 86400 IN MX 5 mx4.mail.yahoo.com. OWNER TTL CLASS TYPE PREFERENCE RDATA • MX RR sample
Resource Record(cont) • PTR(Pointer)RR (RFC1035) • 反解->Translate IP address into the domain name • EX:163.22.4.67 67.4.22.163.in-addr.arpa. 86400 IN PTR www.ncnu.edu.tw. FQDN TTL CLASS TYPE RDATA • PTR RR sample
SIP Proxy SIP Proxy ENUMOperation 3 DNS ENUM Server SIP Phone 4 5 5 2 IP Network PSTN Gateway 1 PSTN • 使用者撥打電話號碼 • Translate an E.164 Number into the domain e164.arpa. • 再到DNS查詢此domain之NAPTR紀錄 • 依查到NAPTRrecords之優先次序依序轉換E.164號碼成URI • 連到所轉換之URI 1 Dial:022341313
Translate an E.164 Number into the domain e164.arpa • 將E.164 Number轉成含有國碼的格式,如(02)2341-1313要轉成+886-2-2341-1313 • 將所有非數字字元移除,變成 886223411313 • 在每個數字之間加上'.',變成8.8.6.2.2.3.4.1.1.3.1.3 • 將整個字串反轉(reverse)過來變成3.1.3.1.1.4.3.2.2.6.8.8 • 加上'.e164.arpa.'的domain變成3.1.3.1.1.4.3.2.2.6.8.8.e164.arpa
ENUM DNS DNS root . e164.arpa. Tier 0 RIPE NCC管理 該國政府審核通過(Ex:TWNIC) Tier 1 … 6.8.8.e164.arpa. 2.6.8.8.e164.arpa. 3.6.8.8.e164.arpa. Tier 2 … 使用者之服務資料 NAPTR records for +886-2-341313 NAPTR records for +886-3-456789
NAPTR Records • NAPTR(Naming Authority Pointer) • RFC2915 • 將一Domain Name對應到一個或多個URI,且有優先次序 • $ORIGIN 3.1.3.1.1.4.3.2.2.6.8.8.e164.arpa. • IN NAPTR 100 10"u" "E2U+sip" "!^.*$!sip:info@example.com!" . • IN NAPTR 100 20 "u" "E2U+mailto" "!^.*$!mailto:info@example.com!". ORDER PREFERENCE FLAGS SERVICES REGEXP REPLACEMENT • ORDER 當一電話號碼有多筆記錄,依此值決定順序 (數字小者先) • PREFERENCE 當ORDER又相同時,依此值決定順序 (數字小者先) • FLAGS "u",意指 URI • SERVICES 表述服務類型,如 "E2U+sip","E2U+mailto" • REGEXP 依正規表示式(regular expression)轉換URI • REPLACEMENT Domain Name
Services Parameters(RFC3761) • Ex : "E2U+sip" • service-field = "E2U" 1*(servicespec) • servicespec = "+" enumservice • enumservice = type 0*(subtypespec) • subtypespec = ":" subtype • subtype = 1*32(ALPHA / DIGIT)
REGEXP(regular expression) • ^限制字串必須出現於行首. • $限制字串必須出現於行末. • .*是greedy表示。符合任意一個字元且是 最長的符合 • This is a test. Test for regexp. • :%s/[Tt].*t/program/g Ans:program for regexp • 並非:program Test for regexp $ORIGIN 3.1.3.1.1.4.3.2.2.6.8.8.e164.arpa. IN NAPTR 100 10"u" "E2U+sip" "!^.*$!sip:user@example.com!".
SIP Proxy SIP Proxy Using NAPTR records 流程圖 • $ORIGIN 3.1.3.1.1.4.3.2.2.6.8.8.e164.arpa. • IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:user@example.com!" . • IN NAPTR 100 20 "u" "E2U+mailto" "!^.*$!mailto:info@example.com!". DNS 3 ENUM Server SIP Phone 4 4 4.1 IP Network user@example.com • 使用者撥打電話號碼 • 到ENUM DNS查詢 • 取得2個 URI • 撥接第一個位址,無接通 • 4.1 Response 480 • 撥打第二個位址,傳Mail 2 Mail Server PSTN Gateway 5 1 PSTN 1 info@example.com Dial:022341313
ENUM Subscriber edits NAPTR Source: OFEG
ENUM User queries with Enum Client Source: OFEG
ENUM services & enable Applications • ENUM 為一種結合DNS技術之號碼查詢服務 • 一個 E.164號碼可對應至多個服務位址 (URI) • 不同服務可使用ENUM, e.g,, VOIP+IM+… ENUM DNS Server • Enabled Applications • Voice over IP • Instant Messaging • IP Fax • Personal Web Pages IP Network PSTN Source: IETF
Security Considerations • Privacy considerations • All DNS records must be assumed to be available to all inquirers at all times • DNS is open • When you give someone your telephone number, you don't expect that they will be able to trivially determine your full name and place of employment • Not only an E.164 Number
Summary • 透過ENUM達到E.164 with SIP service • 加速voip服務之推廣 • ENUM • 整合PSTN及IP電信服務 • 達到號碼可攜式 • 僅僅只需一號碼 • 且利用既有的架構來整合 • E.164 & SIP & DNS • 節省電話網路之交換成本
References • RFC 3761 • E.164 to Uniform Resource Identifiers (URI) Dynamic Delegation Discovery System (DDDS) Application (ENUM) • RFC 2396 • Uniform Resource Identifiers (URI) • RFC 3263 • Session Initiation Protocol (SIP): Locating SIP Servers • RFC 3401,3402,3403,3404,3405 • Dynamic Delegation Discovery System (DDDS) • RIPE NCC(Reseaux Internet Protocol Europeans, Network Coordination Centre) • http://www.ripe.net/index.html