[pjsip] Keep iOS awake in the background for SIP over UDP

Martin Umgeher m.umgeher at easymobiz.com
Fri Jun 1 04:44:23 EDT 2012


Hello,

I'm using pjsip on iOS. I'm trying to find a way to keep my iOS app from going to sleep when put in the background, so that incoming UDP SIP calls can get received.

So far, I found many clues that this is possible and in fact seems to be implemented by apps in the AppStore. The trick seems to be to use the 10 seconds granted by iOS upon incoming data received through the VOIP TCP socket: when the app is woken up by such a signal, let it wait for about 9 seconds, send a response to the server, and go to sleep, only to be awoken immediately by the server's response coming in through the socket; then again wait for 9 seconds etc. (the most elaborate description I found is here: http://stackoverflow.com/a/7393083)

Now my question is: how can I provoke a TCP response from a UDP-only SIP server? What signal could I send to a SIP server, if the server only supports SIP over UDP? 

I know this is not strictly a pjsip question, but I think people on this list do have the largest knowledge in this field...

Thanks!
Martin





More information about the pjsip mailing list