How to Disable Background Support

AJ
Ashraf Jaddo
Thu, May 10, 2012 7:56 PM

Hello All,

I am trying to figure out how to disable background support in PJSIP 1.12 .. I read that I can do this at runtime or at compile time.

for Compile time, do I need to change the os_auto.h file and set both of PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT  to 0 ? I did this but everything I run ./configure-iphone it creates a new os_auto.h file with bot values are set back to 1 !!!

or the way to do this is by passing some flag it in ./configure_iphone?? or change my config_site_sample.h to add both defines as 0??

For the runtime way.. I could not find and PJSUA API that allow me to disable BG?? am I missing something..

Best Regards,

AsH

Hello All, I am trying to figure out how to disable background support in PJSIP 1.12 .. I read that I can do this at runtime or at compile time. for Compile time, do I need to change the os_auto.h file and set both of PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0 ? I did this but everything I run ./configure-iphone it creates a new os_auto.h file with bot values are set back to 1 !!! or the way to do this is by passing some flag it in ./configure_iphone?? or change my config_site_sample.h to add both defines as 0?? For the runtime way.. I could not find and PJSUA API that allow me to disable BG?? am I missing something.. Best Regards, AsH
SM
s.marek@avm.de
Fri, May 11, 2012 7:58 AM

| I am trying to figure out how to disable background support in PJSIP
| 1.12 .. I read that I can do this at runtime or at compile time.

Why don't you just remove the UIBackgroundModes Keys (voip and audio) from
your info.plist?

This way you don't have to fiddle around with PJSIP options. When you want
to turn on background support in the future, you just add the info.plist
keys and you're done.

| For the runtime way.. I could not find and PJSUA API that allow me to
disable BG?? am I missing something..

Maybe this is what you're looking for:

    pj_activesock_enable_iphone_os_bg(PJ_FALSE);

It is declared in activesock.h.

Good luck,
Sebastian.

| I am trying to figure out how to disable background support in PJSIP | 1.12 .. I read that I can do this at runtime or at compile time. Why don't you just remove the UIBackgroundModes Keys (voip and audio) from your info.plist? This way you don't have to fiddle around with PJSIP options. When you want to turn on background support in the future, you just add the info.plist keys and you're done. | For the runtime way.. I could not find and PJSUA API that allow me to disable BG?? am I missing something.. Maybe this is what you're looking for: pj_activesock_enable_iphone_os_bg(PJ_FALSE); It is declared in activesock.h. Good luck, Sebastian.
HK
Hemant Kotdiya
Fri, May 11, 2012 8:06 AM

Hi Ashraf,

Disable these flags in os_auto.h.in file. os_auto.h is a auto
generated file from os_auto.h.in

regards,
Hemant

On Fri, May 11, 2012 at 1:26 AM, Ashraf Jaddo ash.x.ash@hotmail.com wrote:

Hello All,

I am trying to figure out how to disable background support in PJSIP 1.12 ..
I read that I can do this at runtime or at compile time.

for Compile time, do I need to change the os_auto.h file and set both of
PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT   to
0 ? I did this but everything I run ./configure-iphone it creates a new
os_auto.h file with bot values are set back to 1 !!!

or the way to do this is by passing some flag it in ./configure_iphone?? or
change my config_site_sample.h to add both defines as 0??

For the runtime way.. I could not find and PJSUA API that allow me to
disable BG?? am I missing something..

Best Regards,

AsH


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Ashraf, Disable these flags in os_auto.h.in file. os_auto.h is a auto generated file from os_auto.h.in regards, Hemant On Fri, May 11, 2012 at 1:26 AM, Ashraf Jaddo <ash.x.ash@hotmail.com> wrote: > Hello All, > > I am trying to figure out how to disable background support in PJSIP 1.12 .. > I read that I can do this at runtime or at compile time. > > > for Compile time, do I need to change the os_auto.h file and set both of > PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT   to > 0 ? I did this but everything I run ./configure-iphone it creates a new > os_auto.h file with bot values are set back to 1 !!! > > or the way to do this is by passing some flag it in ./configure_iphone?? or > change my config_site_sample.h to add both defines as 0?? > > > For the runtime way.. I could not find and PJSUA API that allow me to > disable BG?? am I missing something.. > > > Best Regards, > > AsH > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
AJ
Ashraf Jaddo
Fri, May 11, 2012 3:39 PM

Thanks for the info.. Yeas I was confused when I was changing os_auto.h then
I see it goes back to the old value..

