FlexiSip installation and configuration on CentOS 7

Flexisip

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 IN THE CLOUD

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.

FLEXISIP EMBEDDED

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

FLEXISIP PUSH GATEWAY

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 CentOS 7

This guide will show you how to install and configure Flexisip on CentOS 7.

 

1. Install “Extra Packages for Enterprise Linux (EPEL)” repository ; it is used for some Flexisip dependencies like Hiredislibrary.

2. Add Belledonne Communications’ repository by creating /etc/yum.repos.d/BelledonneCom.repo with following content:

Add MariaDB repository to get the latest MariaDB packages by creating /etc/yum.repos.d/MariaDB.repo with following content:

3. Update yum 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/lib64

Export binary path

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

Export library path

Activate library path

Temporary

5. Configure Redis

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

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

https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/Configuration/SNMP/

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

7. Configure MariaDB
Enable at start:

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

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

9. Start the services

10. 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)
DTMF:SIP
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.

“youserID:domain:password”

MD5:

MD5(‘accountID:domain:password’)

 

SHA-256:

SHA2(‘accountID:domain:password’,256)

 

Examples:

MD5

SHA-256

Reference : Flexisip soci code

https://github.com/BelledonneCommunications/flexisip/blob/master/src/authdb-soci.cc


Flexisip TLS Confuguration(Works under Docker Container)

https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/Configuration/

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