I am working on a SIP Calling app. I used siphon app project that implements open source pjsip library. I am able to run Application successfully in foreground mode, for Device as well as Simulator.
In order to run the application in Background Mode for VOIP, I am following this RayWenderlich Tutorial. As per the Apple Documentation, we have to follow these 4 steps :
- Enable support for Voice over IP from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the
UIBackgroundModes
key with the voip value in your app’s Info.plist file.) - Configure one of the app’s sockets for VoIP usage.
- Before moving to the background, call the
-setKeepAliveTimeout:handler:
method to install a handler to be executed periodically. Your app can use this handler to maintain its service connection. - Configure your audio session to handle transitions to and from active use.
I already implemented this first step :
But I am not getting any idea on how to implement the next three steps in order to receive the SIP Call in Background Mode. Got the logic behind these three steps but didn't find any source code for the implementation.
Have anyone worked on this before?