简体   繁体   中英

Tel URI href=“tel:” and vanity numbers?

I was trying to add a vanity number in the href="tel:" link (eg tel:"+1800FLOWERS"), but now I am actually not sure if this would work on all devices, or is it more acurate if I just write the numbers out? I mean it would look nicer as vanity.

Thanks in advance

The tel: scheme was originally defined in RFC2806 , which only defined support for digits and some additional characters (see section 2.2).

RFC3966 , which obsoletes RFC2806, explicitly states that vanity numbers are not supported. From section 5.1.2:

5.1.2. Alphabetic Characters Corresponding to Digits

In some countries, it is common to write phone numbers with
alphabetic characters corresponding to certain numbers on the
telephone keypad. The URI format does not support this notation, as
the mapping from alphabetic characters to digits is not completely
uniform internationally, although there are standards [E.161][T1.703] addressing this issue.

So you should only use regular numbers in the href attribute. You can still use the vanity number in the text itself, eg:

<a href="tel:+1-800-356-9377">+1800FLOWERS</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM