By virtue of increasingly deployed IP-PBX systems in place of traditional business phone systems around the world ,using Mobile softphones to communicate with office IP PBX has become more prevalent.
One of the major challenges developers address in mobile SIP client development is receiving incoming calls while softphone application is not running. Until recently ,many developers used to follow simple tricks like continuously playing a blank sound stream or sending keep-alive packets etc., to keep the sockets open while application is running in the background . But with newer versions of mobile OS and the demand for optimised battery utilisation, It become imperative for developers to integrate Push notification service in softphone.
One may find building a push notification service for general-purpose applications is pain-less. But configuring a functional push notification service for SIP client in conjunction with Asterisk based PBX system is not a plain sailing.
After a long search for an usable push notification service for FreePbx all over the internet and could not able to accumulate everything needed to make a fully functional Push Notification service , I have decided to write simple APN scripts for asterisk using shell and php.
This push script can be easily altered and used for integrating Android Push notifications with Asterisk .
Just clone the repo and follow instructions given in README file.