Skip to content

Instantly share code, notes, and snippets.

@cruzer45
Last active February 4, 2021 12:28
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save cruzer45/eb52df598847763d65f6 to your computer and use it in GitHub Desktop.
Save cruzer45/eb52df598847763d65f6 to your computer and use it in GitHub Desktop.
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
sudo apt-get install -y yasm nasm libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev yasm nasm unixodbc-dev unixodbc-bin unixodbc odbc-postgresql
#create the source folder
mkdir ~/sources && mkdir ~/switch && cd ~/sources
#get the code
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
cd freeswitch
# The -j argument spawns multiple threads to speed the build process
./bootstrap.sh -j
# if you want to add or remove modules from the build, edit modules.conf
# add a module by removing '#' comment character at the beginning of the line
# remove a module by adding the '#' comment character at the beginning of the line containing the name of the module to be skipped
nano modules.conf
./configure --enable-core-pgsql-support --enable-core-odbc-support --prefix="~/switch/" --with-java=/usr/lib/jvm/java-7-oracle/include/
make && make install
make cd-sounds-install cd-moh-install
@dmehrotra
Copy link

dmehrotra commented Jul 1, 2016

Hey, thanks for documenting this. One revision would be that on line 28, the script expects an absolute path for the /switch prefix. ie: ./configure --enable-core-pgsql-support --prefix="/root/switch/" --with-java=/usr/lib/jvm/java-7-oracle/include/

_EDIT_*
I also needed to install yasm and nasm

@dcardia
Copy link

dcardia commented Jan 30, 2018

Thank you for this procedure. I just want to let you know that I needed to install libtool and autoconf as prerequisites of bootstrap.sh

@cruzer45
Copy link
Author

cruzer45 commented Feb 7, 2018

You are very welcome @danilocardia

@PrateekGoyal18
Copy link

PrateekGoyal18 commented Feb 4, 2021

I am facing this problem while trying to install Freeswitch in a container having ubuntu 20.04 as the base image.

[12/13] RUN curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add -:
#16 0.246 /bin/sh: 1: sudo: not found
#16 0.322 % Total % Received % Xferd Average Speed Time Time Time Current
#16 0.322 Dload Upload Total Spent Left Speed
100 1370 100 1370 0 0 2171 0 --:--:-- --:--:-- --:--:-- 2167
#16 0.953 (23) Failed writing body
executor failed running [/bin/sh -c curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add -]: exit code: 127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment