0
votes

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?

1
Welcome to the club. There is no way to fix this completely. Apple's "solution"? In the notification send enough information to be able to display a 'fake' ringing, and hopefully by the time the user clicks answer, the SIP stack and the Registers and the new INVITE will all be done. If the app is not done, just make believe that it is taking a long time for your app to answer the call. - user8127814
Uh oh... Do I really have to implement a fake ringing before a real one? Maybe the solution is to move to standard APNS. They are not so fast but they allow us to implement proper CallKit workflow. Or it is possible to freeze didReceiveIncomingPushWithPayload until SIP registration is done successfully? - matusalem

1 Answers

0
votes

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