PushKit Framework, how does it work?

My understanding of IOS SIP application or VOIP application:

It is a persistent TCP connection between server and device. As soon as a connection request comes in, it establishes an RTP connection with the server on other devices. Now you can exchange voice or other packages on this connection and make calls in real time.

With the Push Kit framework, I'm confused as to exactly how it should work?

Questions:

  • When the app goes to the background, is my VOIP TCP connection still there or is it closed?
  • If it is closed after receiving VOIP APNS, how exactly does SIP work with its main TCP connection?
  • Do I need to connect when VOIP APNS comes in? What if at that time the establishment of TCP fails for some reason.
  • What changes do we need to make on the SIP server for this?

Maybe my whole understanding is wrong here. But I want to know the architecture of the stream on how exactly the VOIP application works with APNS.

I tried browsing various articles on the internet, but all I understood about the VOIP-APNS Push Kit is that it will wake up your app in the background, but they won't be able to clear up my above questions.

Can someone shed some light on this topic please.

+3


source to share


1 answer


1 When the app goes to background, is my VOIP TCP connection still there or is it closed?

Yes and No, when an app goes into the background on iOS 9 or older, then it will stay connected if you programmed it like that, meaning there is a possibility of TCP connection here.
But in iOS 10, the app will never be alive in any condition if it is in the background i.e. No TCP network connectivity.

2 If it is closed, after receiving VOIP APNS, how exactly does SIP work with its main TCP connection?
3 Do I need to establish a connection when VOIP APNS comes in? What to do if at that time the establishment of TCP fails for some reason.



When the app is in the background and the TCP connection is closed, after receiving the PushKit notification, iOS will wake up the app, at which time we need to run the code snippet to make the TCP connection to the server again.
If the TCP connection fails this time, the user will not be able to get the vote and we need to run the TCP connection snippet again.

4 What changes should we make to the SIP server for this?

For the server side, it is exactly the same as APNS (Regular Push Notifications). See this SO post

+1


source







All Articles