This page will guide you through the flexisip installation steps on Centos and Debian, and provide a quick description for the default configuration.

More detailed configuration options are available in another article.

Requirements

This guide assumes that you are using either a Debian 9 or a Centos 7 (or more recent) distribution.

The hardware should be chosen according to the workload you want to be able to sustain. Although flexisip is not quite CPU intensive (unless you are transcoding), you should make sure that your machine has enough RAM.
Up to about 10000 connections, you should be OK with 8 GB of RAM.

Installation on Centos

Only Centos 7 is supported.

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

yum -y install epel-release

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

[Belledonne-stable]
name=Belledonne-stable
baseurl=http://www.linphone.org/snapshots/centos/$releasever/stable
enabled=1 # keep this enabled even if you enable beta/alpha repositories
gpgcheck=0

[Belledonne-beta]
name=Belledonne-beta
baseurl=http://www.linphone.org/snapshots/centos/$releasever/beta
enabled=0 # enable this if you want pre-release packages
gpgcheck=0

[Belledonne-alpha]
name=Belledonne-alpha
baseurl=http://www.linphone.org/snapshots/centos/$releasever/alpha
enabled=0 # enable this to have development (unstable) packages
gpgcheck=0

3. Perform the actual installation:

yum update
yum install bc-flexisip

The very first launch will fail, because it will lack a valid configuration file (see below for instructions to use a default configuration).

Installation on Debian

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:
deb [arch=amd64] http://linphone.org/snapshots/debian stretch stable # beta alpha
  • For Debian 8:
deb [arch=amd64] http://linphone.org/snapshots/debian jessie stable # beta alpha

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

wget https://linphone.org/snapshots/debian/keyring.gpg -O - | sudo apt-key add -

3. Update APT cache and install Flexisip and its dependencies

apt update
apt install bc-flexisip

Installation from sources using git

If none of the above solutions suit your case, you can still install Flexisip manually by compiling it.

First you have to install tools needed for compilation. You will at least need: cmake, C++ compiler (for instance g++ or Clang), pkg-config, automake, autoconf, libtoolize (libtool), intltoolize (intltool).

Then the following procedure will download latest flexisip with its dependencies and install them in current directory flexisip/OUTPUT:

git clone git://git.linphone.org/flexisip --depth 1 --recursive
cd flexisip
./prepare.py flexisip
 make -C WORK/flexisip/cmake

Default configuration

First of all, be aware that the debian and rpm packages we provide will install flexisip in a non-standard prefix : /opt/belledonne-communications. You may add the bin directory of this prefix to your path for ease of testing:

export PATH=$PATH:/opt/belledonne-communications/bin

Then you should create the flexisip configuration file: /etc/flexisip/flexisip.conf and restart the flexisip daemon:

# this will dump flexisip's default configuration into the configuration file.
/opt/belledonne-communications/bin/flexisip --dump-default all > /etc/flexisip/flexisip.conf

# Use systemd to manage the flexisip services:
systemctl start flexisip-proxy flexisip-presence flexisip-conference

Startup options

By default, flexisip uses the /etc/flexisip/flexisip.conf configuration file.
You can use the --configfile option to force flexisip to use another configuration file.

This script reads into /etc/default/flexisip to read command line options. The --daemon and --syslog options are always added when the flexisip command invocation when it is run from systemd scripts in order to comply with boot system requirements.

Logs

Logs are written by default in /var/opt/belledonne-communications/log/flexisip .

The log directory and log verbosity are configurable from the Global section of the flexisip.conf.

Firewall configuration

On a fresh redhat or centos installation, the firewall is turned ON by default, with almost all ports forbidden. Flexisip won't be able to operate at all under these conditions.

Simply turning off the firewall will allow full operation:

sudo systemctl stop firewalld

however your system administrator may not like this approach, and will prefer enabling selective ports. A flexisip server will generally need:

  • tcp ports for sip/sips: these are the ports mentionned in the transports definition of global section of flexisip.conf.
  • the 3478 UDP port for the builtin STUN server that helps clients to use ICE for efficient media stream transmissions
  • media relay UDP ports, for the media relay service of Flexisip, who is using randomly selected ports in a configurable range.

 

Created by SandrineAvakian on 2017/01/06 10:23