Android | Not reachable when screen is off

+2 votes

Hi,

I have an issue with incoming Zoiper calls using SIP on WiFi on different devices (for example Samsung Galaxy A3).

When the screen is off, about one tenth of the incoming calls receive the busy signal. Often, the moment when the calling party receives the busy signal, the phone starts ringing but cannot be picked up.

Have had this happen on old and newest Zoiper versions, Android 6 and 7.

Changing into TCP or UDP does not make a difference either.

Zoiper is removed from the "optimize battery" list and Android Doze is disabled.

If I keep the phone screen turned on all the time, this does not happen. It only happens when the screen is off.

It took a while until I was able to pinpoint the issue - would greatly appreciate some help!

Thanks!

asked Jan 29 in Android by kreshnik (160 points)  
share

Hi,

Do you have keep alive wifi, stay awake and run in background enabled at the connectivity settings?

Regards,

Paul

Hi Paul,

Yes, all three are enabled have have always been.

Best regards,
Kreshnik

Hi Kreshnik,

Any other software installed using voip technology?

Regards,

Paul

There is a setting on samsung phones to turn off the wifi when the screen is off in Wifi -> Advanced Settings.

Also I would ping the phone form a pc / laptop and see if it keeps responding while the screen is off.

Hi Paul,


No, just the normal apps that came with the phone. Not even Skype or Whatsapp are installed in this particular device.

Thanks!
Kreshnik

Hi,

Thanks!

So the ping test did reveal, I believe, what the problem is. It seems that Android degrades the performance of wifi when on sleep (even though set to "keep it alive"). Here are the results of the ping:

Antwort von 172.16.98.152: Bytes=32 Zeit=13ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=311ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=210ms TTL=63
Zeitüberschreitung der Anforderung.
Antwort von 172.16.98.152: Bytes=32 Zeit=116ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=39ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=57ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=191ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=6ms TTL=63
Antwort von 172.16.98.152: Bytes=32 Zeit=35ms TTL=63
Zeitüberschreitung der Anforderung.
Antwort von 172.16.98.152: Bytes=32 Zeit=167ms TTL=63
Zeitüberschreitung der Anforderung.
Antwort von 172.16.98.152: Bytes=32 Zeit=313ms TTL=63

I made the same test in a completely other device, too: Xiaomi Redmi Note 3 wifi same wifi sleep policy - same result.

I searched for some Google connectivity service that might be "battery optimized", but I cannot find any settings that might have to do something with this.

Only setting the ping timout to 10 seconds seems to make sure that every ping request is answered. But there are often very long delays:

Antwort von 192.168.40.136: Bytes=32 Zeit=5608ms TTL=64

Does anyone have any idea what can be done here to have Android "wake" its wifi more often?

Thanks!

Hi,

Thanks!

Did you already tried : Settings --> Accu(Battery) -->Power saving management-->setting icon -->Smart memory clean up?

This helped me.

Regards,

Paul

I tested the issue with pings, too:

1. Test:

When pinging the whole time to my phone it rings immediately on any call. But now the phone is mostly awake and does not sleep at all.

2. Test:

I let the phone sleep for about 5min. Then starting an incoming call. Phone still sleeps. Now I start pinging the phone at the same time as the call waits and now the phone wakes up from the pings and rings.


4 Answers

0 votes

Hi,

I have the exact same problem. Until autumn 2017 all worked fine for several years.

Now I can not longer rely on Zoiper on incoming calls on my Xiaomi Redmi Note 3 SE/Kate, although I set all the settings for not sleeping, not battery saving etc within MIUI.

At the moment I use Grandstream wave as 2nd VoIP-client, which works fine, but has big addressbook issues. So GS wave is only used to wake up my device on incoming calls and when the screen goes on Zoiper also starts to ring - at least most of the time.

That's kind of strange solution, but until now the Zoiper team did not really react to this issue. Today I got an update for Zoiper which has a switch to not let the phone sleep at all - which is totally out of acceptance, because it will drain the battery within few hours.

I don't understand why they cannot fix this, as it worked fine in the past and others like Grandstream also can do it.

answered Mar 26 by Pholio (150 points)  
share

Hi,

Did you tried to change your beacon interval on your router?

Depending on your actual network usage, you may also need a lower beacon interval for such as VoIP, mobile phones that pick up calls.

You do not want to setup your wifi network configuration in such a way that your devices wake up every 10 minutes to pick up calls or notifications.

I am using a Fritzbox as Sip-Server, so there is no need for such settings, because sip-sessions stay inside the local network. Also I am not able to change these settings in the Fritzbox.

0 votes

I did some tests. Using zoiper exact version "Zoiper rv2.8.70-mod" on a Moto G4. Enabling only wifi (no cell data). I own and manage the PBX so I did a trace on PBX side.

Sometimes no incoming call on zoiper, and sometimes incoming call arrives many seconds later.

Everycase, zoiper reply to SIP INVITE with TRYING, but no RINGING sip packet or is very late. You can see the timing capture on the link below. In that case RINGING packet was 7 second later.

Capture attached

So, I don't thing this would be only a "sleep" android issue, because zoiper always replies to INVITE.

answered Mar 28 by elkato (140 points)  
share

I agree. As I mentioned Zoiper immediately starts ringing when I manually activate the phone by pressing the power button. Seems that Zoiper has a problem in waking up the device to ring.

@elkato, can you please send us an email to "android   (at)  zoiper  (dot)  com" with a mention of this topic and the exact issue. 


Elkato, does it even happen to you that Zoiper starts ringing, but the calling party shows that the Zoiper extension is busy? Picking up in Zoiper starts the timer but of course no audio is being exchanged because for the other caller the call has ended.

This only happens when Zoiper is called when the android screen is off.

0 votes

The alarm settings will schedule an alarm every 30 seconds to wake up Zoiper. This method does not work reliably on all phones, android version and targetted SDK versions and might depend on other factors such as memory usage, battery left etc. After Zoiper checks for incoming calls.

The issue above is not with Zoiper, it is the phone not waking up the application (on time). 

In the case of elkato, it seems like a different issue zoiper is actually woken up, but not given enough cpu time to get to the ringing part and we would like to investigate that more. 

With the constant wakelock, zoiper will be active all the time but will be using minimal cpu. Battery usage will inevitably be more but it will not cause the battery to drain in a few hours.




answered Mar 28 by root (1,720 points)  
share

You might be right, I may have described two issues, although it seems to me they are related.

1. Zoiper not woken up, which means calls return busy.

2. Zoiper woken up with delay, which means it starts ringing but the calling party has already ended the call (with busy signal). This time the RINGING packet might be sent with a delay, as elkato described.

Nonetheless, shouldn't both issues have been resolved with the new Background mode? I ran a few tests when I have the Constant Wake Lock selected. Unfortunately, it still sometimes happens Zoiper either:

1. does not ring at all and the calling party shows busy, OR

2. starts ringing with delay and the calling party shows busy.

In any case, there is definitely a difference in the delay between dialing and ringing when the device screen is on (no delay) and the screen is off (variable delay).

Could you please clarify how exactly the two new Background mode options work:

- Alarm scheduler

- Constant Wake Lock

What exactly is done in the background? What does Android do to the Zoiper app, that the background mode is supposed to fix?

Edit: just wanted to add that the issues described here DO NOT happen if I keep the screen on all the time. I actually use an app Automate to keep the device screen on constantly, and since then I encounter no issues. Of course, battery is affected, so it is not an optimal workaround.

Both issues should indeed have been fixed with the new background mode (constant wake lock), it sounds like your phone does not allow zoiper to be active in the background at all. (or the network goes away).


When an application is sent to the background, android will normally put the application to sleep (stop giving it cpu time).


The alarm version puts an alarm clock every 30s and then we use a wakelock to force zoiper to be alive for a little bit to reregister and check for incoming calls, after which the application will be put back to sleep. (the exact time zoiper will be awake for depends on the phone).


The constant wakelock forces android to keep providing cpu cycles to zoiper, similar to how playing music in the background would work. Zoiper does not do anything other than reregister every now and then and listen for incoming calls on the udp / tcp sockets. 

Please contact us on support@zoiper.com so that we can send you a special version with extra debugging to investigate the issue




But why did it work in the past and now, since about 6 months in my case, it does not any longer?

Zoiper 1 is targetting a different API than zoiper 2, which could make a difference. If zoiper one also behaves differently, the reason will be outside of Zoiper. (phone firmware, network, other apps running,...)

So that means it will keep this behaviour? Then Zoiper will be useless for me :(

I set all battery settings in MIUI, all locks to not stop the app, but I still miss most of the calls. Wakelock mode is not an option, because the phone never sleeps and battery time decreases from 2 days to 0.5 days.

Does the keep wakelock work on your phone ? (Aside from using more battery).

We have push coming soon btw :)


Yes, it seems to work. As I told my phone begins to ring immediately when I push the power button during making a call to my phone. On the calling side I do not hear any ring, but when I push the power button Zoiper starts to ring and I also get a ringtone on the calling side.

So Zoiper obviously gets the call, but is not able to ring in these cases.

Push will not help me, because my SIP-server is on my DSL-router (Fritzbox). On the other hand I don't understand why push should be a better solution than the current version or the old one in Zoiper 1. Something always has to listen, either to incoming calls or to a push notice. So what's the deal?

I also want to add, that at the moment I use Grandstream wave as additional VoIP app, which ALWAYS rings reliably without using wake lock or anything else I would see in battery usage.

