Skip to main content

CentOS 7 and RHEL 7

Authentication required

SignalWire Personal Access Tokens (PAT)s are required to access FreeSWITCH install packages.
HOWTO Create a SignalWire Personal Access Token

About

FreeSWITCH project has been moved to GitHub: https://github.com/signalwire/freeswitch
Please open new issues in: https://github.com/signalwire/freeswitch/issues

This article contains FreeSWITCH™ installation instructions on hosts with CentOS7 or RHEL7 operating system.

Linux

Sofia-sip and SpanDSP Notice!

SpanDSP and sofia-sip

Sofia-sip and SpanDSP dependencies have been removed from the FreeSWITCH™ tree since v1.10.4 Release (05 August 2020).

You can find source files of Sofia-sip here: https://github.com/freeswitch/sofia-sip

SpanDSP sources are here: https://github.com/freeswitch/spandsp

Packages for Sofia-sip and SpandDSP are available for all supported platforms from our packaging repos.

You might have to visit each directory, run ./bootstrap.sh then ./configure then make install

Click to expand Table of Contents

Installing from RPM Packages

Easy Way

Release

FreeSWITCH™ can be installed from packages as follows

echo "signalwire" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswitch

FreeSWITCH™ is now installed and can be accessed with

FreeSwitch CLI

fs_cli -rRS

Master for Testing

WARNING not suitable for production

The master branch of FreeSWITCH™ can be installed from packages as follows

echo "signalwire" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-dev/freeswitch-dev-repo-0-1.noarch.rpm epel-release

And then install as follows

yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswitch

Compiling from source code

Building from source

Release

FreeSWITCH™ can be built from source if you desire but it is not recommended.

In case of errors about "no usable spandsp" or sofia-sip, compile and install spandsp and sofia-sip first, then

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

where ls /usr/local/lib/pkgconfig should list at least

sofia-sip-ua.pc spandsp.pc

Then FreeSWITCH should compile properly.

echo "signalwire" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum-builddep -y freeswitch
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git
yum install -y devtoolset-4-gcc*

scl enable devtoolset-4 'bash'

cd /usr/local/src
git clone -b v1.10 https://github.com/signalwire/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure --enable-portable-binary \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-gnu-ld --with-python --with-erlang --with-openssl \
--enable-core-odbc-support
make
make -j install
make -j cd-sounds-install
make -j cd-moh-install

Master for Testing

WARNING not suitable for production

FreeSWITCH™ can be built from source if you desire but it is not recommended.

echo "signalwire" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-dev/freeswitch-dev-repo-0-1.noarch.rpm epel-release
yum-builddep -y freeswitch
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git
yum install -y devtoolset-4-gcc*

scl enable devtoolset-4 'bash'

cd /usr/local/src
git clone https://github.com/signalwire/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure --enable-portable-binary \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-gnu-ld --with-python --with-erlang --with-openssl \
--enable-core-odbc-support
make -j
make -j install
make -j cd-sounds-install
make -j cd-moh-install

Building packages from source (Obsolete)

Release

FreeSWITCH™ can be built from source as a packages if you desire but it is not recommended as we host the package builds already (see above)

yum install -y https://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel libdb4-devel e2fsprogs-devel erlang flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel libshout-devel libmpg123-devel lame-devel rpm-build libX11-devel libyuv-devel
cd /usr/local/src
git clone -b v1.8 https://github.com/signalwire/freeswitch.git freeswitch

cd /usr/local/src/freeswitch
SWITCH_VERSION=$(cat build/next-release.txt); echo Building $SWITCH_VERSION; scripts/ci/src_tarball.sh; scripts/ci/get_extra_sources.sh; mv ../src_dist .; scripts/ci/rpmbuilder.sh $SWITCH_VERSION; echo Completed Build for FreeSWITCH $SWITCH_VERSION

Master for Testing

WARNING not suitable for production

FreeSWITCH™ can be built from source as a packages if you desire but it is not recommended as we host the package builds already (see above)

yum install -y https://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel libdb4-devel e2fsprogs-devel erlang flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel libshout-devel libmpg123-devel lame-devel rpm-build libX11-devel libyuv-devel

cd /usr/local/src
git clone https://github.com/signalwire/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
SWITCH_VERSION=$(cat build/next-release.txt); echo Building $SWITCH_VERSION; scripts/ci/src_tarball.sh; scripts/ci/get_extra_sources.sh; mv ../src_dist .; scripts/ci/rpmbuilder.sh $SWITCH_VERSION; echo Completed Build for FreeSWITCH $SWITCH_VERSION

Comments:

HiI am looking for the scripts/perl/add_user script but my /usr/share/freeswitch/scripts is empty.i did find / -name add_user -print and its missing from my system my OS is centos-release-7-3.1611.el7.centos.x86_64 I installed usingyum install -y http://files.[freeswitch.org](http://freeswitch.org)/freeswitch-release-1-6.noarch.rpm epel-releaseyum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*systemctl enable freeswitch Posted by Bothwell at Jan 06, 2017 10:58
All source code is available on the FreeSWITCH repository. I searched there for "add_user" and found thishttps://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/scripts/perl/add%5Fuser Hope this helps. Posted by boteman at Jan 07, 2017 00:13
Thanks John, sorted now Posted by Bothwell at Jan 08, 2017 14:48
HiThere is an erro in package: http://files.[freeswitch.org](http://freeswitch.org)/freeswitch-release-1-6.noarch.rpmRepo path contents 7Server, but ral path contents 7serverPlease, correct path in package or on server-side. BTW: This is actual for Redhat Enterprise Linux Server 7.4 Posted by kvishnivetsky at Mar 04, 2018 00:32
As Mr. Vishnivetsky noted nearly 3 months ago, the http://files.[freeswitch.org](http://freeswitch.org/)/freeswitch-release-1-6.noarch.rpm package contains an error with regard to the 7Server/7server portion of the pathname breaks the installation. That seems like a pretty simple fix. Will it be done any time soon?ETA: I see that this issue first surfaced over a year ago: http://lists.freeswitch.org/pipermail/freeswitch-users/2017-March/125216.html Posted by DParker75243 at May 29, 2018 15:17
When compiling master on Centos 7, I had to yum install lksctp-tools-devel package and run ./configure again. Posted by verimor at Jul 13, 2018 04:14
error:/usr/local/src/freeswitch/libs/sofia-sip/libsofia-sip-ua/tporttport_type_sctp.c:206:10: error: variable 'initmsg' has initializer but incomplete typechange struct sctp_initmsg initmsg = { 0 };typedef struct { uint16_t sinit_num_ostreams; uint16_t sinit_max_instreams; uint16_t sinit_max_attempts; uint16_t sinit_max_init_timeo; } sctp_initmsg; #define SCTP_INITMSG 2sctp_initmsg initmsg = { 0 };reference:http://blog.sina.com.cn/s/blog%5F539d6e0c0102zgvm.html Posted by lixiao1016 at Oct 27, 2018 19:56
There is no RPM db-devel in CentOS 7, but there is libdb-devel - C development files for the Berkeley DB library Posted by kvishnivetsky at Oct 29, 2018 17:01
There is no RPM python26-devel, but there are RPMs python-devel (v2.7.5) and python36-develWich should be used instead of python26-devel? Posted by kvishnivetsky at Oct 29, 2018 17:06
--with-erlang option will not be configured, or need to install erlang support (should be added to dependencies) Posted by kvishnivetsky at Oct 29, 2018 17:14
RPM lksctp-tools-devel should be added to dependencied to buiild with --enable -stcp Posted by kvishnivetsky at Oct 29, 2018 17:24