Documentation based on repostory git version commit 1.0.12-405-gca78774
 

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:

NameDescriptionDefault ValueType
enabledIndicate whether the module is activated. falseBoolean
filterA 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
timeoutNumber of second to wait before sending a push notification to device(if <=0 then disabled) 5Integer
max-queue-sizeMaximum number of notifications queued for each client 100Integer
time-to-liveDefault time to live for the push notifications, in seconds. This parameter shall be set according to mDeliveryTimeout parameter in ForkContext.cc 2592000Integer
appleEnable push notification for apple devices trueBoolean
apple-certificate-dirPath 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/apnString
googleEnable push notification for android devices (for compatibility only) trueBoolean
google-projects-api-keysList of couples projectId:ApiKey for each android project that supports push notifications (for compatibility only) StringList
firebaseEnable push notification for android devices (new method for android) trueBoolean
firebase-projects-api-keysList of couples projectId:ApiKey for each android project that supports push notifications (new method for android) StringList
windowsphoneEnable push notification for windows phone 8 devices trueBoolean
windowsphone-package-sidUnique identifier for your Windows Store app. For example: ms-app://s-1-15-2-2345030743-3098444494-743537440-5853975885-5950300305-5348553438-505324794 String
windowsphone-application-secretClient secret. For example: Jrp1UoVt4C6CYpVVJHUPdcXLB1pEdRoB String
no-badgeSet the badge value to 0 for apple push falseBoolean
external-push-uriInstead 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-methodMethod for reaching external-push-uri, typically GET or POST GETString
Created by Buildbot on 2017/01/16 10:02