So since some weeks I use Grandstream wave to wake up the phone on incoming calls and then Zoiper starts ringing, too (a least most of the time). I don't use GS wave as main VoIP app, because it has some dial rule issues, e.g. can't ignore brackets and spaces in numbers stored in address book, but it is a known issue they are working on.

As I like Zoiper I really would like to stay with it, but without Zoiper ringing reliably on ALL incoming calls it is a complete nogo, especially as VoIP app. And as we can see here, there are a lot of people having the same issue! Look at the recent Google play store comments.

Please install Grandstream wave by yourself and test it, perhaps you could find out what they are doing to manage its functionality.

I might have been too quick with my comment. After testing it for two days, I have not managed to replicate the issue. I am assuming when I tested it the setting was not correctly set. So the newest update has not resulted in any lost calls for me for the last two days. I am only waiting for the DSCP option (currently in Beta), and I will be fully happy with Zoiper :)

Regarding Pholio's comments, I have also tried using Grandstream Wave before, but it worked less reliably than Zoiper. Not only did I have the same issue, but sometimes it happened that Wave showed multiple incoming calls at the same time, while showing busy on the caller side.

kreshnik, did you use Zoiper now with wake lock set? Of course it works this way, but did you check your battery consumption?

Do you use Zoiper beta? And what is DSCP option?

Some information regarding DSCP and what it is can be found here: https://en.wikipedia.org/wiki/Differentiated_services

I do not notice any significant battery consumption. Are you using UDP? That, from what I've read, uses more battery. It might also have to do with the device. I use the Samsung Galaxy A3 device.

I you look at the battery history you see a full line at "Awake". See this picture here:

https://forums.androidcentral.com/attachments/htc-10/226965d1462712268t-real-life-battery-life-screenshot_20160508-085510.jpg

As it shows a full line at Wi-Fi with Zoiper wake lock also the Awake line is full. That means the phone is not sleeping and always consuming more battery.

If you do not see any difference perhaps your phone already has another app which does prevent Android from sleep. I notice a drain in battery using Zoiper wake lock.

And I don't see any reason why I should use a wake lock, because some months ago Zoiper worked fine without  that and other apps do, too.

Hello,

With Galaxy s6 (Android 7.0) there is no issue with incoming calls!

The problem is with Galaxy j5 (Android 7.1.1) and Xiaomi Redmi 5A (Android 7.1.2)!

The call comes in silently , with no ringing , until i press the power button ,and wake the sreen!

After that , the phone is ringing normaly!

Thank u! 

There is nothing we can do if the phone does not wake up Zoiper on time. It is beyond our control. 
The constant wakelock will use more battery for sure. Wait a couple of weeks and we should have push support.


Again: I use Grandstream wave and it DOES wake up the phone on all imcoming calls, so finally Zoiper also rings on this call, because wave woke the device.

Grandstream wave does NOT use a constant wakelock! So I do not understand why Zoiper is not able to do it the same way?

Also in the old API it mostly worked fine. It seems, that Zoiper should think through his API selection/realization again.

Why you don't test it by yourself?

The API used is the same as the others and the same as in zoiper 1. The phone decides when to wake up zoiper and when not. Values under 2 minutes are unreliable. 

We have no control over it and we do not know how the decision is made, only that it seems very random. What works on one phone most likely won't work on another one and the other way around. 

The decision might be made based on different API levels, firmware, hardware, battery levels, memory usage, we have no idea. 

Why do you not talk about those 2 points:

  1. An older version of Zoiper did work for several years on my phone. Since mid/end 2017 it stopped working normally and since then I miss most of the calls.
  2. Grandstream wave has none of these issues. So why should Zoiper?

Honestly, I only hesitate to use wave because it has dialing/addressbook issues. If this is solved, there is not really something preventing me to switch over to Grandstream wave, although I bought several Zoiper licenses and really liked the app. But without incoming calls (without wakelock) a phone app is totally useless.

I spoke about those points, but you are not listening. There is NOTHING we can do. Your phone is not waking up some applications reliably for whatever reason. 

It used to work with Zoiper and we haven't changed the method. The method used is the same as the other brands do. The phone is randomly deciding not to wake up the application. 

I will send you some old versions of Zoiper to play with. 





Have a look here, it explains it a bit more:

From:

https://developer.android.com/reference/android/app/AlarmManager.html#setExact(int,%20long,%20android.app.PendingIntent )

setAndAllowWhileIdle:

To reduce abuse, there are restrictions on how frequently these alarms will go off for a particular application. Under normal system operation, it will not dispatch these alarms more than about every minute (at which point every such pending alarm is dispatched); when in low-power idle modes this duration may be significantly longer, such as 15 minutes.

