Some mobile softphones, such as Linphone and Zoiper, allow the signaling server to wake them up with a push notification. This is a quick script I threw together to send those push notifications from our FreeSWITCH server.
Currently this is mostly just an internal script so it's got some annoying hard coded bits. Feel free to fix those and submit a pull request!
Unfortunately, the way GCM works requires the app to approve the GCM sender, which means you'll need to compile it yourself and use your own GCM keys. More documentation on this might be forthcoming. (pull requests gladly accepted)
Right now the config must be in /etc/pushkeys.conf
. It looks a bit like this:
{
"gcm": {
"9999999999999": "asdf"
}
}
Where 9999999999999
is the GCM app ID and asdf
is the key. I'd like to move this to a
ConfigParser format eventually.
I have two dialplan rules to make this work. First
set: sleeptime=${system push.py push ${destination_number}@${domain_name}}
and second:
sleep: ${sleeptime}
To see all of the registration contact details, just run push.py status <extension>@<domain>
.
I have no idea what I'm doing. Please open an issue if you see something stupid that I did.