1

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!

migoux
  • 31
  • 4
  • 2
    I don't have a source to back this up, but I believe the API blocks special call codes due to Apple policy. – Adam Davis May 26 '11 at 15:12
  • possible duplicate of [Call a GSM Service #123#....](http://stackoverflow.com/questions/4346301/call-a-gsm-service-123) – Erik B May 27 '11 at 13:31

1 Answers1

1

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.

Erik B
  • 40,889
  • 25
  • 119
  • 135
  • ok, you seem to be right. I've read in another post the use of this code: `CTCallDialWithID(@"*100#", -1);`. But I didn't find wich private framework has this class/method. This is the link of such: http://stackoverflow.com/questions/4346301/call-a-gsm-service-123 – migoux May 26 '11 at 20:07