Apr 4
2012
2012
Letters In Place of Numbers in Phone Number Links on Mobile Phones
Miscellaneous , Mobile devices Add commentsPart 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.
Apr 4, 2012 at 3:15 PM 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>
Apr 4, 2012 at 4:08 PM @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.
Apr 6, 2012 at 8:28 AM 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?
Apr 6, 2012 at 8:42 AM @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.
Apr 29, 2012 at 9:19 PM typing long URIs can be cumbersome, and there is no "copy/paste"