PushNotification
Documentation based on repostory git version commit 2.0.7-2-ga93725b0
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 by 'timeout' parameter. The PushNotification has an implicit dependency on the Router module, which is in charge of creating the incoming and outgoing transactions and the context associated with the request forking process. No push notification can hence be sent if the Router module isn't activated. The time-to-live of the push notification depends on event for which the push notification is generated. - if it is for a call (INVITE), it will be set equal 'call-fork-timeout' property of the Router module, which corresponds to the maximum time for a call attempt.
- if it is for an IM (MESSAGE or INVITE for a text session), then it will be set equal to the 'message-time-to-live' property.
----
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 seconds to wait before sending a push notification to device. A value lesser or equal to zero will make the push notification to be sent immediately, which is recommended since most of the time devices can't have a permanent connection with the Flexisip server. | 0 | Integer |
message-time-to-live | Time to live for the push notifications related to IM messages, in seconds. The default value '0' is interpreted as using the same value as for message-delivery-timeout of Router module. | 0 | Integer |
max-queue-size | Maximum number of notifications queued for each push notification service | 100 | Integer |
retransmission-count | Number of push notification request retransmissions sent to a client for a same event (call or message). Retransmissions cease when a response is received from the client. Setting a value of zero disables retransmissions. | 0 | Integer |
retransmission-interval | Retransmission interval in seconds for push notification requests, when a retransmission-count has been specified above. | 5 | Integer |
display-from-uri | If true, the following key in the payload of the push request will be set: If false, the keys will be set but as empty. | false | Boolean |
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. | /etc/flexisip/apn | String |
no-badge | Set the badge value to 0 for Apple push | false | Boolean |
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. | String | |
windowsphone-application-secret | Client secret. For example: Jrp1UoVt4C6CYpVVJHUPdcXLB1pEdRoB | String | |
external-push-uri | Instead of having Flexisip sending the push notification directly to the Google/Apple/Microsoft push servers, send an http request to a server with all required information encoded in the 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: | String | |
external-push-method | Method for reaching external-push-uri, typically GET or POST | GET | String |