$ sudo apt-get install \
autoconf automake devscripts gawk g++ git-core \
libjpeg-dev libncurses5-dev libtool make python-dev \
gawk pkg-config libtiff4-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
$ cd ${HOME}
$ mkdir src
$ cd src
# To build from the current release source code:
$ git clone -b v1.4 https://stash. freeswitch.org/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
$ vim.tiny modules.conf
$ ./configure \
--prefix=/opt/ freeswitch_v1.4 \
--enable-core-pgsql-support
$ make
# hide the .spec files
$ mkdir ../freesqitch-hide && mv *.spec ../freesqitch-hide/
$ sudo checkinstall \
--pkgname=" freeswitch-mdsh" \
--pkgversion="1:$(date +%Y%m%d%H%M)-1.4" \
--backup=no \
--fstrans=no \
--nodoc \
--default \
sh -c "make install \
&& chown -R freeswitch:daemon /opt/ freeswitch_v1.4/ \
&& chmod -R ug=rwX,o= /opt/ freeswitch_v1.4/ \
&& chmod -R u=rwx,g=rx /opt/ freeswitch_v1.4/*"
# disable built-in FreeSwitch
$ sudo update-rc.d freeswitch disable
# enable our version
$ sudo update-rc.d freeswitch-mdsh defaults
${ FREESWITCH_INSTALL}/conf