FlexiSip installation and configuration on Debian 9


Flexisip is a complete, modular and scalable SIP server suite written in C++11, comprising proxy, presence and group chat functions.

Flexisip offers an easy-to-install SIP server solution, offering all the features required to deploy your own SIP service tuned for mobile or desktop applications, “out of the box”.

Flexisip can be integrated into your SIP infrastructure for various purposes :


Flexisip instances can be deployed on server machines to run a SIP VoIP service.
The free linphone.org SIP service has run on Flexisip since 2011, and enables Linphone users to create SIP addresses in order to connect with each other.


Thanks to its modular architecture and its limited number of required dependencies, Flexisip can run perfectly on small hardware systems (embedded systems).


The Push Gateway is a specific operation mode of Flexisip, and was developed by Belledonne Communications to deliver SIP incoming calls or text messages on mobile device platforms where push notifications are required to receive information when the app is not active in the foreground.

Supporting push notifications was already highly recommended and has now become mandatory in some OS (iOS ≥ 10, Android ≥ 8). The push system is promoted as an efficient, highly reliable, bug-free system for receiving information while the phone is switched off.

Flexisip Push Gateway can be integrated into existing SIP infrastructures that do not support push notifications, and in most cases without requiring any configuration changes.

flexisip-schemeFlexisip installation on Debian 9

This guide will show you how to install and configure Flexisip on Debian 9.

Only Debian 8 and Debian 9 are supported.

1. Create the Belledonne Communications APT repo in /etc/apt/sources.list.d/belledonne.list. You may uncomment ‘beta’ and/or ‘alpha’ branches if you need access to pre-release and/or development packages.

  • For Debian 9:
  • For Debian 8:

2. Install Belledonne Communications’ PGP key for package sign checking

3. Update APT cache and install Flexisip and additional components if you need MariaDB and Redis

4. Set paths for binary and library

Binary Path: /opt/belledonne-communications/bin

Library Path: /opt/belledonne-communications/lib

Export binary path

Add the following line at the tail in .bashrc under home folder.

Export library path

Activate library path


5. Install SOCI MySQL backend and fix errors:

liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql
liblinphone-error-Unable to open linphone database with uri

6. Configure Redis

Modify /etc/redis/redis.conf, set the items “bind“, “systemd” and “password

7. Install and configure SNMP (optional)

Install SNMP daemon to monitor and manage the SIP server status(CPU, Memory, Disk, Network usage and so on).

SNMP: “Simple Network Management Protocol.” Install the following pakages.


Modify /etc/snmp/snmpd.conf

To enable SNMP Manager import the MIB file, Commented out “mibs :” in /etc/snmp/snmp.conf.

Modify /etc/snmp/snmpd.conf

8. Configure MariaDB

Password setting

Login by root

Make user “flexisip” and database “flexisip”, exit root login and re-login by user “flexisip”, and make a table “accounts”.

9. Configure the Flexisip and run

Output the Flexisip default configuration file “flexisip.conf” to /etc/flexisip/ directory.

Modify /etc/flexisip/flexisip.conf. There are many options for functions, so the following settings might not be optimized.

10. Start the services

11. Check Flexisip Server status

Now try to access to Flexisip SIP Server with the external devices from remote. Use the Linphone or ZoiPer as the SIP-VoIP Application.

Order SIP Port 5070/tcp(Depend on flexisip.conf)
STUN server domain and port should be same as Flexisip domain and port.
Order Outbound Proxy(Call via SIP Proxy)

Configure MD5 or SHA-256 encryption in Flexisip

Not common to insert the password directly into the database, it should be encrypted.

Flexisip corresponds MD5 and SHA-256 encryption, but SHA-256 will be better.

Flexisip reads and write the password by the following format.











Reference : Flexisip soci code


Flexisip TLS Confuguration(Works under Docker Container)


cafile.pem created from fullchain.pem which is chained the medium certificate:chain.pem and the server certificate(issued from the certificate agency)cert.pem.

agent.pem created from the server certificate:cert.pem and the private key:key.pem.

Edit the following items in /etc/flexisip/flexisip.conf

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com