ios - tutorial - what is callkit




Programmatically Dial a Phone number and pass DTMF using the iPhone SDK (4)

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

How do you programmatically do the following from the iPhone SDK:

  1. Programmatically 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.


I dont know why everyone says you cant... you CAN!

NSString *phoneNumber = @"15555551212";
NSString *dtmfAfterPickup = @"1234";
NSString *telString = [NSString stringWithFormat:@"tel:%@,%@", phoneNumber, dtmfAfterPickup];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telString]];

This will dial the phoneNumber bypassing the dial/cancel prompt... 1 second after the call is answered, the dtmfAfterPickup string will be automatically dialed.

Its a good idea to detect whether or not the device support phone calls


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?


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





phone-call