tags:

views:

5991

answers:

7

How do you programatically do the following from the iPhone SDK

1) Programatically Dial a Phone Number through the iPhone SDK

2) Bypass the dial / cancel prompt that the iPhone brings up

3) Send additional DTMF after the number is dialed just like how you would program pauses into a regular phone.

I know you can make a tel:// call but the issue is that it brings up the dial / cancel prompt and after that it prevents any future DTMF from being sent.

+1  A: 

You can't do this. The SDK does not allow you control the phone function in this level of detail.

Squeegy
+8  A: 

The iPhone SDK does NOT give you direct access to dial numbers (imagine if a 'bad' program got on your phone and dialed a pay per minute number on mute so you didn't notice).

However, if you use the tel link, then you should be able to send it "," characters which inserts pauses.

So to dial 555-1212, then wait 4 seconds, then do 12345# on the touch tone you would use tel:5551212,,12345#

Check out https://developer.apple.com/iphone/library/featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

Adam Davis
The problem with the tel:// method is that the Dial / Cancel prompt causes the iPhone to ignore any dtmf past the number. Do you have code where you successful past dtmf past the actual number?
L. DPenha
Reports seem to indicate that tel: urls from a webpage suffer from that issue, but real applications don't: http://forums.macrumors.com/showthread.php?t=484177 Are you trying to create an iPhone app, or webapp?
Adam Davis
This is an SDK based iPhone application but my initial testing was around the webpage tel:// calls. I'll try the DTMF in the SDK
L. DPenha
A: 

So, what's the solution ?

A: 

Actually, I just tried the following 555-555-4822 EXT 8030

And it does seem to transmit some tones even after pressing dial (the number of p's represents the number of seconds delay). However, the tones are not being responded to on the far end as expected, so something is still amiss.

This does work, however, though it's a little more prone to timing problems tel: 555-555-4822, 8030. This just pauses for one second (,, would be two seconds) after connection, and then plays the 8030 tones

A: 

What if we place a call using tel event, and generate a call once the call is establish can we use the tel event again to dial digits to send dtmf has some one tried this?

A: 

Per Adam's Apple developer link above, there's this RFC link that explains more about the different options for a telephone link scheme that the iPhone supports -

http://www.ietf.org/rfc/rfc2806.txt

This at least allows you to insert pauses with a 'p' in the URL, but plenty of the options are specified (but not all are required) per the RFC. What else works?

A: 

I also would love to know what the proper way is to format the string to include pauses and additional digits after the primary dialed phone number. Nothing I've tried works, including adding 'p' delays, as well as stringByAddingPercentEscapesUsingEncoding. The final string I'm sending to openURL looks like this: "tel:7654321987ppp54321" It dials the main number but not anything else. What am I missing? I've also tried it with "tel:7654321987;postd=ppp54321". Help please?!