Solution in short
Put telephone numbers* in the global domain name system, DNS
ENUM Working Group created to solve the problem of using the DNS for:
Domainname in
[Numbers reformatted as domain names]
URI out
[mailto, sip, tel, http or other URI scheme]
Solution was to use NAPTR records
* Maybe not in the original E.164 format