Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:24:30+00:00 2026-05-28T16:24:30+00:00

I am attempting to create an application that will initiate a call to a

  • 0

I am attempting to create an application that will initiate a call to a priority 1 contact on a call-center-like list.

Then, if that contact does not answer (let’s forget the whole problem of answering machines here), I’d like to call the priority 2 contact, and so on, until one of them answers or I exhaust my list.

Is this possible?

I’ve tried the following:

  1. Hook into the CTCallCenter.CallEventHandler event, and checking the call state for CTCallStateConnected and CTCallStateDisconnected, and I get it to respond to the fact that the call disconnected, without ever connecting, and then attempt to initiate another call like I did the first, but this second attempt just sits dead in the water.
  2. Override the DidEnterBackground method, and periodically check the CTCall.CallState property, basically again trying to respond to a disconnect that was never connected, but this does not appear to work either

I also tried adding a short delay (1 second, 2.5 seconds and 10 seconds) after detecting the disconnected state before attempting the next dial, to allow for the phone application to “settle down” after aborting the call, this did not change anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:24:31+00:00Added an answer on May 28, 2026 at 4:24 pm

    I’m of the opinion that this is better solved at the destination of the phone call. I would either have the phone company configure a “follow me” service, use Twilio or some other 3rd party service (as already suggested), or configure my own PBX using something like Asterisk (Asterisk includes the ability to configure “follow me” type behavior). It provides you much more flexibility and control, even if you did find a way to do this natively in iOS.

    Having said that, I did get this to work in iOS assuming the following:

    1. Your app initiates the call.
    2. The phone app is opened, dials the number, and disconnects.
    3. The user explicitly returns to your app. If you managed to get the events while your app was backgrounded, I want to know more :-).
    4. On return of control to your app, the phone events are sent and a new call is initiated.

    I have the following snippet of code in my UIApplicationDelegate didFinishLaunchingWithOptions method:

    // In appdelegate header, ct is declared as @property (strong, nonatomic) CTCallCenter *ct; 
    self.ct = [[CTCallCenter alloc] init];
    self.ct.callEventHandler = ^(CTCall *call) {
        if (call.callState == CTCallStateConnected) {
            // do some state management to track the call
        } else if (call.callState == CTCallStateDisconnected) {
            // check that this is the expected call and setup the
            // new phone number
            NSURL *telURL = [NSURL URLWithString:myNewNumberURL];
            [application openURL:telURL];    
        }     
    };
    

    This will make the new call. I’m using the iOS 5 SDK; tested on an iPhone 4s.

    EDIT:

    Using Return to app behavior after phone call different in native code than UIWebView as a starting point, I’ve managed to get this to work. Note that I have punted on memory management for clarity. Assuming you use the web view technique for getting back to your app after the call is complete, try something like this in the call completed block:

    else if (call.callState == CTCallStateDisconnected) {
        // check that this is the expected call and setup the
        // new phone number
        NSURL *telURL = [NSURL URLWithString:myNewNumberURL];
        dispatch_async(dispatch_get_main_queue(), ^{
            UIWebView *callWebview = [[UIWebView alloc] init]  ;
            [self.window.rootViewController.view addSubview:callWebview];
            [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]]; 
            // and now callWebView sits around until the app is killed....so don't follow this to the letter.  
        });
    }
    

    However, this may not quite give you what you want either. The user will get an alert on each call request, providing an opportunity to cancel the call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to create an application that will call a remote modem and
I'm attempting to create a web application with TweetSharp that will connect to Twitter
I'm attempting to create an application that looks much like the Windows 8 Metro
I am attempting to create an application that will automatically answer calls when a
I am attempting to write a VB.net application which will allow users to create
I'm attempting to create a Spring application (NOT web application) to perform some simple
I am trying to create a script that will open an application in a
I'm attempting to create a contacts application that has two main entities - person
I am attempting to create functionality in a JSF1.2/ADF web app that will periodically
I want to create a timesheet application where I need an application that will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.