RFC2916 TEL URI转换为SIP URL的方法

来源:百度文库 编辑:神马文学网 时间:2024/03/29 22:56:36
Network Working Group                                        P. FaltstromRequest for Comments: 2916                             Cisco Systems Inc.Category: Standards Track                                  September 2000
E.164 number and DNS
Status of this MemoThis document specifies an Internet standards track protocol for theInternet community, and requests discussion and suggestions forimprovements.  Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol.  Distribution of this memo is unlimited.Copyright NoticeCopyright (C) The Internet Society (2000).  All Rights Reserved.
AbstractThis document discusses the use of the Domain Name System (DNS) forstorage of E.164 numbers.  More specifically, how DNS can be used foridentifying available services connected to one E.164 number.Routing of the actual connection using the service selected usingthese methods is not discussed.
1. IntroductionThrough transformation of E.164 numbers into DNS names and the use ofexisting DNS services like delegation through NS records, and use ofNAPTR [1] records in DNS [2] [3], one can look up what services areavailable for a specific domain name in a decentralized way withdistributed management of the different levels in the lookup process.
1.1 TerminologyThe key words "MUST", "REQUIRED", "SHOULD", "RECOMMENDED", and "MAY"in this document are to be interpreted as described in RFC2119 [4].
2. E.164 numbers and DNSThe domain "e164.arpa" is being populated in order to provide theinfrastructure in DNS for storage of E.164 numbers.  In order tofacilitate distributed operations, this domain is divided intosubdomains.  Holders of E.164 numbers which want to be listed in DNS
should contact the appropriate zone administrator in order to belisted, by examining the SOA resource record associated with thezone, just like in normal DNS operations.Of course, as with other domains, policies for such listings will becontrolled on a subdomain basis and may differ in different parts ofthe world.To find the DNS names for a specific E.164 number, the followingprocedure is to be followed:1.  See that the E.164 number is written in its full form, includingthe countrycode IDDD.  Example: +46-8-97612342.  Remove all non-digit characters with the exception of the leading'+'.  Example: +46897612343.  Remove all characters with the exception of the digits.  Example:46897612344.  Put dots (".") between each digit.  Example: 4.6.8.9.7.6.1.2.3.45.  Reverse the order of the digits.  Example: 4.3.2.1.6.7.9.8.6.46.  Append the string ".e164.arpa" to the end.  Example:4.3.2.1.6.7.9.8.6.4.e164.arpa
2.1 Special note about the '+'The '+' is kept in stage 2 in section 2 to flag that the number whichthe regular expression is operating on is a E.164 number.  Futurework will be needed to determine how other numbering plans (such asclosed ones) might be identified.  It is possible, but not definite,that they would use a similar mechanism as the one described in thisdocument.
3. Fetching URIs given an E.164 numberFor a record in DNS, the NAPTR record is used for identifyingavailable ways of contacting a specific node identified by that name.Specifically, it can be used for knowing what services exists for aspecific domain name, including phone numbers by the use of thee164.arpa domain as described above.The identification is using the NAPTR resource record defined for usein the URN resolution process, but it can be generalized in a waythat suits the needs specified in this document.It is the string which is the result of step 2 in section 2 abovewhich is input to the NAPTR algorithm.
3.1 The NAPTR recordThe key fields in the NAPTR RR are order, preference, service, flags,regexp, and replacement.  For a detailed description, see:o  The order field specifies the order in which records MUST beprocessed when multiple NAPTR records are returned in response toa single query.o  The preference field specifies the order in which records SHOULDbe processed when multiple NAPTR records have the same value of"order".o  The service field specifies the resolution protocol and resolutionservice(s) that will be available if the rewrite specified by theregexp or replacement fields is applied.o  The flags field contains modifiers that affect what happens in thenext DNS lookup, typically for optimizing the process.o  The regexp field is one of two fields used for the rewrite rules,and is the core concept of the NAPTR record.o  The replacement field is the other field that may be used for therewrite rule.Note that the client applies all the substitutions and performs alllookups, they are not performed in the DNS servers.  Note that URIsare stored in the regexp field.
3.1.1 Specification for use of NAPTR Resource RecordsThe input is an E.164 encoded telephone number.  The output is aUniform Resource Identifier in its absolute form according to the'absoluteURI' production in the Collected ABNF found in RFC2396 [5]An E.164 number, without any characters but leading '+' and digits,(result of step 2 in section 2 above) is the input to the NAPTRalgorithm.The service supported for a call is E2U.
3.1.2 Specification of Service E2U (E.164 to URI)* Name: E.164 to URI* Mnemonic: E2U* Number of Operands: 1* Type of Each Operand: First operand is an E.164 number.* Format of Each Operand: First operand is the E.164 number in theform as specified in step 2 in section 2 in this document.* Algorithm: Opaque* Output: One or more URIs* Error Conditions:o E.164 number not in the numbering plano E.164 number in the numbering plan, but no URIs exist forthat numbero Service unavailable* Security Considerations:o Malicious RedirectionOne of the fundamental dangers related to any service suchas this is that a malicious entry in a resolver's databasewill cause clients to resolve the E.164 into the wrong URI.The possible intent may be to cause the client to retrievea resource containing fraudulent or damaging material.o Denial of ServiceBy removing the URI to which the E.164 maps, a maliciousintruder may remove the client's ability to access theresource.This operation is used to map a one E.164 number to a list of URIs.The first well-known step in the resolution process is to remove allnon-digits apart from the leading '+' from the E.164 number asdescribed in step 1 and 2 in section 2 of this document.
3.2 Examples
3.2.1 Example 1$ORIGIN 4.3.2.1.6.7.9.8.6.4.e164.arpa.IN NAPTR 100 10 "u" "sip+E2U"    "!^.*$!sip:info@tele2.se!"     .IN NAPTR 102 10 "u" "mailto+E2U" "!^.*$!mailto:info@tele2.se!"  .This describes that the domain 4.3.2.1.6.7.9.8.6.4.e164.arpa ispreferably contacted by SIP, and secondly by SMTP.In both cases, the next step in the resolution process is to use theresolution mechanism for each of the protocols, (SIP and SMTP) toknow what node to contact for each.
3.2.2 Example 2$ORIGIN 4.3.2.1.6.7.9.8.6.4.e164.arpa.IN NAPTR  10 10 "u" "sip+E2U"     "!^.*$!sip:paf@swip.net!"    .IN NAPTR 102 10 "u" "mailto+E2U"  "!^.*$!mailto:paf@swip.net!" .IN NAPTR 102 10 "u" "tel+E2U"     "!^.*$!tel:+4689761234!"     .Note that the preferred method is to use the SIP protocol, but theresult of the rewrite of the NAPTR record is a URI (the "u" flag inthe NAPTR record).  In the case of the protocol SIP, the URI might bea SIP URI, which is resolved as described in RFC 2543 [6].  In thecase of the "tel" URI scheme [7], the procedure is restarted withthis new E.164 number.  The client is responsible for loop detection.The rest of the resolution of the routing is done as described above.
3.2.3 Example 3$ORIGIN 6.4.e164.arpa.* IN NAPTR 100 10 "u" "ldap+E2U" "!^+46(.*)$!ldap://ldap.se/cn=01!" .We see in this example that information about all E.164 numbers inthe 46 countrycode (for Sweden) exists in an LDAP server, and thesearch to do is specified by the LDAP URI [8].
4. IANA ConsiderationsThis memo requests that the IANA delegate the E164.ARPA domainfollowing instructions to be provided by the IAB.  Names within thiszone are to be delegated to parties according to the ITUrecommendation E.164.  The names allocated should be hierarchic inaccordance with ITU Recommendation E.164, and the codes shouldassigned in accordance with that Recommendation.Delegations in the zone e164.arpa (not delegations in delegateddomains of e164.arpa) should be done after Expert Review, and theIESG will appoint a designated expert.
5. Security ConsiderationsAs this system is built on top of DNS, one can not be sure that theinformation one get back from DNS is more secure than any DNS query.To solve that, the use of DNSSEC [9] for securing and verifying zonesis to be recommended.The caching in DNS can make the propagation time for a change takethe same amount of time as the time to live for the NAPTR records inthe zone that is changed. The use of this in an environment whereIP-addresses are for hire (for example, when using DHCP [11]) musttherefore be done very carefully.There are a number of countries (and other numbering environments) inwhich there are multiple providers of call routing and number/name-translation services.  In these areas, any system that permits users,or putative agents for users, to change routing or supplierinformation may provide incentives for changes that are actuallyunauthorized (and, in some cases, for denial of legitimate changerequests).  Such environments should be designed with adequatemechanisms for identification and authentication of those requestingchanges and for authorization of those changes.
6. AcknowledgementsSupport and ideas have come from people at Ericsson, Bjorn Larssonand the group which implemented this scheme in their lab to see thatit worked.  Input has also come from ITU-T SG2, Working Party 1/2(Numbering, Routing, Global Mobility and Service Definition), theENUM working group in the IETF, John Klensin and Leif Sunnegardh.
References[1]  Mealling, M. and R. Daniel, "The Naming Authority Pointer(NAPTR) DNS Resource Record", RFC 2915, September 2000.[2]  Mockapetris, P., "Domain names - concepts and facilities", STD13, RFC 1034, November 1987.[3]  Mockapetris, P., "Domain names - implementation andspecification", STD 13, RFC 1035, November 1987.[4]  Bradner, S., "Key words for use in RFCs to Indicate RequirementLevels", BCP 14, RFC 2119, March 1997.[5]  Berners-Lee, T., Fielding, R.T. and L. Masinter, "UniformResource Identifiers (URI): Generic Syntax", RFC 2396, August1998.[6]  Handley, M., Schulzrinne, H., Schooler, E. and J. Rosenberg,"SIP: Session Initiation Protocol", RFC 2543, March 1999.[7]  Vaha-Sipila, A., "URLs for Telephone Calls", RFC 2806, April2000.[8]  Howes, T. and M. Smith, "An LDAP URL Format", RFC 1959, June1996.[9]  Eastlake, D., "Domain Name System Security Extensions", RFC2535, March 1999.[10] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR forspecifying the location of services (DNS SRV)", RFC 2782,February 2000.[11] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131,March 1997.Author's AddressPatrik FaltstromCisco Systems Inc170 W Tasman Drive SJ-13/2San Jose CA 95134USAEMail: paf@cisco.comURI:   http://www.cisco.com
Appendix A. ScenarioSay that the content of the e164.arpa zone is the following:$ORIGIN e164.arpa.
6.4 IN NS ns.regulator-e164.example.se.The regulator has in turn given a series of 10000 numbers to thetelco with the name Telco-A. The regulator because of that has inhis DNS.$ORIGIN 6.4.e164.arpa.6.7.9.8 IN NS ns.telco-a.example.se.A user named Sven Svensson has from Telco A got the phone number+46-8-9761234. The user gets the service of running DNS from thecompany Redirection Service.  Sven Svensson has asked Telco A topoint out Redirection Service as the authoritative source forinformation about the number +46-8-9761234.  Telco A because of thisputs in his DNS the following.$ORIGIN 6.7.9.8.6.4.e164.arpa.4.3.2.1 IN NS ns.redirection-service.example.se.Sven Svensson has already plain telephony from Telco A, but also aSIP service from the company Sip Service which provides Sven withthe SIP URI "sip:sven@sips.se".  The ISP with the nameISP A runs email and webpages for Sven, under the email addresssven@ispa.se, and URI http://svensson.ispa.se.    The DNS for the redirection service because of this contains thefollowing.$ORIGIN 4.3.2.1.6.7.9.8.6.4.e164.arpa.IN NAPTR 10 10 "u" "sip+E2U"    "!^.*$!sip:sven@sips.se!"        .IN NAPTR 10 10 "u" "mailto+E2U" "!^.*$!mailto:sven@ispa.se!"     .IN NAPTR 10 10 "u" "http+E2U"   "!^.*$!http://svensson.ispa.se!" .IN NAPTR 10 10 "u" "tel+E2U"    "!^.*$!tel:+46-8-9761234!"       .A user, John Smith, want to contact Sven Svensson, he to start withonly has the E.164 number of Sven, i.e. +46-8-9761234.  He takes thenumber, and enters the number in his communication client, whichhappen to know how to handle the SIP protocol.  The client removesthe dashes, and ends up with the E.164 number +4689761234.  That iswhat is used in the algorithm for NAPTR records, which is asfollows.The client converts the E.164 number into the domain name4.3.2.1.6.7.9.8.6.4.e164.arpa., and queries for NAPTR records forthis domainname.  Using DNS mechanisms which includes following theNS record referrals, the following records are returned:$ORIGIN 4.3.2.1.6.7.9.8.6.4.e164.arpa.IN NAPTR 10 10 "u" "sip+E2U"    "!^.*$!sip:sven@sips.se"        .IN NAPTR 10 10 "u" "mailto+E2U" "!^.*$!mailto:sven@ispa.se"     .IN NAPTR 10 10 "u" "http+E2U"   "!^.*$!http://svensson.ispa.se" .IN NAPTR 10 10 "u" "tel+E2U"    "!^.*$!tel:+46-8-9761234"       .Because the client knows sip, the first record above is selected,and the regular expression "!^.*$!sip:sven@sips.se" is applied tothe original string, "+4689761234". The output is "sip:sven@sips.se"which is used according to SIP resolution.
    This document and translations of it may be copied and furnished toothers, and derivative works that comment on or otherwise explain itor assist in its implementation may be prepared, copied, publishedand distributed, in whole or in part, without restriction of anykind, provided that the above copyright notice and this paragraph areincluded on all such copies and derivative works.  However, thisdocument itself may not be modified in any way, such as by removingthe copyright notice or references to the Internet Society or otherInternet organizations, except as needed for the purpose ofdeveloping Internet standards in which case the procedures forcopyrights defined in the Internet Standards process must befollowed, or as required to translate it into languages other thanEnglish.The limited permissions granted above are perpetual and will not berevoked by the Internet Society or its successors or assigns.This document and the information contained herein is provided on an"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERINGTASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDINGBUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATIONHEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OFMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.AcknowledgementFunding for the RFC Editor function is currently provided by theInternet Society.