iPhone Telephone Hyperlinks

Enough with the iPhone news. Let’s talk about a little detail that no one else is talking about. The interesting thing for me is how the web is joining our good friend the telephone. A while back I talked about Callto links and how these could be tied into Vonage using a little tool I wrote. So I was pretty interested to see how the iPhone would allow a web-page to connect to a telephone number.

i was expecting either callto: links or perhaps a telephone microformat or perhaps a proprietary solution.

Surprisingly it turns out that it’s none of the above. The iPhone is using a not so well known RFC to create telephone hyperlinks. This is done through a tel: link format that I’d never heard of called RFC 3966.

The format allows you to create an anchor link and use a tel: URI to point to a telephone number. For example if you wanted to contact Apple customer support you would use a link like this:
Call Apple Customer Support at 1-800-275-2273
Go ahead and give it a try, I don’t yet have an iPhone to test this out.

The link format is fairly straight forward:
<a href="tel:+1-800-275-2273">
Call Apple Customer Support at 1-800-275-2273
</a>.

If more sites start using this for their contact information other providers for the tel: URI may begin supporting the format (Vonage, Verizon, Skype, etc.) This makes it easy to transition from a web interface to a voice interface. The format also theoretically suppors alternative SIP providers and extensions making it possible to put a corporate directory online in the form of an iPhone application.

Update:  Apple also supports turning off auto-detection of phone numbers via a meta-tag.

<meta name="format-detection" content="telephone=no">

Update 2:  When I first wrote this post we hadn’t done any real iPhone work. I didn’t even own an iPhone. Since then a lot has changed, our company now focuses on building world class apps. Learn more from our homepage and let me know if we can help.

17 thoughts on “iPhone Telephone Hyperlinks

  1. I am having trouble in the opposite direction.

    I want to stop iPhone from automatic recognize a set of numbers as a phone and to “stop” from iPhone from making the number clickable.

    The number format I have is 1999-2008 which is actually a copyright, yet I could “dial” it from my iPhone.

    Any thoughts?

    Reply
  2. Adding a comment in response to Blake’s question. Turns out there is a meta tag for your needs:

    <meta name=”format-detection” content=”telephone=no” >

    This is buried in the documentation for the web-sdk:
    Web Apps Dev Center > Reference Library > Guides > Apple Applications > Safari > Safari Web Content Guide for iPhone OS > Apple Applications URL Schemes > Phone Links

    The only hack I’ve found to prevent one string from getting recognized while keeping detection on for the rest of the page is inserting a hidden character into the string: 2008&shy;-&shy;2009.

    In the above &shy; is a hidden hyphen marker.

    Reply
  3. The tel: href also works on Symbian (verified on S60 3rd). Perfect.

    It also seems to work on Opera Mobile 10 (beta 2), but not because of the tel: href, but simply because it attempts to recognize phone numbers in plain text.

    Reply
  4. Actually I have added the tel link on the phone no which is working fine, but my question is that can I put the same tel link on any iphone formated image like telephone logo. I tried this but iphone returning error message.
    Please help me!

    Reply
  5. Apple seems to have a bug in the “Turning telephone number detection off”-setting. It works well when it is a webpage but if you set apple-mobile-web-app-capable it no longer works.

    Reply
  6. You can also add pauses and further numbers to the link for doing things like adding a clickable link into a conference line that requires a passcode. Use a comma for the pause.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

theme by wp-svbtle