HELP about background mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think we were talking on stack overload :)

The iOS background wakeup should happen once every 10 minutes (600 seconds), and no sooner. If you're seeing it sooner, then your app is probably not suspended. You should put in a regular log (every 10s or something like that) so you can tell for sure when it's active or suspended (because the log entries will stop until you're woken up). Also put a log entry in the wake-from-suspend callback. Most likely the problem is in this area.

The not-registered message usually comes from using the NDLB flag. If you watch the registrations in the sip server logs, you'll see the timeout in the server's response, right after the acknowledgement (set sofia loglevel all 9 if you aren't seeing it, and start with TPORT_LOG=1 ./freeswitch). It's usually 30 seconds when using NDLB. After that, the server will reject call attempts with the not registered message.


--  
Michael Fortson


On Wednesday, February 8, 2012 at 7:28 AM, Ashraf Jaddo wrote:

> Hello,
>   
>   
> I am using PJSIP 1.12.. I did not run any special config when I compiled the libraries.. just compile for ARM6 and ARM7 then merge.. I am trying to get background working so:
>   
>   
> - I used TCP instead of UDP as my protocol.
>   
> - I checked PJ_ACTIVESOCK_TCP_IPHONE_OS_BG and PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT in OS_autu.h and I see both of the defined as 1. I see both of them defined in a ?#if defined(PJ_DARWINOS) && PJ_DARWINOS!=0? so I did not change anything...
>   
> - I added Required Background mode flag into my test App plist file
>   
> When I launch my app from xcode by hitting the run button, then I press home on the device to put the app in background mode I see logs from my registration function every 60 seconds as expected. and when I call the device I hit the on_incomming_call event as expected....
>   
> But when I launch the app from the device itself just click on its icon the background does not work..  
>   
> if I tried to call the device after 60 seconds, Astersik will say the device is not registered which mean the background socket did not respond to the Keep alive message between the server and the device..if I removed the plist entry about background mode It does not work in both cases (launch from xcode and launch from device), so I think I am on the right path...  
>   
>   
> To confirm that my settings are good i added log success to ?static void activesock_create_iphone_os_stream(pj_activesock_t *asock)? when it set kCFStreamNetworkServiceTypeVoIP and I see that log when I start the app from xcode but again I know it is working from xcode but not as a stand alone..
>   
>   
> Am I missing something else?? I have been researching this issue an I am not sure what is missing? Anyone who did get background mode to work ??
>   
>   
> Thanks,,,,,
>  
>  
>  
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>  
> pjsip mailing list
> pjsip at lists.pjsip.org (mailto:pjsip at lists.pjsip.org)
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120208/dbcbb3db/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux