Call Us Today! 877.742.2583

Page tree
Skip to end of metadata
Go to start of metadata


These docs are BARE minimum to allow Freeswitch to compile. It will use the default compiler on your platform unless you override it with CC and CXX variables prior to configure. None of the extra hoops need to be jumped through any longer. It should just WORK out of the box and we can address any specific issues as they come up. Anyone wishing to help improve this updated documentation please email or contact bkw_ on IRC,

Maintainer Needed

We need YOU to maintain this port of FreeSWITCH. Please contact one of the FreeSWITCH core developers on Freenode IRC channel #freeswitch or the mailing list to help them keep the code current for this operating system.

Build Environment

This is part of the Installation documentation which you should review first. It provides notes unique to FreeBSD 10.2. If you're on FreeBSD it will default to using clang. If you want to force it, export CC=`which clang` and export CXX=`which clang++` or if you prefer, use gcc and g++. The following will build the default modules.conf, and additional modules you wish to enable may require more dependencies.

FreeSWITCH Master
pkg install autoconf automake curl git gmake jpeg ldns libedit libtool openssl pcre pkgconf speex sqlite3 wget sudo libsndfile lua52 opus
mkdir ~/src
cd ~/src
git clone

cd freeswitch
./ -j
sudo gmake install cd-sounds-install cd-moh-install
FreeSWITCH 1.6
pkg install autoconf automake curl git gmake jpeg ldns libedit libtool openssl pcre pkgconf speex sqlite3 wget sudo
mkdir ~/src
cd ~/src
git clone -b v1.6

cd freeswitch
./ -j
sudo gmake install cd-sounds-install cd-moh-install

FreeBSD rc.d script

The default installation comes with an rc-script but it doesn't meet the requirements of the FreeBSD rc.d framework. I've created (or actually copy/pasted it from Postfix) a script that does meets the rc.d requirements. Create the example below in /usr/local/etc/rc.d and give it the name 'freeswitch'


# PROVIDE: freeswitch
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable freeswitch:
# freeswitch_enable:       Set it to "YES" to enable freeswitch.
#                          Default is "NO".
# freeswitch_flags:        Flags passed to freeswitch-script on startup.
#                          Default is "".
. /etc/rc.subr
load_rc_config $name
: ${freeswitch_enable="NO"}
: ${freeswitch_pidfile="/usr/local/freeswitch/run/"}
freeswitch_start() {
        /usr/local/freeswitch/bin/freeswitch ${freeswitch_flags}
		echo -n "Starting FreeSWITCH: "
freeswitch_stop() {
        /usr/local/freeswitch/bin/freeswitch -stop
run_rc_command "$1"

After creating the file it's time to change the permissions, otherwise it can't be executed. Go to /usr/local/etc/rc.d and issue the following command

chmod u-w,ugo+x freeswitch

Now it's time for calling the script from /etc/rc.conf. Put the two line below in the rc.conf file. The first one executes the startup script itself, the second one pipes the parameters.


In this example FreeSWITCH™ gets started with the parameters -nc (no console, you can access the console later using fs_cli).  If your Freeswitch server has a IP address and not behind a NAT router, add the "-nonat" parameter (This will disable NAT traversal feature of FreeSWITCH).  After a reboot you should see something like this in your console:

10381 Backgrounding.




  1. I know these instructions are deprecated, but it would be nice to get this built on freebsd. I am getting the following error when compiling.


    src/switch_core_video.c:545:20: error: unused function 'switch_img_get_yuv_pixel' [-Werror,-Wunused-function]

    static inline void switch_img_get_yuv_pixel(switch_image_t *img, switch_yuv_color_t *yuv, int x, int y)


    src/switch_core_video.c:702:20: error: unused function 'switch_color_rgb2yuv' [-Werror,-Wunused-function]

    static inline void switch_color_rgb2yuv(switch_rgb_color_t *rgb, switch_yuv_color_t *yuv)


    src/switch_core_video.c:713:20: error: unused function 'switch_color_yuv2rgb' [-Werror,-Wunused-function]

    static inline void switch_color_yuv2rgb(switch_yuv_color_t *yuv, switch_rgb_color_t *rgb)


    3 errors generated.

    Makefile:1901: recipe for target 'src/libfreeswitch_la-switch_core_video.lo' failed

    gmake[1]: *** [src/libfreeswitch_la-switch_core_video.lo] Error 1

    gmake[1]: Leaving directory '/root/src/freeswitch'

    Makefile:1067: recipe for target 'all' failed

    gmake: *** [all] Error 2



  2. Hi Nicholas Schoonover!

    I just built freeSWITCH from master on a digital ocean droplet and it built and installed correctly:

    FreeSWITCH Version 1.7.0+git~20160318T233049Z~4d180b1aa1~64bit (git 4d180b1 2016-03-18 23:30:49Z 64bit)

    1. If you have updates, by all means please update this page with your findings. I checked and you are in the the Confluence editors group.


  3. FreeSWITCH Version 1.8.2+git~20180926T175525Z~a98a958ac3~64bit (git a98a958 2018-09-26 17:55:25Z 64bit)

    built cleanly 11-3-18 on FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018

    Thanks to Brian West, Michael Jerris, Ken Rice and Anthony Minessale II for all you do and

    for making it run on FreeBSD.