datag
datag

Reputation: 33

Call a Phone number and pass DTMF using iOS

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

Upvotes: 2

Views: 3536

Answers (3)

Zev Eisenberg
Zev Eisenberg

Reputation: 8158

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.

Upvotes: 6

Eric
Eric

Reputation: 2043

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

Upvotes: 0

stigi
stigi

Reputation: 6711

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

Upvotes: 0

Related Questions