diff --git a/flexiapi/README.md b/flexiapi/README.md index 308659d..43ca87d 100644 --- a/flexiapi/README.md +++ b/flexiapi/README.md @@ -74,6 +74,17 @@ If you set `INSTANCE_CUSTOM_THEME` to true, FlexiAPI will try to load a CSS file We advise you to copy the `style.css` file and rename it to make your custom CSS configurations for your instance. +#### Flexisip Push notifications pusher + +The API endpoint `POST /tokens` uses the `flexisip_pusher` binary delivered by the [Flexisip](https://gitlab.linphone.org/BC/public/flexisip) project (and related package). You must configure the `APP_FLEXISIP_PUSHER_PATH` environement variable to point to the correct binary. + + APP_FLEXISIP_PUSHER_PATH=/opt/belledonne-communications/bin/flexisip_pusher + +This binary will be executed under "web user" privileges. Ensure that all the related files required by `flexisip_pusher` can be accessed using this user account. + + /var/opt/belledonne-communications/log/flexisip/flexisip-pusher.log // Write permissions + /etc/flexisip/apn/*pem // Read permissions + ### systemd restrictions To retrieve the devices configuration, FlexiAPI connects to the UNIX socket opened by Flexisip. The socket is located in the `/tmp` directory. diff --git a/flexiapi/app/Libraries/FlexisipPusherConnector.php b/flexiapi/app/Libraries/FlexisipPusherConnector.php index 595756a..f642691 100644 --- a/flexiapi/app/Libraries/FlexisipPusherConnector.php +++ b/flexiapi/app/Libraries/FlexisipPusherConnector.php @@ -39,10 +39,11 @@ class FlexisipPusherConnector $payload = json_encode(['token' => $token]); $command = $this->pusherPath - . " --pn-provider " . $this->pnProvider - . " --pn-param " . $this->pnParam + . " --pn-provider '" . $this->pnProvider . "'" + . " --pn-param '" . $this->pnParam . "'" . " --pn-prid " . $this->pnPrid - . " --apple-push-type Background --customPayload " . $payload; + . " --apple-push-type Background" + . " --customPayload '" . $payload . "'"; $output = null; $retval = null; diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 22355e8..c4f17e4 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 74 +%define build_number 75 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager