简体   繁体   English

如何使用电话链接拨打IOS 6 7 8中的2位数电话号码

[英]How to call 2 digit phone number in IOS 6 7 8 using tel links

I wonder why 2 digit phone number won't open phone app after tapping "call" 我想知道为什么在点击“通话”后2位数的电话号码无法打开手机应用程序

<a href="tel:555">555</a> // shows alert, tap on call opens phone app

<a href="tel:55">55</a>  // shows alert, tap on call won't open app

If this isn't possible using the tel scheme, then Apple's implementation doesn't conform to RFC2806 (which they reference in their documentation for Phone Links ), which states: 如果使用tel方案无法做到这一点,那么Apple的实现不符合RFC2806 (他们Phone Links的文档中引用),其中规定:

It should also be noted that implementations MUST NOT assume that telephone numbers have a maximum, minimum or fixed length, or that they would always begin with a certain number. 还应该注意的是,实现绝不能假设电话号码具有最大,最小或固定长度,或者它们总是以某个数字开头。 Implementors are encouraged to familiarize themselves with the international standards. 鼓励实施者熟悉国际标准。

I'd file a bug. 我提交了一个错误。

I don't think 2 digit phone numbers are functional numbers. 我不认为2位数的电话号码是功能号码。 Apple does not allow you to call numbers shorter than 3 digits. Apple不允许您拨打短于3位的号码。

According to spec, a valid telephone number should consist of the first digit of the area code being between 2 and 9, followed by at least 2 digits. 根据规范,有效的电话号码应包括区号的第一个数字在2到9之间,然后至少2个数字。 Therefore, the smallest valid telephone number is at least 3 digits long. 因此,最小的有效电话号码至少为3位数。

If your attempting to do something like dial a number, and then dial an extension you can define a pause with p like this: 如果你试图做类似拨一个号码,然后拨打分机,你可以定义暂停p是这样的:

tel:234p55

w can also be used to specify a wait-for-dialtone. w还可用于指定等待拨号音。


I do not know if this will work or not but you may be able to dial a 2 digit number using phone-context 我不知道这是否有效,但您可以使用phone-context拨打2位数字

<a href="tel:55;phone-context=+234">55</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM