RFC 2916
E.164 number and DNS
E.164 number and DNS ๐๐
RFC 2916: E.164 number and DNS ๐ Author: P. Faltstrom, Cisco Systems Inc. ๐ Stream: Network Working Group ๐ธ Category: Standards Track โจ Date: September 2000 ๐ฆ Obsoletes / Updates: The title block doesn't list anything this one obsoletes or updates ๐ง
Status of This Memo ๐
okay so this doc is an Internet standards track protocol, and the community is literally invited to talk about it and suggest improvements ๐ซถ for the current standardization state and status, check the "Internet Official Protocol Standards" (STD 1) ๐ฅ and yes, distribution of this memo is unlimited, so share it bestie ๐
Copyright Notice ยฉ๏ธ
Copyright (C) The Internet Society (2000). All Rights Reserved. ๐
Abstract โจ
this doc is about using the Domain Name System (DNS) to store E.164 numbers ๐ the main vibe is how DNS can help you find the services that are connected to one E.164 number ๐ฆ routing the actual connection using whatever service you picked is NOT covered here, so don't come for me about it ๐
1. Introduction ๐
so the magic here is turning E.164 numbers into DNS names ๐ช then you use existing DNS stuff like delegation through NS records, plus NAPTR [1] records in DNS [2] [3], and boom, you can look up what services are available for a specific domain name ๐ it's decentralized too, so the different levels of the lookup process are managed separately ๐ซถ iconic behavior ngl
1.1. Terminology ๐
the key words "MUST", "REQUIRED", "SHOULD", "RECOMMENDED", and "MAY" in this document are to be interpreted as described in RFC2119 [4] ๐ so when you see them in caps, they carry the official weight ๐ฅ
2. E.164 numbers and DNS ๐
the domain "e164.arpa" is getting populated ๐ธ to make the whole thing work across lots of people, the domain gets split into subdomains ๐ if you hold an E.164 number and you want it listed in DNS, you should contact the appropriate zone administrator, and you can find who that is by checking the SOA resource record for the zone, same as normal DNS stuff โจ
of course, the rules for listings get controlled on a subdomain basis, and they may be different in different parts of the world ๐ different vibes everywhere, periodt ๐
to find the DNS names for one E.164 number, follow these steps ๐ง:
- Write the E.164 number in its full form, including the country code IDDD. Example:
+46-8-9761234 - Remove all non-digit characters except for the leading '+'. Example:
+4689761234 - Remove all characters except the digits. Example:
4689761234 - Put dots (".") between each digit. Example:
4.6.8.9.7.6.1.2.3.4 - Reverse the order of the digits. Example:
4.3.2.1.6.7.9.8.6.4 - 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 '+' sticks around in step 2 of section 2 to flag that the number the regular expression is working on is an E.164 number ๐ figuring out how other numbering plans (like closed ones) get identified is future work ๐ฎ it's possible, but not definite, that they'd use a similar mechanism to the one in this doc ๐ค
3. Fetching URIs given an E.164 number ๐ฆ
for a record in DNS, the NAPTR record is what tells you the available ways to contact a specific node identified by that name ๐ specifically, it can show you what services exist for a domain name, including phone numbers through the e164.arpa domain we just talked about ๐
the identification uses the NAPTR resource record that's defined for the URN resolution process, but it can be generalized to fit the needs in this doc โจ
the input to the NAPTR algorithm is the string that comes out of step 2 in section 2 above ๐ง
3.1. The NAPTR record ๐ธ
the key fields in the NAPTR RR are order, preference, service, flags, regexp, and replacement ๐ for a detailed description, check out:
- The order field specifies the order in which records MUST be processed when multiple NAPTR records come back for a single query. ๐
- The preference field specifies the order in which records SHOULD be processed when multiple NAPTR records have the same value of "order". ๐ซถ
- The service field specifies the resolution protocol and resolution service(s) that will be available if the rewrite in the regexp or replacement fields is applied. ๐ฅ
- The flags field has modifiers that affect what happens in the next DNS lookup, usually for optimizing the process. โญ
- The regexp field is one of the two fields used for rewrite rules, and it's the core concept of the NAPTR record ๐
- The replacement field is the other field that may be used for the rewrite rule. ๐ฆ
note that the client does all the substitutions and all the lookups, they are NOT done in the DNS servers ๐ and URIs get stored in the regexp field ๐
3.1.1. Specification for use of NAPTR Resource Records ๐
the input is an E.164 encoded telephone number ๐ the output is a Uniform Resource Identifier in its absolute form, following the 'absoluteURI' production in the Collected ABNF found in RFC2396 [5] ๐
an E.164 number, with nothing but a leading '+' and digits (the result of step 2 in section 2 above), is what goes into the NAPTR algorithm ๐ง
the one service supported for a call is E2U โจ
3.1.2. Specification of Service E2U (E.164 to URI) ๐
this is the spec for E2U, the service that maps one E.164 number to a list of URIs ๐ the security part is seriously important, so read it carefully, bestie ๐ญโ ๏ธ
* 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 the
form 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 plan
o E.164 number in the numbering plan, but no URIs exist for
that number
o Service unavailable
* Security Considerations:
o Malicious Redirection
One of the fundamental dangers related to any service such
as this is that a malicious entry in a resolver's database
will cause clients to resolve the E.164 into the wrong URI.
The possible intent may be to cause the client to retrieve
a resource containing fraudulent or damaging material.
o Denial of Service
By removing the URI to which the E.164 maps, a malicious
intruder may remove the client's ability to access the
resource.
this operation maps one E.164 number to a list of URIs ๐บ๏ธ the first well-known step in the resolution process is removing all non-digits except the leading '+' from the E.164 number, as described in steps 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 says the domain 4.3.2.1.6.7.9.8.6.4.e164.arpa is preferably contacted by SIP, and secondly by SMTP ๐
in both cases, the next step is using the resolution mechanism for each protocol (SIP and SMTP) to figure out which node to contact for each one ๐ฅ
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 SIP is the preferred method here ๐ฆ but the result of the NAPTR rewrite is a URI (that's what the "u" flag in the NAPTR record means) ๐ for SIP, the URI might be a SIP URI, which gets resolved as described in RFC 2543 [6] โจ for the "tel" URI scheme [7], the procedure starts over with this new E.164 number ๐ the client is responsible for loop detection, so it's on them to catch the loops ๐ง
the rest of the routing resolution works the same way 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!" .
in this one, all the E.164 numbers in the 46 country code (Sweden) are stored in an LDAP server ๐ธ๐ช and the search to run is specified by the LDAP URI [8] ๐
7. References ๐
okay so the references are where the receipts live ๐งพโจ every doc this spec leans on is listed here, with all the details, bestie
- [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", STD 13, RFC 1034, November 1987. ๐ธ
- [3] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987. ๐ธ
- [4] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. ๐ฅ
- [5] Berners-Lee, T., Fielding, R.T. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. ๐ฆ
- [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, April 2000. โ๏ธ
- [8] Howes, T. and M. Smith, "An LDAP URL Format", RFC 1959, June 1996. ๐ง
- [9] Eastlake, D., "Domain Name System Security Extensions", RFC 2535, March 1999. ๐
- [10] Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000. ๐
- [11] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, March 1997. ๐
Author's Address ๐โโ๏ธ
Meet Patrik Faltstrom, the author, who you can reach here ๐ซถ
Patrik Faltstrom
Cisco Systems Inc
170 W Tasman Drive SJ-13/2
San Jose CA 95134
USA
EMail: paf@cisco.com
URI: http://www.cisco.com
Appendix A. Scenario ๐ต๏ธโโ๏ธ๐
okay this appendix is literally a whole story time, and it's the best way to see how everything clicks together ๐ let's go!
Picture the e164.arpa zone holding this little bit of info:
$ORIGIN e164.arpa.
6.4 IN NS ns.regulator-e164.example.se.
The regulator then gave a series of 10000 numbers to a telco called Telco-A, and so the regulator put this in its DNS:
$ORIGIN 6.4.e164.arpa.
6.7.9.8 IN NS ns.telco-a.example.se.
Now our girl Sven Svensson got the phone number +46-8-9761234 from Telco A. He uses a company called Redirection Service to run his DNS. Sven asked Telco A to name Redirection Service as the authoritative source for info about +46-8-9761234, so Telco A added this to its DNS:
$ORIGIN 6.7.9.8.6.4.e164.arpa.
4.3.2.1 IN NS ns.redirection-service.example.se.
Sven already has plain telephony from Telco A, but he also has a SIP service from a company called Sip Service, which gives him the SIP URI "sip:sven@sips.se". His ISP, ISP A, runs his email and webpages, under the email address sven@ispa.se and the URI http://svensson.ispa.se. ๐
So the DNS for Redirection Service ends up holding these records:
$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!" .
Next, John Smith wants to contact Sven, but all he has is Sven's E.164 number, +46-8-9761234. He types that number into his communication client, which knows how to handle SIP. The client strips out the dashes and ends up with the E.164 number +4689761234. That's the string the NAPTR algorithm works on. โจ
The client turns the E.164 number into the domain name 4.3.2.1.6.7.9.8.6.4.e164.arpa., then asks for NAPTR records for that domain name. Using normal DNS mechanisms, which include following the NS record referrals, these records come back:
$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 John's client knows SIP, it picks the first record, and it applies the regular expression "!^.*$!sip:sven@sips.se" to the original string, "+4689761234". The output is "sip:sven@sips.se", and that's what gets handed to SIP resolution. Iconic, honestly ๐
Full Copyright Statement โ๏ธ
Okay, the legal bit, but make it cute ๐ Here's the deal:
Copyright (C) The Internet Society (2000). All Rights Reserved. ๐ท
You're allowed to copy this document and share it with others, and you can also write derivative works that comment on or explain it or help people implement it. Those works can be prepared, copied, published, and distributed, in whole or in part, without any restriction, as long as the copyright notice and this paragraph stay on all the copies and derivative works. The document itself, though, must not be modified in any way. That includes removing the copyright notice or the references to the Internet Society or other Internet organizations. The one exceptions are when you need it to develop Internet standards, in which case the copyright procedures defined in the Internet Standards process must be followed, or when you need it translated into languages other than English. ๐
The permissions above are perpetual, and the Internet Society or its successors or assigns will never revoke them. ๐
This document and the info in it are provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐
Acknowledgement ๐ซถ
Funding for the RFC Editor function is currently provided by the Internet Society. ๐๐ธ
๐ฆ where this page comes from
- ietf: rfc2916 2000-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms