iphoneobjective-ciosdialing

Interaction with phone on iPhone


Our company has recent started switching from Blackberries to iPhones and the biggest complaint (such as it is) is that the you can not start a dial sequence (that dials a number, waits for a pickup, dials more numbers, waits for a reply, dials more numbers) etc... which can be used to enter a phone conference such as InterCall.

Can I write a simple app to do this on the iPhone? The part I am most concerned about is accessing the phone dialing mechanism. The rest I can work from contacts, etc...

If such a thing is possible? And, if so, what sort of classes and methods should I research?


Solution

  • So, I just tried this

    - (void)call {
        [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"tel://611,1,1"]];
    }
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        UIButton *telButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        telButton.frame = CGRectMake(20, 20, 100, 100);
        [telButton setTitle:@"Call" forState:UIControlStateNormal];
        [telButton addTarget:self action:@selector(call) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:telButton];
    }
    

    and it worked.

    The automatically dial next number is achieved by placing a comma , and prompting the user to allow the phone to dial the next number is achieved by placing a semi-colon ;.

    Ref 1: http://www.modernsaver.com/pause-wait-blackberry-iphone-droid Ref 2: http://www.iphonedevsdk.com/forum/iphone-sdk-development/85581-make-phone-call-tableview-cell.html#post355401