No description
PHP
Find a file
2022-10-11 14:43:10 +02:00
conf Fixed configuration by really using reference of parameter in hook instead of copy, fixed provisioning for subdomains, added logs in case of digest auth fail 2020-12-03 11:28:01 +01:00
cron Add a send message endpoint, passing by the linphone-daemon unix pipe 2022-02-08 18:04:25 +01:00
docker Added conditionnal in spec files to declare dependencies based on the rhel version. Added temp dockerfile for rocky (to be added in sdk repository to be reused) 2022-07-07 13:59:30 +02:00
flexiapi Fix #46 Rely on the external account identifier and not the non-existing full identifier 2022-10-11 14:43:10 +02:00
httpd Fixed missing permission for activation.php in httpd.conf 2020-07-30 16:35:58 +02:00
src Fix cases where alias and username can both be phone numbers but different 2022-03-07 14:21:41 +01:00
.gitignore Move the configuration to the .env file to support per-instances configurations 2020-09-14 11:24:59 +02:00
.gitlab-ci.yml Fix #42 add PHPMD to the GitlabCI 2022-09-21 15:29:27 +02:00
CHANGELOG.md Fixed bug in XMLRPC authenticator ('SHA256' typo instead of 'SHA-256' causing 401 because the authenticator can't understand the parameter), added Changelog 2020-10-16 15:55:33 +02:00
flexisip-account-manager.spec Fix #46 Rely on the external account identifier and not the non-existing full identifier 2022-10-11 14:43:10 +02:00
LICENSE.txt Feature/complete rework for future developments 2019-07-05 11:56:32 +02:00
Makefile Fix #42 add PHPMD to the GitlabCI 2022-09-21 15:29:27 +02:00
README.md Fix #32 Remove the FlexiAPI related documentation in the XMLRPC README 2022-08-04 17:08:55 +02:00

Introduction

Flexisip Account Manager is a software product running on a server, dedicated to the creation and management of SIP accounts from Linphone-based apps. It supports user identity validation via email or SMS, secure user authentication with SHA-256 digest or TLS client certificates.

Flexisip Account Manager also includes a remote provisioning server for static auto-configuration, compatible with Linphone URL / QR Code provisioning feature.

License

Flexisip Account Manager is dual licensed, and can be licensed and distributed:

  • under an Affero GPLv3 license for free (see LICENSE.txt file for details)
  • under a proprietary license, for closed source projects. Contact Belledonne Communications for any question about costs and services.

Documentation

Install RPM package with dependencies

Enable Belledonne Communications repository:

cat > /etc/yum.repos.d/Belledonne.repo << EOF
[Belledonne]
name=Belledonne
baseurl=https://www.linphone.org/snapshots/centos7/
enabled=1
gpgcheck=0
EOF

CentOS-SCLo-scl-rh repository is also required for PHP 7.3:

yum install centos-release-scl-rh

RPM package should install necessary dependencies automatically.

yum install bc-flexisip-account-manager

This package depends on rh-php73 which will be installed in /opt/rh/rh-php73/. If you don't have any other php installed on your server, use the following to be able to use php commands:

ln -s /opt/rh/rh-php73/root/usr/bin/php /usr/bin/php

Apache server configuration

The RPM will create a flexisip-account-manager.conf file inside /opt/rh/httpd24/root/etc/httpd/conf.d/

It simply contains an Alias directive, up to you to configure your virtual host correctly.

Once you're done, reload the configuration inside httpd: service httpd24-httpd reload

MySQL database configuration

For the account manager to work, you need a mysql database with a user that has read/write access.

XMLRPC server configuration

The RPM package has installed the configuration files in /etc/flexisip-account-manager/

Each file name should be explicit on which settings it contains. If you have any doubt, leave the default value. At least you MUST edit the following file and fill the values you used in previous step:

nano /etc/flexisip-account-manager/db.conf

To create the database schema, use the artisan migrate script provided by FlexiAPI.

Email configuration

Flexisip Account Manager is sending email to allow the accounts activations. To allow emails to be sent a few configuration steps are required:

  1. Install sendmail and postfix
  2. Set EMAIL_ENABLED and SEND_ACTIVATION_EMAIL to true in the configuration
  3. Ensure that postfix is correctly configured (regarding the relayhost setting in main.cf for example)

Install OVH SMS gateway dependency (optionnal)

Download and install composer or use the one already provided by your OS. Then install the php-ovh-sms library in the flexisip-account-manager directory.

cd /opt/belledonne-communications/share/flexisip-account-manager/
php composer.phar require ovh/php-ovh-sms

Packaging

To build a rpm package on centos7:

make rpm

To build a rpm package with docker:

docker run -v $PWD:/home/bc -it gitlab.linphone.org:4567/bc/public/flexisip-account-manager/bc-dev-centos:7 make rpm

GitLab is running the command above using make rpm-dev, this also install all the required dependencies to run phpunit properly (they are disabled by default to save space in the final rpm file).

The flexisip-account-manager rpm package can be found in rpmbuild/RPMS/x86_64/bc-flexisip-account-manager*.rpm

Miscellaneous

  • For remote provisioning create a default.rc file in /opt/belledonne-communications/ and set the values you want client side, set the provisioning uri to the same host but to provisioning.php instead of xmlrpc.php.

  • If SELinux forbids mail sending you can try this command: setsebool -P httpd_can_sendmail=1

  • On CentOS firewalld might be running: firewall-cmd --state

  • If it is running you can add a rule to allow https traffic: firewall-cmd --zone public --permanent --add-port=444/tcp && firewall-cmd --reload

  • If you use the standard https port (443) or http (80) the following command might be better: firewall-cmd --zone public --permanent --add-service={http,https} && firewall-cmd --reload

  • Also it can listen on IPv6 only. To fix that, edit /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf and add/set: Listen 0.0.0.0:444 https