For reliable incoming calls with udp, we need to re-register every 30s to keep the NAT open. If we were to use 1 minute instead of 30s it would probably work most of the time, the calls would work for some people (with routers with high nat timeout) but would not work all the time for users with lower nat timeout.

Thanks, I will try the old versions.

As I am using the same phone I cannot explain, why it did work, even a long time with Zoiper 2.0 beta it worked. Little time after the official 2.0 release the problems startet.

0 votes

We just released zoiperbeta with experimental push proxy support. Could take a few hours to propagate to all beta users.

https://play.google.com/store/apps/details?id=com.zoiper.android.zoiperbeta.app&hl=en

Important to know, we do not transmit your password to our servers, unlike the other softphones do, so even if we get hacked, nobody will be able to steal your password as we don't have it.

This option will require a subscription once released as stable. (we need to proxy all communications for that).

Be sure to go to connectivity settings and enable the push in the settings.
answered Apr 24 by root (1,720 points)  
edited May 3 by root
share

thanks for effort, installed beta version, same when screen turn off a while. always busy tone.

When turning screen on, becomes reachable. 

Have you activated the PUSH service from Zoiper -> Settings -> Connectivity ? 

yes. tried everything: keep wifi alive, run in background, use tcp.......set registry expire time to 120s.

after sleeping a while,  zoiper becomes unreachable, always busy tone.

This issue perhaps from android 8, zoiper works great in android 7 and 6.  After upgrading to andriod 8(Oreo), such problem occurs. however it's interesting I tried zoiper on LG pad (android8), works well. 

https://developer.android.com/about/versions/oreo/background

FYI, my cellphone is huawei mate9. 

What about the PUSH option, have you tried it ?

yes, tried. but nothing changed and the problem still there.

perhaps either Huawei or Oreo killed/interfered Zoiper in some way.

With the PUSH notification, there should be no issues. By the way, when you enable the PUSH proxy, is everything working correctly for you ? Do you see warning that the registration expiry time is too short ?  If yes, this means that your VoIP provider has maximum allowed registration expiry time shorter than the recommended value of 10 minutes and your phone may kill Zoiper or may not work correctly.

Hi,

I have the same problem on my Huawei P9 (Android 6) with Zoiper Pro and Zoiper Free. It seems to be a general problem - SipGo, CSipSimple, Sipdroid etc. have the same issue. The best result I have is, when I run an older version of Zoiper Free on my Huawei (unfortunately it works not every day properly...), or when I using my other, older device with Android 4.4.2 (works fine and stable everyday).

Additionally I have a question about Zoiper Beta: "Could take a few hours to propagate to all beta users." = how many hours? After install I am waiting ca. 4 hours and get by calling my voip number still "Sorry, the number you dialed didn't respond." Not even my voice mail on the VoIP account (should be if out of range or phone is off), but only "didn't respond". Outgoing calls are OK and Zoiper Beta works - after uncheck "push service" - quite stable with outgoing and incoming calls.

Any suggestions?

TIA

After installing Zoiper Beta I run on my Huawei P9 Zoiper Beta AND Zoiper Free/Pro (one of them simultaneously with Zoiper Beta). It seems to be better, because Zoiper Free works in background stable and goes not asleep even after one or two hours the screen is locked (Zoiper Pro is going asleep “as usually”).
By an incoming call I see only the UI of Zoiper Free, Zoiper Beta seems to be only a kind of support with the push service.
It's funny and it is more a workaround then a really solution, but it works :)
HTH
Z.


PS.
Zoiper Beta works as a stand alone app not properly - it runs, but if the push service is active, there are no incoming calls, only the voice mail of my voip account.

"warning that the registration expiry time is too short " didn't see this.

I tried everything I can do, but either zoiper or ziper beta became unreachable after screen off some time.

My solution: downgrade my mate9 to android 7, reset as new phone ( restoring from backup had same problem), and use old version zoiper. works great again.

by the way, zoiper on my LG pad (android oreo) works well at the beginning, but became unreachable after 5-6 hours. 

Hence, two reasons perhaps:

1. Android oreo kills zoiper

2. other apps draw over zoiper ( I am not sure, but turn off this feature of all other apps)

Moreover, probably you could add below features as options :

1. turn on screen when registering with server

2. let notification LED light on when missing a call (like GMAIL has new email)

I found zoiper couldn't be waked up if some other apps running in background when screen off.

so you might clean all other apps in background if plan to let your phone sleep long time.

Welcome!
Ask your questions and receive answers from other members of the Zoiper Community.

Did you check our Help Section?

You are a Zoiper Biz or Premium customer? If so, click HERE to get premium support.
Top users 10/2018
  1. Tsetso.Zdravkov

    22500 Points

  2. Ivan

    18370 Points

  3. Joachim

    11480 Points

  4. Anton

    3950 Points

Latest tweets