HI German,
We have some experience in this. As someone far away in South Africa, we are accustomed to very slow push. For us, actually, Apple push is much slower than Android - Google has made more effort to push their edge into South Africa.
We have several thousand users on webrtc mobile clients.
On iPhone, especially if our app is shut down and the phone off, it can be many seconds from sending the voip push to receiving a response from the app so that you can "release" the invite. When I say many seconds it can certainly be more than 10 seconds.
Obviously longer on older, slower phones.
Unfortunately Callkit obliges you to present a ringing "call" as the push is received which is sucky since at that time there is actually no call. So if the user answers quickly you have to paste over the interim until there is an actual INVITE to answer. WhatsApp displays a "connecting" screen; on our side we didn't deal with this gap properly yet.
This obviously is a poor experience but it's not really under our control and Apple is determined that it's their way or the highway.
IOS will not put the app back to sleep in my experience. However if an issue causes your app to crash after the voip push has resulted in CallKit "ringing", you can en up with a ringing call which isn't actually there. We are using react-native-webrtc and components such as the incallmanager and we have had bugs in these libraries causing this to happen.
I can attempt to get a distribution of the elapsed time from push to invite released - never really looked at is statistically but now i am interested....
We don't do all this with Kamailio (though we use Kamailio a lot). But the principle we use is to do this on a b2bua approach. So we return a 100 trying back to the originator, then we send all the pushes to the "registered" clients. IIRC we send back 180 once we've sent a push. We then (hopefully) receive specially authenticated registers than we OK without further authentication, And that releases the INVITE.
As long as the caller waits (ie until we get a CANCEL) we'll deal with incoming registers and release invites. And if they wait long enough there will hopefully be a 200 from a client and a call is set up.
Steve