Installation

This page will guide you through the flexisip installation steps on Linux Centos7 and Debian9, 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 Centos7

There are 3 steps that are required for installing on Centos7:

  • You have to have the EPEL repository added to your list of repositories; we use it for the hiredis-devel package.

To install EPEL, simply go there: http://mirror.ibcp.fr/pub/epel/7/x86_64/repoview/epel-release.html and download and install the package.

  • Then, add our nightly repository to your yum repo list:
cat > /etc/yum.repos.d/Belledonne.repo <<EOF
[Belledonne]
name=Belledonne
baseurl=http://www.linphone.org/snapshots/centos7
enabled=1
gpgcheck=0
EOF
  • Then perform the actual installation:
    sudo yum update
    sudo 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 9 Stretch (works for Debian 8 Jessie too)

Create the Belledonne Communications apt repo in /etc/apt/sources.list.d/belledonne.list :

deb [arch=amd64] http://linphone.org/snapshots/debian stretch main

FOR WHEEZY ONLY: If not yet present, add the wheezy backport repository (for redis-server):

deb http://ftp.debian.org/debian/ wheezy main

Install the belledonne communication gpg key used to sign the debs:

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

Update aptitude and install flexisip and it's dependencies:

aptitude update
aptitude install bc-flexisip

You may mark bc-flexsisp package as "hold" to prevent it to be automatically updated by safe-upgrade or full-upgrade commands:

aptitude hold 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

# on debian 7:
service flexisip restart

# on centos7, debian8, debian9:
systemctl start flexisip.service

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.

An init script is installed in /etc/init.d/flexisip to manage the automatic start/stop of the service during the machine boot.

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 init scripts in order to comply with boot system requirements.

It is possible to pass additional command line options by creating or editing the  /etc/default/flexisip file with a single line:

flexisip_OPTIONS="--configfile /opt/mycompany/myflexisipconf.conf"

Firewall configuration - important

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