2 questions about background mode (IOS)

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

 



Hi,

Here is my suggestions

for a - implement network reachability call back function for monitoring
mobile device switches.

Yes you need to re-register pjsip when mobile device switches transport
medium.

for b- though keepAlive function fires for every 10 mins. SIP registration
happens as soon as it is going to expires. ex: if the UA is going to
expires in 120 seconds and the app is in background, SIP Stack sends
re-registration in 120 seconds.

You need to use TCP transport to work your app in background.

Don't forget to set "Required background modes" -> "App Provides Voice over
IP services" in Info.plist

On Fri, May 4, 2012 at 8:34 PM, Aytunc Aytunc <aytunch at gmail.com> wrote:

> Hello all,
>
> i am working on an iPhone/iPad client and it is about to be finalized
> soon. however i am having issues with the background mode. i would be glad
> if you can clarify these issues:
>
> a- When the mobile device switches transport medium (3G / WiFi / Edge) i
> believe a re-registration needs to be sent to the sip server with the new
> info. But how do i know if transport medium is changed programatically? is
> there a pjsip callback for this or an IOS callback and what is it?
>
> b- in the sample ipjsua code there is a function
> - (void)keepAlive {
>     if (!pj_thread_is_registered())
>     {
>     pj_thread_register("ipjsua", a_thread_desc, &a_thread);
>     }
>     keepAliveFunction(KEEP_ALIVE_INTERVAL);
> }
>
> as i understand, this function fires every 600 seconds (the least amount
> of time allowed by IOS). what should we put in this keepAliveFunction?? my
> guess is we need to 1) re-subscribe for buddy presence 2) re-register to
> server and 3) re-publish for our presence. IS there a sample
> keepAliveFunction that i can look at?
>
>
>
>
> Thank you,
>
> Aytunc Isseven
>
> _______________________________________________
> 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
>
>


-- 
Ramu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120504/b242be6f/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