Search code examples
htmltel

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


I was trying to add a vanity number in the href="tel:" link (e.g. 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


Solution

  • 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, e.g.:

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