Letters In Place of Numbers in Phone Number Links on Mobile Phones

Miscellaneous , Mobile devices Add comments

Part of an upcoming project involves displaying office phone numbers on a web page such that, if the page is being viewed on a smartphone, tapping on the number pulls up the phone's dialing program with the number filled in and the user just needs to start the call.

Some of the phone numbers in question use letters in place of numbers (like "1-800-555-CFML" as an example) and I wondered if such numbers would work.

The answer is "probably not," as it's not something supported in the spec (the spec being RFC3966).  Tried it on my Galaxy Nexus anyway: no dice.  So I'll have to convert any such letters to their numerical equivalent

Some other things I learned today:

  • Per the W3C recommendation regarding "click-to-call" links, you should always include the "+" sign in front of the number to support international callers ("+1-800-555-CFML").
  • You can also use "." as a separator instead of a "-", and you can get away with using both types of separators in the same number.

5 responses to “Letters In Place of Numbers in Phone Number Links on Mobile Phones”

  1. Tom Mollerus Says:
    Brian,

    If you link those telephone numbers, you should be able to use the "tel:" handler to make mobile devices call them up in the dialer. So:
    <a href="tel:1-800-555-2365">1-800-555-CFML</a>
  2. Brian Swartzfager Says:
    @Tom: That's correct - my point is that the phone number in the "tel:" link has to be numbers, so if I only currently have a version of the phone number that contains the letters, I will need to convert the letters to numbers for use in the "tel:" link.
  3. Vishal Says:
    Hi Brian,
    The task is challenging. I think in the number "1-800-555-CFML" CFML is 2365. You can convert that.
    What if the Phone number contains no Characters? How can we do that? Any suggestion or links that contains function description, regarding the same?
  4. Brian Swartzfager Says:
    @Vishal: I don't really see it as challenging. As both you and the post alluded to, it's simply a matter of making sure any letters are converted to their numeric equivalent before the number is put into the "tel:" link.

    Now the reason for why the spec doesn't support the letters is because apparently there is some variety in how the letters are matched up with the numbers in different phone systems around the world. Fortunately, I know what letter/number set the folks who are inputting the phone numbers into the database are using so I can safely make the conversion.
  5. radioyugg Says:
    typing long URIs can be cumbersome, and there is no "copy/paste"

Leave a Reply