Thanks again....

-----Original Message-----
From: Hemant Kotdiya
Sent: Friday, May 11, 2012 4:06 AM
To: pjsip list
Subject: Re: [pjsip] How to Disable Background Support

Hi Ashraf,

Disable these flags in os_auto.h.in file. os_auto.h is a auto
generated file from os_auto.h.in

regards,
Hemant

On Fri, May 11, 2012 at 1:26 AM, Ashraf Jaddo ash.x.ash@hotmail.com wrote:

Hello All,

I am trying to figure out how to disable background support in PJSIP 1.12
..
I read that I can do this at runtime or at compile time.

for Compile time, do I need to change the os_auto.h file and set both of
PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT
to
0 ? I did this but everything I run ./configure-iphone it creates a new
os_auto.h file with bot values are set back to 1 !!!

or the way to do this is by passing some flag it in ./configure_iphone??
or
change my config_site_sample.h to add both defines as 0??

For the runtime way.. I could not find and PJSUA API that allow me to
disable BG?? am I missing something..

Best Regards,

AsH


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Thanks for the info.. Yeas I was confused when I was changing os_auto.h then I see it goes back to the old value.. Thanks again.... -----Original Message----- From: Hemant Kotdiya Sent: Friday, May 11, 2012 4:06 AM To: pjsip list Subject: Re: [pjsip] How to Disable Background Support Hi Ashraf, Disable these flags in os_auto.h.in file. os_auto.h is a auto generated file from os_auto.h.in regards, Hemant On Fri, May 11, 2012 at 1:26 AM, Ashraf Jaddo <ash.x.ash@hotmail.com> wrote: > Hello All, > > I am trying to figure out how to disable background support in PJSIP 1.12 > .. > I read that I can do this at runtime or at compile time. > > > for Compile time, do I need to change the os_auto.h file and set both of > PJ_ACTIVESOCK_TCP_IPHONE_OS_BG / PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT > to > 0 ? I did this but everything I run ./configure-iphone it creates a new > os_auto.h file with bot values are set back to 1 !!! > > or the way to do this is by passing some flag it in ./configure_iphone?? > or > change my config_site_sample.h to add both defines as 0?? > > > For the runtime way.. I could not find and PJSUA API that allow me to > disable BG?? am I missing something.. > > > Best Regards, > > AsH > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
AJ
Ashraf Jaddo
Fri, May 11, 2012 3:42 PM

I saw "pj_activesock_enable_iphone_os_bg(PJ_FALSE);" after I was looking at
ticket#1145 and #3336 but is it accessible from <pjsua-lib/pjsua.h> in my
iphone app?

Thanks

-----Original Message-----
From: s.marek@avm.de
Sent: Friday, May 11, 2012 3:58 AM
To: pjsip list
Subject: Re: [pjsip] How to Disable Background Support

| I am trying to figure out how to disable background support in PJSIP
| 1.12 .. I read that I can do this at runtime or at compile time.

Why don't you just remove the UIBackgroundModes Keys (voip and audio) from
your info.plist?

This way you don't have to fiddle around with PJSIP options. When you want
to turn on background support in the future, you just add the info.plist
keys and you're done.

| For the runtime way.. I could not find and PJSUA API that allow me to
disable BG?? am I missing something..

Maybe this is what you're looking for:

    pj_activesock_enable_iphone_os_bg(PJ_FALSE);

It is declared in activesock.h.

Good luck,
Sebastian.


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

I saw "pj_activesock_enable_iphone_os_bg(PJ_FALSE);" after I was looking at ticket#1145 and #3336 but is it accessible from <pjsua-lib/pjsua.h> in my iphone app? Thanks -----Original Message----- From: s.marek@avm.de Sent: Friday, May 11, 2012 3:58 AM To: pjsip list Subject: Re: [pjsip] How to Disable Background Support | I am trying to figure out how to disable background support in PJSIP | 1.12 .. I read that I can do this at runtime or at compile time. Why don't you just remove the UIBackgroundModes Keys (voip and audio) from your info.plist? This way you don't have to fiddle around with PJSIP options. When you want to turn on background support in the future, you just add the info.plist keys and you're done. | For the runtime way.. I could not find and PJSUA API that allow me to disable BG?? am I missing something.. Maybe this is what you're looking for: pj_activesock_enable_iphone_os_bg(PJ_FALSE); It is declared in activesock.h. Good luck, Sebastian. _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org