title: CoreTelephony framework available for Facetime too?
body: <p>I'm develloping an app that works with facetime. Unfortunatly, there is not yet Facetime frameworks or APIs available, so I'm working with what I have. Like you all must know, when a Facetime call is placed, the native Phone app does the job. The only problem is that when the call is over, it stays in there.</p>
  
  <p>What I want to do is to, once the call ended, send a local notification to the user to ask if he wants to get back to my app, all this with the help of CoreTelephony framework. I know it is a work-in-progress framework and that it's still a private one, BUT:</p>
  
  <p>Can I use that framework in my app and publish it, without been rejected by Apple?</p>
  
  <p>Does that framework works for Facetime too? I can't get it work.
  <strong>Here is what I did:</strong></p>
  
  <ul>
  <li>I first imported the framework in my appDelegate header file</li>
  <li>And then...</li>
  </ul>
  
  <p>.</p>
  
  <pre><code>- (void)applicationDidEnterBackground:(UIApplication *)application{
   NSLog(@"applicationDidEnterBackground");
  
  
  CTCallCenter *callCenter = [[CTCallCenter alloc] init];
   callCenter.callEventHandler=^(CTCall* call){
  
    if (call.callState == CTCallStateDialing){ 
     NSLog(@"Call Dialing");
    }
    if (call.callState == CTCallStateConnected){ 
     NSLog(@"Call Connected");
    }
    if (call.callState == CTCallStateDisconnected){ 
     NSLog(@"Call Disconnected");
    }
   };
  }
  </code></pre>
  
  <p>Nothing gets traced. Any ideas?</p>
  
  <p><strong>Update:</strong> I just run a little test, I figured out that my code works perfectly with an actual phone call. The CTCallCenter block must be placed in the applicationDidBecomeActive method tho. I also realized that (like the Apple documentation says), the frameworks dispatches those notification only when you're in your app. Suspended mode doesn't get any kind of notification.</p>