Documentation based on repostory git version commit 2.3.3-35-g3090fe0f 

Module PushNotification

This module performs push notifications to mobile phone notification systems: apple, android, 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:

NameDescriptionDefault ValueType

Indicate whether the module is activated.


A request/response enters module if the boolean filter evaluates to true. Ex: from.uri.domain contains '', from.uri.domain in '', (to.uri.domain in '') && (user-agent == 'Linphone v2'). You can consult the full filter documentation here :


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.


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.


Maximum number of notifications queued for each push notification service


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.


Retransmission interval in seconds for push notification requests, when a retransmission-count has been specified above.


Default interval between to subsequent PNs when remote push notifications are used to notify a call invite to a clients that haven't published any token for VoIP and background push notifications. In that case, several PNs are sent subsequently until the call is picked up, declined or canceled. This parameter can be overridden by the client by using the 'pn-call-remote-push-interval' push parameter.
A value of zero will cause the deactivation of push notification repetitions and the sending of thefinal notification. Thus, only the first push notification will be sent.
The value must be in [0;30]


If true, the following key in the payload of the push request will be set:
 * 'from-uri': the SIP URI of the caller or the message sender.
 * 'display-name': the display name of the caller or the message sender.
 * 'loc-args': the display name if not empty or the SIP URI instead.

If false, the keys will be set but as empty.


Enable push notification for apple devices


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: 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: etc...


Set the badge value to 0 for Apple push


Enable push notification for Android devices.


List of pairs of <Firebase Project Number>:<Firebase Cloud Messaging API (Legacy) Server Key> for each Android project that supports push notifications.


List of pairs of <Firebase Project Number>:<Path to service account json file> for each Android project that supports push notifications.


Represents the time in seconds to execute the access token refresh operation just before the current access token expires. This parameter is used to control overlapping access token lifetimes.


Default interval in seconds to execute the access token refresh operation in the event that the access token has not been successfully obtained.


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 substituted 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.


Method for reaching external-push-uri, typically GET or POST


Protocol used for reaching external-push-uri, http2 or http (deprecated)


Send service push notification every n minutes to all devices that are about to expire and should wake up to REGISTER back. 0 to disable. Recommended value: 30


Start sending wake-up push notifications to contacts when they pass that percentage of their lifetime.