How do I include extensions in the tel: URI?

…衆ロ難τιáo~ 提交于 2020-03-18 03:08:13

问题


I currently have a webpage serving up phone numbers, some of these phone numbers have extensions so I have written the HTML like this:

<a href="tel:+44-1234-567;ext=88">+44-1234-56788</a> / <a href="tel:+44-1234-567;ext=99">+44-1234-56799</a

When I hit this page in my Android browser and tap one of the phone numbers, it loads up in my phone dialer (UK Samsung Galaxy s2 stock) as:

+44-1234-567;ext=88

which I don't think is correct. Surely it should omit the ;ext= word.

Have I misread the RFC for implementing tel?


回答1:


Seems the proper way to do it is use a comma:

<a href="tel:441234567,88">+44-1234-567 ext.88</a>

Just tested with iPhone and Android OS 2.1. Using ;ext=88 converts the ext bit into a number that is dialed with the extension (so it dials something like 35888 instead of 88).




回答2:


According to the documentation, you can add what you want like so tel:12345678;ext=123

See RFC 3966




回答3:


In all the examples I saw, the value of ext is contained in the full number. So try including 88 in the href value:

<a href="tel:+44-1234-56788;ext=88">+44-1234-56788</a>



回答4:


Standards at thenewcode from 3 months ago suggest using a microdata pause.

<a href="tel:+13235798328p22">

Related: Different standards persist across different external platforms and may change the processing of URIs. Click to call features on Google Developers docs do not specify

Example: Office's Skype uses x to represent extension within skype.




回答5:


For those still wondering about this problem: I've found it best to use this format:

<a href="tel:+13235798328;22">


来源:https://stackoverflow.com/questions/9482633/how-do-i-include-extensions-in-the-tel-uri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!