How to continue receiving calls when the Android softphone app is in the background or closed

The recent article Softphone for Android: let sleep or sleep deprivation has stirred up the public: we got many messages with questions and cases that their authors faced. Different softphones, different countries, different providers. And the same pain: went to sleep mode and never woke up. As a result, missed calls, lost profit, battered reputation of a person-impossible-to-reach.

It was rather striking to see that each wrote about it in their own terms. Seemingly, in our IT sphere there should be a long-established terminology… but not in this case: some wrote that the softphone is getting unregistered, some said that the softphone loses connection, and some stated that the softphone cannot wake up.


Surprisingly, the same variety reigns on forums: Google brings to Reddit, Quora, Stack Overflow, as well as Asterisk, FreePBX, and Microsoft communities — here are some top often questions and topics:
...softphone app cannot wake up;
...cannot receive calls;
...cannot connect to the network;
...getting unregistered;
...logs out;
...issues waking up;
...won't receive calls;
...loses connection during sleep;
...dropping connection when not in use;
...goes offline after a few minutes of inactivity.

The subject seems to be sore: there one can easily find “help!”, “woes”, “murder”, and many other expressive and emotional words. In order not to be unfounded, just look at the Help with softphone woes android topic :)


But our award goes to this brilliant thread. The discussion starts calmly, nothing foretold:

Every time I background the app, close it or allow my phone to go to sleep, the app unregisters my VoIP account.


Someone drops a comment:

That's the nature of the beast


Wow. Off the bat. Say, what did you want? You thought you were in a fairy tale, dude? Just like in the Hotel California: they stab it with their steely knives, but they just can't kill the beast… Life is pain, all gloom and darkness.

Another commenter writes:

Apps are not normally allowed to maintain a constant connection in the background because it would...


and suddenly

...murder battery.


Wonderful. An English Murder. Murder, She Wrote. The Murders in the Rue Morgue. Keep writing, carry the Edgar Poe’s and Agatha Christie’s noble traditions. You are amazing.

One more view: it requires...

an external server that maintains the actual VoIP connection and then pings the phone through the platform's notification system to tell it to wake up


According to the next comment,

you need to be connected to a service that supports Apple/Android Push


And this is exactly the way that we used for the mobile White Label softphone development, described in the Softphone for Android: let sleep or sleep deprivation article. It goes without saying, different operating systems need different pushes: Apple Push for iOS and Android Push for the OS by Google (Render unto Caesar the things that are Caesar's, and unto God the things that are God's, as it’s said).


The breakthrough is near! The community renders a judgement: like it or not, but now it’s

impossible to have a standard SIP client that "just works" without external infrastructure


As for the external infrastructure, the already mentioned Google/Android Push plays this role; it acts in a bundle with push-server and push-proxy. The general scheme looks like

Softphone external infrastructure

We’ve passed through anger, depression, and the other stages of grief, now we are close to acceptance. Need to move on. Maybe even with the same provider:

I’m using voip.ms


A good choice. VOIP.ms is a decent provider and our partner, among others. We go way back, you can see them on our website, and our softphone is present in their Wiki.

By the way: Push-proxy doesn't necessarily have to be on the PBX provider’s site. Mobile Softphone.Pro infrastructure includes both push-proxy and push-server. The main thing is that your PBX supports SIP protocol.

So the algorithm is the following:

  1. In the moment of the call PBX says to the push-proxy: we got an inbound!
  2. Then the push-proxy asks the softphone: are you awake?
  3. Should the softphone is cheerful and happy, it immediately receives the call (and this is the end of the story). Otherwise the softphone is asleep, must wake him:
  4. The push-server joins the party and brings a friend, the Apple/Google Push — the one who acts as an alarm clock and wakes our hero up.
  5. The Softphone awakens, everyone's happy.


We truly want that one day on all the forums people discuss not fails and problems but examples of how their softphone
...can wake up
...receives all the calls
...never drops connection
...stays logged in
and has no waking up issues.


Enjoy Softphone.Pro and keep calm 💙

YOU MAY ALSO LIKE

Blog Softphone for Android: let sleep or sleep deprivation?

Blog Softphone for Android: technologies we use

Blog Softphone actually: what people say


Last Articles