In this post I provide you a Walk-through for compiling and installing FreeSWITCH. I'm using Ubuntu 14.4.3. LTS 64bit, but the provided instructions should work on a current Debian too.
To build FreeSWITCH 1.6.5, we need to install a couple of packages:
sudo apt-get install build-essential git autoconf libtool pkg-config zlib1g-dev \ libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libspeexdsp-dev \ libldns-dev libedit-dev liblua5.1-0-dev liblua50-dev libopus-dev \ libsndfile1-dev libncurses5-dev
I recommend creating a separate directory for the build process to take place in, for example /home/user/build
Next step is to get the FreeSWITCH sources:
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
After having downloaded the sources, we need to checkout the right version (1.6.5)
git checkout v1.6.5
Now, we can bootstrap and configure:
Next step is configuring, what applications, modules, codecs, etc. we want to get built. For this, we need to edit modules.conf
I was unable to get a successful build with
enabled, so I commented these lines.
Now, we can go ahead and continue with
sudo make install
If you run in troubles, it is propably because of missing libraries. In case it affects modules, you can decide to not compile it by commenting the related line in modules.conf
If you fixed the issue, it might be more safe to do make clean && make instead of just make. I'm not an expert in compiling stuff, but it looks to me that things were cached during the process, which may cause "missing-something" errors, even when the cause is already fixed.
You also might want to build the CLI client:
cd lib/esl make
Finally you can move the fs_cli binary to /usr/bin. If your FreeSWITCH is running, you can connect to it with fs_cli -H 127.0.0.1
Init script and security consideration
It would be nice to have a init script for starting anf stopping FreeSWITCH.
Luckily, you can find one here: https://wiki.freeswitch.org/wiki/Freeswitch_init
Also create dedicated user and group for FreeSWITCH as instructed. First reason to do so is "security", second, the provided init script won't run otherweise ;-)
Further information can be found here: https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video
Next posts will cover configuring FreeSWITCH.
If the information I provided was helpful to you, I would really appreciate if you have a look on my Amazon whishlist.
I'm not begging for anything and I will continue to share my knowledge but of course I would be really happy to see some packages arriving ;-)