Setup Push notifications for iOS or Android
Click Here to return to the the SkyPhone Main Screen: Back
Push notifications are used to notify the user of incoming calls and start SkyPhone when it is not running. If Skyphone is running, it will simply receive the call and start ringing.
To setup push notifications requires 2 things:
1. An updated mod_sofia.so module which you can obtain from Sky Networks.
2. This module must be configured as follows:
Click here for instructions on how to setup firebase on your app. https://firebase.google.com/docs/cloud-messaging
Click here for instructions on how to setup your push notification certificate for Apple. This is required for apple notifications even if you use firebase for the push instead of APN (Apple Push Notifications)
Once it's setup you can access
a) https://firebase.google.com/docs/cloud-messaging
b) Download your google.
The configuration file is located in /home/skynet/sky/conf/autoload_configs/sofia.conf.xml
<param name="is-ios-encode" value="1"/> <param name="is-android-encode" value="0"/> <param name="is-push-every-call" value="1"/> <param name="is-dev-cert" value="1"/> <param name="push-method" value="1"/> <param name="ios-push-use-fcm" value="0"/> <param name="android-push-url" value="https://fcm.googleapis.com/fcm/send"/> <param name="android-api-key" value="AIzaSyCE5l74KKPbOyWMZ-l2raqtUaD6FY2X0Y8"/> <param name="push-log-file" value="/home/skynet/sky/log/sky_push.log"/> <param name="fs-cli" value="/home/skynet/sky/bin/fs_cli"/> <param name="invite-wait-time" value="10"/> </global_settings>
2. push server Usage.
There should be a script called pushtest to try it in the sky/bin directory Here is the source:
- !/bin/bash
- Send a push notify to a client
- $1 - calling number
- $2 - called number
fsc "sofia_push external2 $1 $2
skydance push is an API command. It has 3 argments. The usage is: sofia_push <profile_name> <calling_number> <called number>
2.1 The push can be used in diaplan like: <action application="lua" data="/home/skynet/sky/scripts/sofia_push.lua internal 1001 1002"/>