PushNotification
Last modified by François Grisez on 2020/05/25 11:49
Documentation based on repostory git version commit 1.0.13
Module PushNotification
This module performs push notifications to mobile phone notification systems: apple, android, windows, as well as a generic http get/post to a custom server to which actual sending of the notification is delegated. The push notification is sent when an INVITE or MESSAGE request is not answered by the destination of the request within a certain period of time, configurable hereunder as 'timeout' parameter.
----
Configuration options:
Name | Description | Default Value | Type |
---|---|---|---|
enabled | Indicate whether the module is activated. | false | Boolean |
filter | A request/response enters module if the boolean filter evaluates to true. Ex: from.uri.domain contains 'sip.linphone.org', from.uri.domain in 'a.org b.org c.org', (to.uri.domain in 'a.org b.org c.org') && (user-agent == 'Linphone v2') | BooleanExpr | |
timeout | Number of second to wait before sending a push notification to device(if <=0 then disabled) | 5 | Integer |
max-queue-size | Maximum number of notifications queued for each client | 100 | Integer |
time-to-live | Default time to live for the push notifications, in seconds. This parameter shall be set according to mDeliveryTimeout parameter in ForkContext.cc | 2592000 | Integer |
apple | Enable push notification for apple devices | true | Boolean |
apple-certificate-dir | Path to directory where to find Apple Push Notification service certificates. They should bear the appid of the application, suffixed by the release mode and .pem extension. For example: org.linphone.dev.pem org.linphone.prod.pem com.somephone.dev.pem etc... The files should be .pem format, and made of certificate followed by private key. This is also the path to the directory where to find Voice Over IP certificates (certicates to use PushKit).They should bear the appid of the application, suffixed by the release mode and .pem extension, and made of certificate followed by private key. For example: org.linphone.voip.dev.pem org.linphone.voip.prod.pem com.somephone.voip.dev.pem etc... | /etc/flexisip/apn | String |
Enable push notification for android devices (for compatibility only) | true | Boolean | |
google-projects-api-keys | List of couples projectId:ApiKey for each android project that supports push notifications (for compatibility only) | StringList | |
firebase | Enable push notification for android devices (new method for android) | true | Boolean |
firebase-projects-api-keys | List of couples projectId:ApiKey for each android project that supports push notifications (new method for android) | StringList | |
windowsphone | Enable push notification for windows phone 8 devices | true | Boolean |
windowsphone-package-sid | Unique identifier for your Windows Store app. For example: ms-app://s-1-15-2-2345030743-3098444494-743537440-5853975885-5950300305-5348553438-505324794 | String | |
windowsphone-application-secret | Client secret. For example: Jrp1UoVt4C6CYpVVJHUPdcXLB1pEdRoB | String | |
no-badge | Set the badge value to 0 for apple push | false | Boolean |
external-push-uri | Instead of having Flexisip sending the push notification directly to the Google/Apple/Microsoft push servers, send an http request to an http server with all required information encoded in URL, to which the actual sending of the push notification is delegated. The following arguments can be substitued in the http request uri, with the following values: - $type : apple, google, wp, firebase - $token : device token - $api-key : the api key to use (google and firebase only) - $app-id : application ID - $from-name : the display name in the from header - $from-uri : the sip uri of the from header - $from-tag : the tag of the from header - $to-uri : the sip uri of the to header - $call-id : the call-id of the INVITE or MESSAGE request - $event : call, message - $sound : the sound file to play with the notification - $msgid : the message id to put in the notification - $uid : The content of the text message is put in the body of the http request as text/plain, if any. Example: http://292.168.0.2/$type/$event?from-uri=$from-uri&tag=$from-tag&callid=$callid&to=$to-uri | String | |
external-push-method | Method for reaching external-push-uri, typically GET or POST | GET | String |