0

Whenever I receive incoming call in my VOIP application I can see the logs on my native iPhone call UI.

I wanted to make outgoing call from native iPhone callog of UI by clicking last incoming call. Like it works for WhatsApp , Skype , hangout etc.

How is it possible for outgoing call ?

Below are the methods I wrote for incoming call :

-(void)reportIncomingCall:(NSUUID*)UDID handle:(NSString*)handle;
-(CXCallController*)startCall:(NSUUID*)UDID handle:(NSString*)handle
-(void)connectCallWithCallController:(CXCallController*)controller

I know there is one more method for outgoing call.But I don't know when to call this:

- (NSUUID *)reportOutgoingCallContactIdentifier:(NSString *)identifier destination:(NSString *)name telNumber:(NSString *)telnum 
ios developer
  • 3,363
  • 3
  • 51
  • 111

1 Answers1

1

When tapping on an item in the native iOS Call log, the application delegate's continueUserActivity function is called. My implementation looks something like this in Swift:

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {

    self.startCallHandle = userActivity.startCallHandle
    // Cache call handle here, and make call using cached call handle 
    // when applicationDidBecomeActive is called

    return true

}

startCallHandle is defined in file NSUserActivity+StartCallConvertible.swift, as seen in the SpeakerBox sample project.

In your app's Info.plist, you must have INStartAudioCallIntent and/or INStartVideoCallIntent. Once again, see the SpeakerBox example app for details.

FryAnEgg
  • 493
  • 4
  • 12
  • Thank you for the answer. I tried adding url scheme in my .plist but openURL: method did not called. I done all the steps as showing in speaker project. – ios developer Jan 02 '19 at 18:08
  • 1
    https://stackoverflow.com/questions/48338692/ios-trigger-outgoing-voip-call-on-clicking-the-caller-in-the-native-ios-recent?noredirect=1&lq=1 ---This method works for me : configuration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], nil]; – ios developer Jan 02 '19 at 20:53