• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    C++
  • License
    GNU Affero Genera...
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)

Flexisip is a complete, modular and scalable SIP server suite written in C++17, comprising proxy, presence and conference functions. It also includes a push notification service, 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.

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.

It can also be embedded and run perfectly on small hardware systems.

License

Copyright © Belledonne Communications

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

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

Documentation

Dependencies

Dependency Description Mandatory Enabled by default
OpenSSL TLS stack. X
LibNgHttp2 HTTP2 stack. X
libsrtp2 Secure RTP (SRTP) and UST Reference Implementations X
SQLite3 Library for handling SQlite3 file X
libmysql-client Client library for MySQL database. X
Hiredis Redis DB client library, used for Registrar DB and communications between Flexisip instances of a same cluster. (-DENABLE_REDIS=YES) X
Protobuf Needed for migration from legacy registrar database format. (-DENABLE_PROTOBUF=YES) X
NetSNMP SNMP library, used for SNMP support. (-DENABME_SNMP=YES) X
XercesC XML parser. (-DENABLE_PRESENCE=YES) X
jsoncpp JSON parsing and writing (-DENABLE_B2BUA=YES) X

Compilation

Required build tools

  • C and C++ compiler. GCC and Clang are supported as long as they are recent enough for building C++14 code. On Redhat/CentOS 7, we recommend installing gcc-7 from https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ . The default gcc-4.8 is not sufficient.
  • CMake >= 3.13
  • make or Ninja
  • Python >= 3
  • Doxygen
  • Git

Building Flexisip with CMake

Create a build directory and configure the project:

mkdir ./build
cmake -S . -B ./build
make -C ./build -j<njobs>

Check CMakeLists.txt to know the list of the available options and their default value. To change an option, you just need to invoke CMake again by specifying the option you need to change only. For instance, to disable the presence server feature:

cmake ./build -DENABLE_PRESENCE=OFF
make -C ./build -j<njobs>

You may also use ccmake or cmake-gui utilities to configure the project interactively:

ccmake ./build
make -C ./build -j<njobs>

Building RPM or DEB packages

This procedure will make a unique RPM package containing Flexisip and all its dependencies and the according package for debug symbols.

The following options are relevant for packaging:

CMAKE_INSTALL_PREFIX The prefix where the package will installed the files.
SYSCONF_INSTALL_DIR Where Flexisip expect to find its default configuration directory.
CMAKE_BUILD_TYPE Set this to “RelWithDebInfo” to have debug symbols in the debuginfo package.
CPACK_GENERATOR Select the kind of package. “RPM” or “DEB”.
cmake ./build -DCMAKE_INSTALL_PREFIX=/opt/belledonne-communications -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSYSCONF_INSTALL_DIR=/etc -DCPACK_GENERATOR=RPM
make -C ./build -j<njobs> package

The packages are now available in ./build directory.

Docker

A docker image can be build from sources with command:

docker build -t flexisip --build-arg='njobs=<njobs>' -f docker/flex-from-src .

Nix ❄️

Flexisip can also be compiled with Nix. You can obtain a development shell with: (from the root of the repository)

nix-shell

Or with Flakes enabled:

nix develop

Nix makes it easier to have a reproducible development environment on any Linux distribution, and doesn't interfere with other installed tooling. It is just an additional, optional way to build flexisip.

Example build commands:

CC=gcc CXX=g++ BUILD_DIR_NAME="build" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -S . -B ./$BUILD_DIR_NAME -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Sanitizer -DCMAKE_INSTALL_PREFIX="$PWD/$BUILD_DIR_NAME/install" -DENABLE_UNIT_TESTS=ON -DENABLE_STRICT_LINPHONESDK=OFF -DINTERNAL_JSONCPP=OFF -DENABLE_B2BUA=ON
cd build
clear && cmake --build . -j12 --target install && LSAN_OPTIONS="suppressions=../sanitizer_ignore.txt" bin/flexisip_tester --resource-dir "../tester/" --verbose

Note to maintainers

At the exception of shell.nix, .nix files should live inside the nix/ folder.

All .nix files should be formatted with nixpkgs-fmt.

Configuration

Flexisip needs a configuration file to run correctly. Use ./flexisip --dump-all-default > flexisip.conf to make a documented default configuration file.

Developer notes

