Raspberry PI-specific documentation

From FreeSWITCH Wiki
Jump to: navigation, search

This is an initial page to explain how to make the installation process on Raspberry PI easier. The documentation here is not finished.



The Raspberry PI usually runs Linux, but it has another processor architecture because of which the normal Linux / debian packages won't work. On this page the installation is described for Raspberry PI.

Boris Manojlovic (BManojlovic on IRC and GitHub) provides precompiled binary deb packages for the Raspberry PI and also he provides scripts to set up a cross-compiling environment to build them yourself.

Installation from packages

The freeswitch installation from deb packages is similar to the usual debian installation, but another repository is needed.

The packages are built for Raspbian (wheezy), but they also work for distributions that are derived from Raspbian (wheezy) like XBian.

  • Add the FreeSWITCH Raspbian APT repository: (for Debian Wheezy)
echo 'deb http://naizvoru.com/raspbian/freeswitch/ wheezy main' >> /etc/apt/sources.list.d/freeswitch.list
  • Import the repo signing key
 curl http://naizvoru.com/raspbian/freeswitch/conf/boris@steki.net.gpg.key | apt-key add -
  • Update apt-get.
apt-get update
  • Search for the FreeSWITCH™ packages in apt. Choose from the packages listed to complete your FreeSWITCH™ installation.
apt-cache search freeswitch

There's also a meta package to get a reasonably running installation.

apt-get install freeswitch-meta-vanilla
  • Install example configuration files
apt-get install freeswitch-conf-vanilla

The packages do not set up the configuration in /etc/freeswitch, and you need to copy files manually:

cp -a /usr/share/freeswitch/conf/vanilla /etc/freeswitch

Building packages yourself (Documentation in Progress)

While it is not impossible to compile Freeswitch directly on the Raspberry itself, it will save you a lot of time if you can compile it on a faster computer. Doing this is called cross-compiling.

Boris provides some scripts from his github to set up a cross-compile environment. These scripts are made for OpenSUSE but might work on Debian-derived distributions.

  • Create a working directory in your normal linux distribution
mkdir freeswitch_cross_compile && cd freeswitch_cross_compile
  • Download the scripts into it
git clone git://github.com/bmanojlovic/rpi-cross-compile.git
cd rpi-cross-compile
  • Set up the cross-compile environment

Inside this environment you can follow the normal way of building packages - see Debian packages buildscript. Note that Raspbian doesn't support

lsb_release -cs

(it returns 'n/a' instead of 'wheezy') and that is why you should modify the script.

DISTRO=`lsb_release -cs`



Another note is that mod_java might not work, which will get package building to fail, at least with Freeswitch 1.4. If that's the case look in the freeswitch/debian/bootstrap.sh script for


And change this in


Installation from GIT (Raspbian)

Compiling Freeswitch from scratch takes a couple of hours. So you may want to do it over night. The below installation may be a bit outdated (March 2013) but it worked at that time with the minimum modules needed to work as a SBC and to register phones.

  • Install the basic modules
apt-get install autoconf automake devscripts gawk g++ git-core libjpeg62-dev libncurses5-dev libtool make python-dev gawk pkg-config libperl-dev libgdbm-dev libdb-dev gettext sudo libsqlite3-dev
  • Download freeswitch from git
git clone git://git.freeswitch.org/freeswitch.git
  • Prepare to compile
  • until here it already took 2-3 hours in our case
  • Strip down modules.conf for the miminum of needed modules.
  • Finally compile
make && make install 
  • This step will take another couple of hours (I remeber around 10h). You could do this overnight.
  • Be prepared, that depending on the Freeswitch modules you whish to compile, there can be missing dependencies on libraries (mostly xxx-dev.deb), which will be needed to install before successfully running ./configure and make. So the overall tunrnaround time until final success can be time consuming.
  • I would advise to start with a minimum set of modules. When Freeswitch runs then with the basic set of modules, you can then install the remaining modules (and e.g. dependencies) by editing modules.conf and then doing "make && make install" again.