Search code examples
iphoneobjective-cgsm

How can use GSM codes for divert calls using objective-c on my iPhone app?


I have already tried to do it using the following code:

NSURL *phoneURL = [[NSURL alloc] initWithString:@"tel:**21*<destination_number>#"];
[[UIApplication sharedApplication] openURL:phoneURL];

but it doesn't work and sometimes the app crashs.

It works for me using a normal number (like 19765432221)...

Anybody?

Thanks!


Solution

  • I'm not sure what *21# means, but if it doesn't work the way you're doing it, it's most certainly because Apple doesn't allow it. There's no other (public) API method for doing this kind of thing.