Interest in implementing SIP push notification

Thats correct. Both have their pros and cons but UDP is unreliable when routing or tunnels are in place because UDP fragmentation is unable to work through stateless firewalls (missing header in fragments).
Connecting mobile endpoints should alwas use TLS for security or at least TCP to be reliable. UDP is perfectly fine for server2server (for example Asterisk <-> Kamailio). Sound quality has nothing to do with SIP signaling over UDP.

Curios if this has worked for you. I’m using Linphone on Android and IOS devices and need a way to wake them via Push Notifications when they’re receiving a call.


Unfortunately, I haven’t been able to make this work, and I’ve pretty much decided to abandon Linphone on mobile.

My next move was going to be to start hacking Linphone more aggressively (build in timers and wake-locks to try to keep it registered). This would obviously destroy battery life, but it should help the phones ring more reliably.

Sorry I couldn’t be more helpful.

On Android, you should be able to just disable the auto-sleep, as is done for WhatsApp.

Could you explain how that is done, or maybe link to a resource on how WhatsApp does it? I’ve gotten pretty deep in the Android settings and I haven’t found anything that worked reliably.

Thanks for responding. Have you found an alternative? Seems like any SIP solution would have the same issue and require push notifications to wake the device.

Linphone does have something called Flexisip that looks like it could work, but we have to do more research on that. Essentially it proxies the PBX and handles push notifications when the receiving device doesn’t respond, otherwise just redirects messages.

Sure thing. Unfortunately, I haven’t found a good alternative. I was looking into Flexisip as well, and it does seem like it could do the job. I didn’t go that way because I don’t love how Belledonne has handled the Linphone open source project, and I didn’t want to get more invested in their products.

You’re right that you’re going to run into the same issues with other solutions. In my case, mobile devices aren’t a necessity, just a convenience. So, I’m dropping them in favor of desktop based softphones (or traditional desk phones if I can’t make that work).

If I absolutely had to make this work, I would use something like the AGI script posted here to bring push notifications to asterisk. Other software that might work:

  • Jami - I wasn’t able to make this work as a simple SIP client, but they say it can be done
  • baresip-studio - pretty rudimentary UI
  • zoiper - closed source
  • Zulu UC - softphone is in beta (has been for a long time)
  • Android system phone - Android comes with a basic SIP stack. It is missing a lot of features, but if you’re good you could fork a distribution like LineageOS, modify the Android source to include the features you need and run with that. I can’t be sure, but I feel like the built in system phone is not subject to the same battery restrictions as other apps (you never see these types of problems on regular cell network calls).

Set it unmonitored, see:

Thanks for sharing. Maybe I’m missing something, but that looks like a forum thread about a Samsung specific feature (App power monitor). I haven’t seen anything like that on my vanilla Android devices.

I don’t have a vanilla Android to play with, but I would assume the problem only arises because of the operation of the power monitor.

Yeah, you are right about that. Unfortunately, Android has progressively become more and more aggressive in battery optimization by curtailing what apps in the background can do. This thread tells the story pretty well.

Since Android 8 there is very little chance that an app can reliably maintain a network connection when it is not active and in the foreground. This pretty much leaves us with push notifications as the only option to receive calls. The other frustrating thing about this is that the only push system I am aware of that will actually work reliably on Android is Google’s FCM. So, we are forced to bring a 3rd party into the process of receiving every single call.

Hi ringdom,

Maybe you can try Zoiper.

In zopier, Setting->Connectivity->Enable Keep Alive WiFi & Run in background is on
And Setting->Connectivity->Background Mode -> Select 『Wake Lock』
Successfully answer calls on Samsung J4 mobile phones for a long time

Thanks for the suggestion. I have played with it a bit. It seemed to ring fairly reliably in my testing, but it’s been a while so I can’t remember if I ran into any other issues with it. Being closed source was the main deal killer for me there.

Thanks for sharing.
My understanding is this addresses Android issue only; would this work with iOS 12 (iPhone)?


I don’t have as much experience with iOS, but I understand the situation is very similar there (aggressive battery saving prevents background apps). The RFC linked in the OP even mentions iOS specifically in the Introduction.

Thank you @Dilbert66 for sharing the script, really appreciate it.
I am trying to implement this code to work with my asterisk 16 to make push to my ios sip client. As it is shown here, it work with Google Firebase and android only. Any suggestion on what modifications needed to work the script with Apple Push Notification (APN)?

I’ve not done it myself but am curious about better solutions to the problem, after being frustrated in the past with battery and disconnect issues on some SIP soft phone clients, so, here are some APN docs you might consider:

Also the RFC draft that OP linked to is, as of last month, now a proposed standard # 8599:

One decent Java implementation of push over GCM/APN/WebSockets can be found in the open source Signal-Server project:


1 Like