I am developing a iOS (7 & 8) VOIP application (By using Kamailio server and PJSIP device library).
Everything works fine when application is in foreground, but the issue is when application is in background, the socket will remain alive for only 5 minute (300 sec).
When I am registering with:
[application setKeepAliveTimeout:600 handler: ^{
[self performSelectorOnMainThread:@selector(keepAlive) withObject:nil waitUntilDone:YES];
}];
I am able to get the call.
The issue is setKeepAliveTimeout
is 10 minutes and socket only persists for 5 minutes.
I enabled "App provides Voice over IP services" in .plist
. I also set PJSUA_REG_INTERVAL
to 600 seconds.
Please help me set the VIOP socket in PJSIP.