The wakeup occurs once every 600 sec via the iOS AppKeepalive mechanism. This allows REGISTER message to be sent to the server (via TCP Proxy). There are other causes of wakeup as well i.e. network reachability changes detected by iOS. If reachability changes iOS will bring the app from background-suspended to background-running. So the app may wake from the background for a number of reasons. When this flurry of UDP mappings happens, iOS interprets this as a SIP socket traffic and wakes the application. on iOS 5.X, if there are too many such wakes (> 15 in 300 seconds) the watchdog will terminate the application. This effect of the UDP mappings is what I am trying to understand and accommodate. I am using the library as is. I haven't attempted to modify any of the pjsip sources. Comparing 1.10 sources with 2.0 I don't see any substantive differences in this code. I am attempting to move to 2.X but I want to be sure that the effort will result in solution of this problem. I am new to pjsip and in no way claim expertise in it. Please pardon my ignorance, but using a TCP proxy and observing that the TCP socket is created and marked as voip I don't understand what UDP has to do with it. However I do note that the cause of my background kills is always associated with this behavior. Question: is there a configuration parameter I need to set that would eliminate this? Thanks for your response. On Fri, Jul 13, 2012 at 8:53 AM, Benny Prijono <bennylp at teluu.com> wrote: > On Mon, Jul 9, 2012 at 7:58 PM, Tom Merriewether < > tmerriewether at star2star.com> wrote: > >> I am writing an iPhone application. We are using a TCP proxy for SIP so >> that we can use iOS voip socket handling. >> Everything seems to be going well until the io_select activity starts. >> Somehow this is triggering too many background wake events and killing the >> application. >> So my question is: what exactly is going on when the following occurs? >> >> > > Haven't we discussed this in > http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2012-June/014836.html > ? > > The "UDP has been replaced.." is triggered by the wake up, not the other > way around. You need to find what is causing the wake up, and it's > described in the ticket that I mentioned there. > > Cheers > Benny > > > PLOG --> 2012-07-06 17:49:01.375 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.374 ioq_select UDP has been replaced successfully! >> >> PLOG --> 2012-07-06 17:49:01.375 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.375 ioq_select Attempting to replace UDP socket 41 >> >> PLOG --> 2012-07-06 17:49:01.376 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.376 ioq_select UDP has been replaced successfully! >> >> PLOG --> 2012-07-06 17:49:01.377 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.376 ioq_select Attempting to replace UDP socket 42 >> >> PLOG --> 2012-07-06 17:49:01.377 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.377 ioq_select UDP has been replaced successfully! >> >> PLOG --> 2012-07-06 17:49:01.378 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.377 ioq_select Attempting to replace UDP socket 43 >> >> PLOG --> 2012-07-06 17:49:01.379 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.379 ioq_select UDP has been replaced successfully! >> >> PLOG --> 2012-07-06 17:49:01.379 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.379 ioq_select Attempting to replace UDP socket 44 >> >> PLOG --> 2012-07-06 17:49:01.381 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.381 ioq_select UDP has been replaced successfully! >> >> PLOG --> 2012-07-06 17:49:01.381 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.381 ioq_select Attempting to replace UDP socket 45 >> >> PLOG --> 2012-07-06 17:49:01.382 Star2Star[977:750f] SIP PJSIP message: >> 17:49:01.382 ioq_select UDP has been replaced successfully! >> >> Somehow at the end of this sequence the application is killed with too >> many background wake ups. The crux of the matter is that this is not due >> to inbound traffic on the SIP socket as I have verified that the SIP server >> is not generating traffic to the phone at this time. So what's up and how >> do I fix this? >> >> >> >> -- >> Thomas Merriewether >> Star2Star Communications >> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- Thomas Merriewether Star2Star Communications -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120713/1b106dd6/attachment-0001.html>