Search code examples
ios13pjsipcallkit

CallKit in iOS 13: How to delay ringing?


My VoIP app uses PJSIP. The incoming call scenario is:

  1. receive "Wakeup" push notification - this starts registering sip user and it takes some time
  2. After registering SIP user, the asterisk is trying to route a call to the app - in this moment, the phone should start ringing

In iOS 13 there is a required condition, that the CallKit has to be get notified about incoming call right in didReceiveIncomingPushWithPayload - which starts ringing. And I don't want this. I want to start ringing in the moment when the library receives SIP signal of an incoming call. But there is the SIP registering process between push notification and ringing.

What is the best practice for this or what is the solution for that?


Solution

  • There isn't a real solution for this particular issue, as user8127814 said in the comment, there's only a mitigation.

    In the Apple forum, you can find a detailed explanation—by an Apple engineer—on how to deal with this and all other issues caused by the iOS 13 VoIP Push limitation. Here's the link: https://forums.developer.apple.com/thread/117939