With sofia-sip, you have the choice between msg_dup() and msg_copy(), sip_from_dup() and sip_from_copy(), etc. The difference isn't well documented in sofia-sip documentation but it is important to understand that:

  • *_dup() makes a copy of the structure plus all included strings inside. (deep copy)
  • *_copy() just makes a copy of the structure, not the strings pointed by it. (shallow copy) These functions are dangerous; use *_dup() versions in doubt.

Your build is broken but you don't see how that's your fault? (E.g. trying to compile a file you removed, and you've double-checked it is not referenced anywhere in the source code anymore) Try reconfiguring and regenerating. (With e.g. ccmake)

More Repositories

1

linphone-android

Linphone.org mirror for linphone-android (https://gitlab.linphone.org/BC/public/linphone-android)
Kotlin
1,018
star
2

linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)
Objective-C
542
star
3

linphone-desktop

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of git://git.linphone.org/linphone-desktop.git
C++
349
star
4

liblinphone

Linphone.org mirror for liblinphone (git://git.linphone.org/liblinphone.git)
C++
343
star
5

ortp

Linphone.org mirror for ortp (git://git.linphone.org/ortp.git)
C
135
star
6

mediastreamer2

Linphone.org mirror for mediastreamer2 (git://git.linphone.org/mediastreamer2.git)
C
124
star
7

bcg729

Linphone.org mirror for bcg729 (git://git.linphone.org/bcg729.git)
C
114
star
8

linphone-sdk

Mirror for linphone-sdk (https://gitlab.linphone.org/BC/public/linphone-sdk.git)
CMake
81
star
9

belle-sip

Linphone.org mirror for belle-sip (git://git.linphone.org/belle-sip.git)
C
64
star
10

sofia-sip

Linphone.org mirror for sofia-sip (git://git.linphone.org/sofia-sip.git)
C
27
star
11

linphone-xamarin

Linphone.org mirror for linphone-xamarin (git://git.linphone.org/linphone-xamarin.git)
C#
27
star
12

bctoolbox

Linphone.org mirror for bctoolbox (git://git.linphone.org/bctoolbox.git)
C
23
star
13

opencore-amr

Linphone.org mirror for opencore-amr (git://git.code.sf.net/p/opencore-amr/code)
C++
17
star
14

bzrtp

Linphone.org mirror for bzrtp (git://git.linphone.org/bzrtp.git)
C
14
star
15

linphone-windows10

Linphone.org mirror for linphone-windows10 (git://git.linphone.org/linphone-windows10.git)
C#
14
star
16

linphone-web-ui

Linphone.org mirror for linphone-web-ui (git://git.linphone.org/linphone-web-ui.git)
JavaScript
12
star
17

linphone-cmake-builder

Linphone.org mirror for linphone-cmake-builder (git://git.linphone.org/linphone-cmake-builder.git)
CMake
12
star
18

bcunit

Linphone.org mirror for bcunit (git://git.linphone.org/bcunit.git)
C
9
star
19

linphone-web-plugin

Linphone.org mirror for linphone-web-plugin (git://git.linphone.org/linphone-web-plugin.git)
C++
8
star
20

linhome-android

Kotlin
8
star
21

belr

ABNF Parser - Linphone.org mirror for belr (git://git.linphone.org/belr.git)
C++
8
star
22

libupnp

Linphone.org mirror for libupnp (git://git.code.sf.net/p/pupnp/code)
C
8
star
23

linphone-wp

Linphone.org mirror for linphone-wp (Windows Phone) (git://git.linphone.org/linphone-wp.git)
C
7
star
24

flexisip-account-manager

A REST API, web portal and provisioning server for Flexisip
PHP
5
star
25

meta-bc

Linphone recipes layers for builds using Yocto.
BitBake
3
star
26

linhome-ios

Swift
2
star
27

vo-amrwbenc

Linphone.org mirror for vo-amrwbenc (git://git.code.sf.net/p/opencore-amr/vo-amrwbenc)
C
2
star
28

firebreath

Linphone.org mirror for firebreath (git://git.linphone.org/firebreath729.git), based on firebreath
C++
2
star
29

lime

C++
2
star
30

mselph264

Mediastream2 plugin for ELP camera with h264 encoding support.
C++
1
star
31

linphone-bb10

Linphone.org mirror for linphone-bb10 (git://git.linphone.org/linphone-bb10.git)
C++
1
star