BelledonneCommunications / linphone-android

Linphone.org mirror for linphone-android (https://gitlab.linphone.org/BC/public/linphone-android)
https://linphone.org
GNU General Public License v3.0
1.12k stars 688 forks source link

sip account not going unreachable in background ! #836

Closed webjframework closed 4 years ago

webjframework commented 4 years ago

Hi there ,

I am using Android 7 and latest linphone .( in settings the background mode is not checked) .

I have 2 accounts .One linphone and one with my asterisk server (for outgoing calls only). I want the phone to wake up with the push of the linphone account witch does but when it goes to background i want the other account to go unreachable in order to avoid the battery drain. In the previous version it was working like that and i think this is the meaning of not background mode.

Further more when you receive a missed call , its a good idea to not stay the pop up screen in foreground. You need only a notification of the missed call .

Thanks in advance

Viish commented 4 years ago

Hi, Indeed in the event you have 2 accounts, one of which sip.linphone.org, it won't be unregistered when the app stops. But don't worry it won't drain any battery as the app is off. Cheers,

webjframework commented 4 years ago

i tried again with ONLY one no linphone account and its have the same behavior ..

it drain battery and data because asterisk send qualify to sip peer, In the previous version worked right !

Cheers

On Thu, 21 Nov 2019 at 10:22, Sylvain Berfini notifications@github.com wrote:

Hi, Indeed in the event you have 2 accounts, one of which sip.linphone.org, it won't be unregistered when the app stops. But don't worry it won't drain any battery as the app is off. Cheers,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK73I7MMAAMZU7YOUIHDQUZALNA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEZLWSA#issuecomment-556972872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK7ZIXQCUE4S6YKHG5J3QUZALNANCNFSM4JPQKHLA .

Viish commented 4 years ago

If the app is killed how can Asterisk send packets to your account and drain the battery ?

webjframework commented 4 years ago

when i manually kill the app from the recent it the account is going unreachable ...So the issue is that when i receive a call from push after that is not killed ...

On Thu, 21 Nov 2019 at 13:37, Sylvain Berfini notifications@github.com wrote:

If the app is killed how can Asterisk send packets to your account and drain the battery ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK74QA5OIZLJEDZDCZO3QUZXJFA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEZ5YEI#issuecomment-557046801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK76RUYBASPQLQZFXVQTQUZXJFANCNFSM4JPQKHLA .

Viish commented 4 years ago

The push will wake up the app and all accounts will register, that's expected. After that, either Android kills the app again (after a few minutes in background) and you won't have any battery drain, or the app stays and indeed that might happen. However how do you want the app to unregister an account just because it is in background ?

webjframework commented 4 years ago

the app never unregister the account the asterisk server do that because the app is killed ...the issue is that the app not killed by android at least in adnroid 7.

On Thu, 21 Nov 2019 at 15:44, Sylvain Berfini notifications@github.com wrote:

The push will wake up the app and all accounts will register, that's expected. After that, either Android kills the app again (after a few minutes in background) and you won't have any battery drain, or the app stays and indeed that might happen. However how do you want the app to unregister an account just because it is in background ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK76AXEAVLUVBINVTTRLQU2GEVA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2IPFQ#issuecomment-557090710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK76XVAV2NP4UK5G4FVLQU2GEVANCNFSM4JPQKHLA .

Viish commented 4 years ago

Sorry but I fail to see what the 4.1 version does differently about that. It doesn't kill itself in background either.

webjframework commented 4 years ago

I am not expecting from a app to kill itself

so explain to me what the background mode means ???

On Thu, 21 Nov 2019 at 15:54, Sylvain Berfini notifications@github.com wrote:

Sorry but I fail to see what the 4.1 version does differently about that. It doesn't kill itself in background either.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK75VFSULACRU5RAFVW3QU2HIXA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2JMXI#issuecomment-557094493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK7YL6OD42BYDK37BAOLQU2HIXANCNFSM4JPQKHLA .

Viish commented 4 years ago

The background mode shows a notification in the top bar that tells Android not to kill the Service. It is not needed when using push notifications because the push will start the app if it is killed, but if you don't have push and if the Service is killed you will never receive a call or a message.

webjframework commented 4 years ago

so if the background mode is not checked the app must be killed by android ...right ??

because if its right it's not killed !!!

On Thu, 21 Nov 2019 at 16:06, Sylvain Berfini notifications@github.com wrote:

The background mode shows a notification in the top bar that tells Android not to kill the Service. It is not needed when using push notifications because the push will start the app if it is killed, but if you don't have push and if the Service is killed you will never receive a call or a message.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK7YZJL4CY5ELKBH2IHLQU2IX3A5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2KV6Q#issuecomment-557099770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK76GL2HGBJGIL2JYND3QU2IX3ANCNFSM4JPQKHLA .

Viish commented 4 years ago

Yes without background mode Android will kill the app. However depending on the Android version and the device manufacturer the time can be variable.

webjframework commented 4 years ago

the issue is that yesterday i was waiting 7 hours and it was not killed !!!

On Thu, 21 Nov 2019 at 16:12, Sylvain Berfini notifications@github.com wrote:

Yes without background mode Android will kill the app. However depending on the Android version and the device manufacturer the time can be variable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK7ZRQOHRHOUYVQFXMD3QU2JNVA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2LI2I#issuecomment-557102185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK76EFPFXDP5EEGELYTTQU2JNVANCNFSM4JPQKHLA .

Viish commented 4 years ago

Have you checked the app battery settings in Android applications parameters and that you didn't allow it to run indefinitely ?

Viish commented 4 years ago

If you want you can try with branch feature/accelerate_service_killing_in_background, it will automatically stops the Service in background

webjframework commented 4 years ago

i set the linphone in restrict mode and i was waiting for 30 min ...no kill of service

branch??

you mean to download a linphone night version with that feature ??

and when you enable this feature it will still wake with the push ?

On Thu, 21 Nov 2019 at 16:37, Sylvain Berfini notifications@github.com wrote:

If you want you can try with branch feature/accelerate_service_killing_in_background, it will automatically stops the Service in background

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BelledonneCommunications/linphone-android/issues/836?email_source=notifications&email_token=AHDAK73WZA6RPAC47MST42TQU2MLLA5CNFSM4JPQKHLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2N54I#issuecomment-557113073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDAK74M77XC2AY27PZYQRLQU2MLLANCNFSM4JPQKHLA .

Sikandar106 commented 1 year ago

hi i am developing and sip dialar app where i user transport tcp along with other information like domain and username and password but it kept on saying unauthorized error and when i try to login same extension with same tranport type in your devleoped linphone app so i am getting an error account does not exist but on the same time i login with grandstream wave i easily get inside wihtout any error kindly reslove this issue