Android | Not reachable when screen is off

+1 vote

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 (150 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.


3 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,680 points)  
share

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.

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 04/2018
  1. Ivan

    18350 Points

  2. Tsetso.Zdravkov

    18320 Points

  3. Joachim

    11460 Points

  4. Anton

    3910 Points

Latest tweets