使用 iOS 拨打电话号码并传递 DTMF

发布于 2024-09-01 15:09:07 字数 405 浏览 2 评论 0原文

使用iOS如何实现以下要求?

1) 通过 iOS 以编程方式拨打电话号码。

2) 拨打号码后发送附加 DTMF。

我发现 tel URL 方案可用于拨打电话。不确定是否发送 DTMF 音。

https://developer.apple.com/library/archive/精选文章/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html

How to achieve the below requirement using iOS?

1) Programmatically dial a Phone Number through iOS.

2) Send additional DTMF after the number is called.

I found tel URL scheme is available to make a call. Not sure about sending DTMF tones.

https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

彻夜缠绵 2024-09-08 15:09:07

您无法使用 SDK 直接通过电话应用程序发送 DTMF 铃声。但是,您可以在电话号码后附加数字,如下所示:

  • 分号:等待拨打下一个号码。电话应用程序将显示一个按钮。
  • 逗号:等待1秒(我认为)然后自动拨打号码。

示例:

假设您要拨打 1-800-555-1212,3 秒后自动键入 2 以从语音菜单中选择一个选项,然后允许用户按下一个按钮,拨打45。您可以传递以下内容作为您的电话 URL:

@"tel:1-800-555-1212,,,2;45"

这也适用于“联系人”和“电话”应用程序。在编辑某人的电话号码时,您甚至可以通过按电话键盘上的 + * # 键来输入逗号和分号。

我不知道这在哪里有记录。我通过实验和与电话专家同事的交谈弄清楚了这一点。

You can’t send DTMF tones over the Phone app directly with the SDK. However, you can append numbers to the phone number like so:

  • Semicolon: wait to dial the next number. The Phone app will show a button.
  • Comma: wait 1 second (I think) and then dial the number automatically.

Example:

Let's say you want to dial 1-800-555-1212, automatically key in 2 after 3 seconds to pick an option from a voice menu, and then allow the user to press a button that will dial 45. You would pass the following as your phone URL:

@"tel:1-800-555-1212,,,2;45"

This also works in the Contacts and Phone apps. You can even put in commas and semicolons when editing someone’s phone number by pressing the + * # key on the phone keypad.

I don’t know where this is documented. I figured it out by experimentation and by talking to coworkers who are telephony experts.

笛声青案梦长安 2024-09-08 15:09:07

1) 通过打开一个带有 tel 协议的 url 来完成,如

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-234-567890"]];

2) 相信在当前的 SDK 中是不可能的

1) is done by opening an url wil the tel protocol like

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-234-567890"]];

2) is afaik not possible in the current SDK

指尖上的星空 2024-09-08 15:09:07

无法通过应用程序的呼叫发送 DTMF。

There is no way to send DTMF over the call from an app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文