scriptygoddess

14 Jun, 2007

Make phone numbers clickable to dial on mobile phones.

Posted by: Jennifer In: Bookmarks

If you're designing a page for a mobile web browser, and you want to make the phone number "clickable" so that a mobile web browser can click and dial the number, just add the code below:
<a href="wtai://wp/mc;8015551212">801-555-1212</a>

update: Sadly I really should check out THIS site on a mobile browser, so I have no idea if it's useful or not – but just in case you're coming here FROM a mobile browser and want to test it out – here is a sample link: 801-555-1212

update#2: Thanks to a comment from Jane, I've now learned that Apple's iPhone needs that formatted differently:
<a href="tel:1-801-555-1212">1-801-555-1212</a>
I've tested it on my phone (which isn't an iPhone) and it still works. I have an LG-VX8100. If you test it, please leave a comment indicating what kind of phone/browser you're using and if it worked or not…

Please test the following link:
1-800-555-1212

35 Responses to "Make phone numbers clickable to dial on mobile phones."

1 | Metah Blog » Blog Archive » Make phone numbers link clickable to dial on mobile phones.

June 20th, 2007 at 1:52 pm

Avatar

[…] tips from Scriptygoddess on how to make phone numbers link clickable to dial on mobile phones.It works great […]

2 | Christine

June 27th, 2007 at 10:34 pm

Avatar

Ok, how cool is that? So very awesome!

3 | steve

July 1st, 2007 at 1:05 pm

Avatar

great, i've tested on my old SE p800, works!

4 | Brant Tedeschi

July 1st, 2007 at 3:22 pm

Avatar

I wish I could test this out to be sure, but I'll take his word for it. At least now I know its possible :)

5 | w33b

July 10th, 2007 at 8:11 am

Avatar

very nifty! works on opera mini on my sony ericsson w850i.

6 | Jane

July 10th, 2007 at 2:12 pm

Avatar

Obligatory iPhone related post :)

The Apple iPhone web dev guidelines doesn't actually mention the wtai://… style links, they want people to do:
<a href="tel:1-800-555-1212">1-800-555-1212</a>
ex.1-800-555-1212
instead, for some reason. Unfortunately I can't remember where that came from, something tells me its a microformats thing but it doesn't seem to be…

In addition, Safari on iPhone parses phone numbers when they're in some common format, e.g. 800-555-1212 to make them clickable so you can click to call. Just a heads up.

Unfortunately, this means that the wtai://… numbers aren't usable on the iPhone.

7 | Jennifer

July 10th, 2007 at 2:44 pm

Avatar

I guess when designing the page – you'd have to do a check to see if it's an iphone and if so render it as you mentioned – and if not – use the wtai:// method – because simply putting the phone number in the "href" like that won't work on other phones I've seen. Only the "wtai" method works on those.

I responded before I saw your second post indicating the "tel" in the href as well (I combined the two comments so they make more sense now) :) … That method still seems to work. I'm revising the post to see if others can test as well…

8 | Jane

July 10th, 2007 at 2:49 pm

Avatar

It's odd that Apple would do something like that, they explicitly come out and say WML is unsupported while a bunch of other standards are on a phone, hopefully this will change in the future

Yeah, I was fairly sure the Apple method doesn't really work anywhere else, and I've never seen it used anywhere except for the iPhone too.

Just a heads up though, for anyone trying to linkify phone numbers for iPhone webapps.

9 | Ajicool

July 21st, 2007 at 7:58 pm

Avatar

It works on my phone too, SE T630 standard browser.
But if I use mini opera from the same phone, it won't work.(can't move to link)

10 | BCKing

July 27th, 2007 at 10:03 am

Avatar

I found this page interesting and threw together a few scripts for Shoretel users. It makes use of dial.exe which is a free program. What is does is register callto: and tel: and sends those links to the Shoretel client to dial the phone. It will also do right click dialing too. I tested on the link on your page and it works great.

download at http://blog.timberlinedealerships.com/it/2007/07/26/dialing-shoretel-from-a-web-page/

11 | burdock

August 18th, 2007 at 2:39 pm

Avatar

BCKing, your script doesnt work at my SE W800i =((( why?

12 | BCKing

August 20th, 2007 at 8:09 am

Avatar

I don't know what a SE W800i is or how to integrate it into a Shoretel system. When you find out post what you did to integrate it.

13 | Jennifer

August 20th, 2007 at 8:17 am

Avatar

Just a quick google search on that; I think it's a Sony Ericsson W800i. Not that that helps figure out the problem much. :)

14 | BCKing

August 20th, 2007 at 1:20 pm

Avatar

You're right Jennifer, I posted scripts for Windows XP. I still don't know what burdock was asking for.

15 | Harlan Iverson

August 21st, 2007 at 7:15 am

Avatar

works on opera mobile 8.65 / t-mobile mda. thanks.

16 | tcoburn

September 6th, 2007 at 10:27 pm

Avatar

I have the LG-VX8100 also, but thru Verizon. its all we can get out here :(

This is useful to me though, because I am going completely blind due to a recent eye condition, and I can use my website to store important phone #s when speed dial isn't enough. Since these phones aren't accessibility friendly, it may be easier for me to do something like this instead. thanks for the tip!

17 | ryan

October 17th, 2007 at 2:31 pm

Avatar

Thanks a bunch. My maintenance page on my property website now directly plugs the tenants phone number into my task list on my iphone!

18 | hiramgf

November 5th, 2007 at 4:29 pm

Avatar

i have pocket pc. tel and wtai both work.

with WTAI you can also make a link to "add to contacts" like so: href="wtai://wp/ap;4805555555;Mr New"… so it has the "ap" part instead of the "mc". How would you do this with iPhone?

19 | Ian

October 2nd, 2008 at 3:14 pm

Avatar

Works in Android Emulator.

20 | Blake

October 15th, 2008 at 8:13 am

Avatar

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?

Thanks,

Blake

21 | Jen

October 22nd, 2008 at 7:54 pm

Avatar

I LOVE YOU! I've been trying to find out how to do this for weeks now, and you helped me. Thank you so much for putting this out there.

22 | KentonTech » Blog Archive » Link to dial phone number in mobile browsers

October 29th, 2008 at 7:11 pm

Avatar

[…] This was a very neat post found on http://www.scriptygoddess.com describing how to create a link that will automatically dial the specified number. The post can be found here. […]

23 | Davide Di Cillo

December 8th, 2008 at 10:05 pm

Avatar

i think if you write any phone number the iphone should recognize it even without a link…

24 | Jennifer

December 9th, 2008 at 8:38 am

Avatar

Yeah – it does seem to do that. I got an iphone in July, so not sure if it always did that. I do know that on my old verizon flip phone, it wouldn't recognize phone numbers (REALLY crummy browser on that thing) (which is what why I had started this post originally). But now that I have an iphone, I cant test if the tel: would work or if it has to be the wtai: method. iPhone would probably recognize either now…

25 | Web Design Contractor

February 3rd, 2009 at 9:07 pm

Avatar

I've been studying this as of late, has anybody determined if the iphone can pick up the wtai and make it clickable to dial?

Jennifer, are you able to click on this link and dial it on your iphone?

906-555-1212

. . . and can you click on this add to contacts link and make it work on your iphone?

Add to Your Contacts

I would really appreciate it if someone with an iphone could do this test for me and if anyone can tell me if either/or link does not work on their phone.

26 | Ralf

February 6th, 2009 at 1:31 pm

Avatar

Hi, I'm also searching for a way to let the iPhone dial a number from a web page, so I'm currently testing some methods on the iPhone.
It's correct that the iPhone (at least the 3G) converts strings which look like a phonenumber into dialable links. Clicking them opens a popup with the option to call that number or to cancel the action. This works only if they are not part of an existing hyperlink within the page.
The tel: method works fine on the iPhone with the same popup, but unfortunately the wtai: methods lead to an error (page can't be opened).

27 | Web Design Contractor

February 7th, 2009 at 7:32 am

Avatar

How does the iPhone handle a link like the one below? Does it show an error screen Ralf or Jennifer?

<a href="wtai://wp/mc;2065551212" href="tel:2065551212">206-555-1212</a>

206-555-1212

I know that the code is screwed up, but does it work? Someone posted this on another forum.

28 | Web Design Contractor

February 18th, 2009 at 11:33 am

Avatar

Hello Everyone,

I just met someone with an iPhone to try out the above link that tried to merge the two href references and she said it would not work on her iPhone.

– Michael

29 | aequalsb

June 18th, 2009 at 12:28 pm

Avatar

on my iPhone (pre 3g iPhone – OS version 2.2.1 (5H11))

—- NO "wtai:" method DID NOT work. which is to REALLY say that SAFARI gave an error message of:
"Cannot Open Page
Safari cannot open the page because the address is invalid.
OK"
so, theoretically, a different browser might work fine. but until Apple allows browser competition (that aren't reskinned Safaris) on the iPhone, it still basically says "did not work on the iPhone"

—- YES "tel:" DID work on my iPhone

—- YES raw phone number numbers were formatted for clickability automatically

—- YES copyright dates (####-####) were clickable as phone numbers (yuck). BUT… when formatted with an – instead of a hyphen (####–####) they were NOT clickable. so, the workaround is VERY simple (for sites you work on at least)

30 | aequalsb

June 18th, 2009 at 12:30 pm

Avatar

that is to say ####&ndash;####

31 | aequalsb

June 18th, 2009 at 12:59 pm

Avatar

looks like browser detection is the only real workaround…. *sigh*

found this –> nice and clean, easy usage
http://detectmobilebrowsers.mobi/

but this was better in many ways – it uses built-in WordPress browser detection
http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/

32 | cliff

March 13th, 2010 at 9:59 am

Avatar

hi
wonder if you can help me, pls
i designed http://www.kouga.mobi using dreamweaver CS3
and now want to make the phonenumbers into links so that if you click on them your cell phone would dial them automatically.
i`ve been searching the web and came across a few suggestions but none of them works or i am doing it wrong.
examples
0820504444

so what i did was highlight my phone number , go down to the link area in properties and insrt the above – and changing the phone number. but this is what i get whwn i try to use it on my mobile:

Not Found

The requested URL /LISTINGS/BUILDCONTR/0820504444 was not found on this server.
Apache/2.0.52 (Red Hat) Server at kouga.mobi Port 80

pls help me

33 | Android user

July 24th, 2010 at 3:50 am

Avatar

Both wtai and tel links work on Android browser. Best though is to differentiate between mobile and normal clients.

34 | misswho

October 11th, 2010 at 8:08 am

Avatar

I am running a pay per click ad on a mobile platform, will this link help my callers by pass the interception placed by the marketing platforms.

Will they beable to click on the number, and take them directly to the call without interuptions.

35 | Stephen Lareau

October 17th, 2012 at 2:58 pm

Avatar

Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and that stops the link from breaking in non mobile browsers. :)

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements