Download & Installation Guide
From FreeSWITCH Wiki
Recommended Download
The FreeSWITCH team strongly recommends the use of the latest Git tree as opposed to the snapshots or other tarballs. The Git tree is extremely stable! Furthermore, in many cases people check out older versions of FreeSWITCH and report bugs that have already been fixed. The developers will insist on any bug reports being tested on an updated install from Git.
Linux/Unix/BSD/MacOSX users can also use the quick and dirty install method, however this is no longer the recommended one. Windows users can follow the instructions below.
NOTICE
To compile success on Windows be sure, dowloading using GIT; set autocrlf to FALSE. Notice: I can't obtaining GIT source using TortoiseGIT on Windows 7 x64, i had to use GIT BASH for windows.
Download Source Tarball
- Nightly Snapshot of Git Source freeswitch-snapshot.tar.gz
- Latest Build Version: latest.freeswitch.org
FreeSWITCH 1.0.6 Official Release
Here is the much awaited FreeSWITCH™ latest release 1.0.6 tarball located below:
Follow the instructions below to be a proud user:
wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz tar xvfz freeswitch-1.0.6.tar.gz cd <freeswitch dir>
Quick and Dirty Install using SVN
This is no longer recommended, install from Git tree instead. Quick and dirty install
Binary Installation or ISO CD-ROM Installation
The FreeSWITCH™ project maintains binary packages for a number of Linux distributions on the openSUSE Build Service. All external dependencies required by these FreeSWITCH™ packages are either part of the base Linux distros or available in the repository at: http://software.opensuse.org/download/network:/telephony/
If your preferred Linux distro and version is listed there, then we recommend you use these packages. If however you wish to build the source yourself, continue reading.
Ubuntu Packages
- Add the following to /etc/apt/sources.list: (e.g. sourcelist for Ubuntu 9.04 - Jaunty Jantelope)
deb http://ppa.launchpad.net/freeswitch-drivers/freeswitch-nightly-drivers/ubuntu jaunty main deb-src http://ppa.launchpad.net/freeswitch-drivers/freeswitch-nightly-drivers/ubuntu jaunty main
- Update apt-get.
apt-get update
- Search for the FreeSWITCH packages in apt.
apt-cache search freeswitch
Choose from the packages listed to complete your FreeSWITCH installation. For more info on installing and adding freeswitch PPA for different versions of Ubuntu FreeSWITCH Drivers in LaunchPad
Obtaining the Source Code
Ensure that you have met the dependencies listed below. Once that is completed, you have two methods to obtain the source code. Via Git or by downloading a tarball. Git provides access to the latest features and bug fixes, while the tarballs are created nightly. There are subversion clients for windows as well as Unix-like systems. This document assumes that you are using a command-line Git client. You will want to save the source somewhere convenient, execute the following from the directory appropriate for your operating system e.g. /usr/src, /usr/local/src or c:\source.
Install Git on your OS as described here.
which will create a subdirectory ./freeswitch/ and populate it with a checkout of trunk.
After the subdirectory is created, install the prerequisites for your OS and then do the following to install FreeSWITCH for the first time:
If you already have a Git based installation and simply wish to update to the latest tree, do the following:
# now, move down into the 'cloned' copy for later git operations cd freeswitch git pull && make current
The '&& make install' are to generate the latest binaries; generally system 'root' rights would be needed for that coupound statement to be effective, but if you create the install directory (typically /usr/local/freeswitch) in advance and make it writable for your normal user account, no part of your FreeSWITCH build process need ever be run as a 'root' user.
If you want to get the source from freeswitch-contrib tree, do as follows:
and this will compile and install updates...
You can download FreeSWITCH 1.0.6 release source in a tarball from either of the following links:
Or in the later compression .bz2 format,
You can download the latest tagged release source in a tar-ball from the following link.
Or you may download other tarballs from marked releases or binary releases from the following link.
If you download the tar-ball you will need to untar it, in Windows you may use a tool like 7-Zip Unix-like systems come with tar pre-installed (and most modern ones with gunzip). If you are in a Unix-like system execute the following:
Note: git reset --hard <commit_id> - will revert all local changes and reset the working copy to the specified commit.
Compiling the Source Code
Windows
- Open Freeswitch.2008.sln (or Freeswitch.2008.express.sln if using VC++ Express Edition)
- Right click the main solution node at the top of the Solution Explorer
- Right click and select Build
Note that building for Windows within a tree that has previously been built for a different platform will result in numerous errors and build failures. To resolve, delete the following generated files:
- libs/apr/include/apr.h
- libs/js/config.h
- libs/js/src/jsautocfg.h
- libs/js/nsprpub/pr/include/prcpucfg.h
- libs/iksemel/include/config.h
- libs/xmlrpc/xmlrpc_config.h
- libs/libsndfile/src/sfconfig.h; also rename libs/win32/libsndfile/config.h to libs/win32/libsndfile/sfconfig.h
- libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_configure.h
Then Rebuild the solution.
Building under VS 2008 may require that you disable "Enable Minimal Rebuild" in the properties pane for FreeSwitchCoreLib project if VS reports an internal compilation error in SimpleGlob.h.
You may also need to "Enable default libraries" in the properties pane for XML Interfaces\mod_xml_rpc if VS complains of numerous unresolved external symbols, e.g., _memset, _strcmp.
After following the instructions above to build for Windows, you will need to delete "libs/js/nsprpub/pr/include/prcpucfg.h" and rerun "./bootstrap.sh" before building for another platform.
Installing FreeSWITCH 1.0.4 on Windows Vista Spanish Version
Unix-like systems (Linux, BSD, OS X)
All commands should be executed from within the main source repository. If you downloaded a tarball you may skip this step, jumping to ./configure
Some Linux distributions (Debian, for example) include both autoconf2.13 and autoconf2.50 along with a script called "autoconf" that automatically selects between the two. The numbers appended to the programs show which flavor of autoconf it provides, but autoconf2.50 can actually be autoconf version 2.61. bootstrap.sh checks for the version of autoconf, but the autoconf script returns version 2.13 by default. If bootstrap.sh fails with a complaint about needing autoconf 2.59 or above and you have installed the prerequisites listed below, try:
By default FreeSWITCH is installed in the /usr/local/freeswitch prefix. To configure:
If you don’t have root access add --prefix=~/freeswitch to the command. NOTE: This is a really bad idea on production systems, not recommended.
For configuring with ODBC support see here.
Not all Debian releases have /usr/bin/gcc. Instead you can find something like /usr/bin/gcc-X.Y so ./configure will fail, if it is missing. To execute without problem ./configure, try:
On such a release. Remember to change X.Y with the correct numbers. It will work like a charm.
On Debian Lenny & Ubuntu Hardy, configure will complain about missing curses library. Even though libcurses5 is installed by default, that package is not usable for development:
Edit modules.conf so that it will build the modules you desire. If you are unsure, leave this to the defaults. FreeSWITCH™ comes with a good set of modules as the default, until you become more familiar with FreeSWITCH™ it is advised that you not edit modules.conf. A # at the beginning will omit that module from being built. A list of the modules can be obtained from the Modules page.
Edit modules.conf to suit your needs then run the following commands:
SUSE 10.3 Note:
Compiling on SUSE 10.3 if you get this error:
libtool: link: `src/jsapi.lo' is not a valid libtool object make[6]: *** [libjs.la] Error 1 make[5]: *** [/usr/src/freeswitch/libs/js/libjs.la] Error 2 make[4]: *** [all] Error 1 make[3]: *** [mod_spidermonkey-all] Error 1 make[2]: *** [all-recursive] Error 1
Try the following procedure:
I don't know why it won't build correctly on SUSE 10.3 the first time around, but bkw suggested that as a workaround mid July 2008 and it seems to work for both the x86 and x86_64 platforms.
Install the sounds with this command:
The above command will install all sounds and music files at all supported sampling rates. This is the recommended procedure. Having all the sampling rates available makes life MUCH easier.
Building deb for Ubuntu Hardy
- Build FreeSWITCH™ into a deb package for Ubuntu Hardy : This page contains how to build a deb package for Ubuntu Hardy and have it hosted on Launchpad.net
FreeBSD
Installing FreeBSD dependencies:
GNUMAKE: The GNU version of make. (will be installed automatically as a dependency to autoconf)
AUTOCONF: Version 2.50 or higher.
GCC: Version 3.95 or higher
GMAKE
WGET: Almost any version
AUTOMAKE:
Version 1.70 or higher
GLIBTOOL:
Version 1.5.14 or higher
LIBNCURSES:
Almost any version
GIT:
Subversion
Get source with wget:
cd /usr/src /usr/local/bin/wget http://files.freeswitch.org/freeswitch-snapshot.tar.gz tar zxvf freeswitch-snapshot.tar.gz cd freeswitch-snapshot
Note: ./bootstrap.sh has already been run for Full and Release Candidate versions.
Or get source with Git
cd /usr/src /usr/local/bin/git clone git://git.freeswitch.org/freeswitch.git freeswitch-upstream cd freeswitch-upstream
Build Process After downloading the source with git or with wget
Edit modules.conf to enable or disable desired modules.
./configure gmake install gmake samples gmake sounds-install gmake moh-install gmake hd-sounds-install gmake hd-moh-install
Make sure you are using gmake and not make, it does not build properly with make at the moment on FreeBSD.
Run FreeSWITCH
Quick note on installations requiring spandsp and failing because of libtiff (On FreeBSD):
1. Install tiff from ports.
2. Bash
Or other shells.
3. Compile spandsp
4. Return to your normal FreeSWITCH build
PS: export will work if using bash. For other shells step 2 might differ. (like setenv LDFLAGS -L/usr/local/lib , setenv CPPFLAGS -I/usr/local/include)
Threading Library
There are some known issues with FreeBSD's libpthread implementation and APR that can affect throughput at high volume. A possible fix is to use libmap.conf to remap FreeSWITCH™ and its libraries to use libthr (the better performance threading library)
/etc/libmap.conf
[freeswitch] libc_r.so.5 libthr.so.2 libc_r.so.6 libthr.so.2 libpthread.so.1 libthr.so.2 libpthread.so.2 libthr.so.2
I (Vagabond) haven't tested that this actually fixes the throughput issues because I don't have an environment where throughput is that high (50cps+ according to anthm). If anyone does test this, please update this page with your experiences. Some additional information on this problem can be found here and here, in addition please read the libmap.conf manpage for your system and be aware of the scheduler change as of 7.1 to ULE by default (this might make things better or worse, I can't find any numbers for the "new" ULE scheduler, only 2006-7 numbers).
Note: If you use 'fs_cli' and experience regular hangs of the client, you may wish to add an identical entry for it.
Note: In FreeBSD 7, libpthread has been removed and libthr is the default implementation.
FreeBSD rc.d script
However the default installation comes with a rc-script, it doesn't meet the requirements of the FreeBSD rc.d framework. I've created (or actually copy/paste 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'
/usr/local/etc/rc.d/freeswitch
#!/bin/sh
#
# 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
name="freeswitch"
rcvar=${name}_enable
load_rc_config $name
: ${freeswitch_enable="NO"}
: ${freeswitch_pidfile="/usr/local/freeswitch/run/freeswitch.pid"}
start_cmd=${name}_start
stop_cmd=${name}_stop
pidfile=${freeswitch_pidfile}
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 startupscript itself, the second one pipes the parameters.
freeswitch_enable="YES" freeswitch_flags="-nonat -nc"
In this example FreeSWITCH gets started with the parameters -nonat (don't do a pnp scan on startup) and -nc (no console). After a reboot you should see something like this in your console:
Starting Freeswitch: 877 Backgrounding
Cross Compiling for ARM on Linux
These instructions were tested on Linux 2.6.18 (Centos 5) Cross compiling Linux 2.6.21 for ARM using gcc 3.4.6
All commands should be executed from within the main source repository.
Create a modules.conf. (this can be done after configure but it is convenient to do it now)
Decide if you want to include cpp code, if you are running on a small embedded system and don't want to install the 2+MBytes libstdc++.so edit Makefile.am in the root of the source repository and remove all references to switch_cpp.cpp and switch_cpp.h, there is one of each. This will also disable all of FreeSWITCH's language modules, edit modules.conf and comment out all the language modules, that is all the lines starting with "language". You can still write C applications with the cpp disabled.
I was not able to get javascript working so you should comment out languages/mod_spidermonkey* from modules.conf and comment out the line "AC_CONFIG_SUBDIRS(libs/js)" in the file configure.in. If you figure out a way to get it working update this page, I wasn't motivated as I did not intend to use it.
If you want to reduce the build time you can comment out other support libraries from configure.in, I only used and tested the following, it saves a lot of build time and I don't know if the other libraries will build:
- libs/srtp
- libs/sqlite
- libs/libedit
- libs/pcre
- libs/apr
- libs/apr-util
- libs/codec/ilbc
- libs/sofia-sip
- libs/libsndfile
- libs/voipcodecs
I already had a version of curl cross compiled so I did not use the version that comes with FreeSWITCH.
Run this command next, it will create all the configure scripts
Some Linux distributions (Debian, for example) include both autoconf2.13 and autoconf2.50 along with a script called "autoconf" that automatically selects between the two. The numbers appended to the programs show which flavor of autoconf it provides, but autoconf2.50 can actually be autoconf version 2.61. bootstrap.sh checks for the version of autoconf, but the autoconf script returns version 2.13 by default. If bootstrap.sh fails with a complaint about needing autoconf 2.59 or above and you have installed the prerequisites listed below, try:
Several of the packages cannot detect capabilities of the Cross Compile environment correctly so configure needs to be called with many options to get it to work correctly. Check that the options I have match your Cross Compile environment.
Prior to running this the following environment variables must be set:
TARGET_CC - the cross compiler
HOSTCC - the host compiler
CFLAGS - CFLAGS for the cross compiler
CPPFLAGS - CPPFLAGS for the cross compiler
LDFLAGS - LDFLAGS for the cross compiler
These environment variables also need to be set to point to the appropriate tool in the cross compiler's toolchain
CC, CXX, AR, LD, GCC, AS, NM, RANLIB, STRIP, SIZE, OBJCOPY & OBJDUMP. Not sure if they are all used, but this is what worked for me.
You will need to adjust some setting to fit your environment, set the "path" in ac_cv_path__libcurl_config and --with-curl, or remove them if you use the version that comes with FreeSWITCH. Set --with-modinstdir to point to where the FreeSWITCH modules will be on the target filesystem.
export config_TARGET_CC="$(TARGET_CC)"; \
export config_BUILD_CC="$(HOSTCC)"; \
export config_TARGET_CFLAGS="$(CFLAGS)"; \
export config_TARGET_LIBS="$(LDFLAGS)"; \
export CC_FOR_BUILD="$(HOSTCC)"; \
export CFLAGS_FOR_BUILD=" "; \
export ac_cv_file__dev_zero=no; \
export apr_cv_tcp_nodelay_with_cork=yes; \
export ac_cv_sizeof_ssize_t=4; \
export ac_cv_file_dbd_apr_dbd_mysql_c=yes; \
export ac_cv_path__libcurl_config=/path/curl-config; \
export apr_cv_mutex_recursive=yes; \
export ac_cv_func_pthread_rwlock_init=yes; \
export apr_cv_type_rwlock_t=yes; \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--with-libcurl=/path/install \
--with-devrandom=/dev/urandom \
--with-modinstdir=/mod \
If you have not done so edit modules.conf so that it will build the modules you desire. If you are unsure, leave this to the defaults. FreeSWITCH™ comes with a good set of modules as the default, until you become more familiar with FreeSWITCH™ it is advised that you not edit modules.conf. A # at the beginning will omit that module from being built. A list of the modules can be obtained from the Modules page.
Once you are done configuring the build environment you need to run the following command. (Your PATH must point to the cross compiler toolchain)
I found little use for make install as I didn't want the Cross Compiled version installed on the build system.
You will need to copy the freeswitch binary, library and modules directly out of the build tree into where ever you need them.
Cross Compiling for OpenWrt
http://wiki.freeswitch.org/wiki/OpenWrt
Compile Errors?
Did you get any compile errors or notice any bugs? Remember FreeSWITCH is still in development and requires contribution from everybody. If you encounter a bug please file a bug report at http://jira.freeswitch.org or email freeswitch-dev@lists.freeswitch.org (we prefer that you use Jira so that we can track all issues). Sometimes bugs are fixed by the time you notice them, if you do encounter a bug you may wish to get a more recent version of the source code and rebuild.
Rebuilding
After doing a "git pull" or changing some source files, you may want to clean out your build area. To ensure that your build is clean, you should execute:
Alternatively, you can simply execute "make current" which will handle the git pull, clean up, and rebuild in one step:
NOTE: make current will take a while as it completely cleans the build environment and rebuilds FreeSWITCH! But, it will not overwrite the files in the "conf" directory in the installed folder, if there is one.
Also, the clean targets leave the "modules.conf" file. To see if there are any new modules you may want to execute
Once you are satisfied with your options, follow the build directions above. If you have enabled a module that was not previously enabled, and you want to build just that module, or rebuild one that has changed, you may execute the following:
Where mod_name is the name of the module you wish to rebuild.
That doing a "make install" will not overwrite any existing files in $(PREFIX)/conf if there already exists a $(PREFIX)/conf/freeswitch.xml file.
Prerequisites
In order to build FreeSWITCH™ from the source code, you will need to have several tools installed. The list varies from platform to platform, and are listed here. Some distributions come with these requirements while others require you to obtain them.
Mac OS X
The recommended OS X version is 10.4 or later. You will need to install the Apple XCode development software (which requires registration, but is free). This should be performed first.
Unix-like systems
- GIT: a Git client gives you access to the current code repository. Alternatively you may select to get a nightly tarball of the source instead of using Git.
- GNUMAKE: The GNU version of make.
- AUTOCONF: Version 2.50 or higher
- AUTOMAKE: Version 1.70 or higher
- GLIBTOOL: Version 1.5.14 or higher
- GCC: Version 3.95 or higher
- WGET: Almost any version
- LIBNCURSES: Almost any version
- LIBZRTP: (Optional) *Note: For building with ZRTP encryption, see the page for building FreeSWITCH with ZRTP
RHEL/CentOS
Red Hat Enterprise Linux and its community driven equivalent CentOS both use yum as a package manager; the following installs the required prerequisites on a base install of RHEL/CentOS 5.0, 5.1, 5.2, 5.3 and 5.4
yum install autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel libjpeg-devel
You may also wish to install the following packages which allow you to enable additional FreeSWITCH modules:
For mod_spandsp you need to install libtiff and libjpeg development files.
pfSense package with GUI
pfSense FreeSWITCH package is available for pfSense 1.2.3. The package includes a GUI for FreeSWITCH's configuration. The naming convention for the GUI has been designed to closely match the XML tag names and file names used in the default XML configuration as closely as possible. Install pfSense 1.2.3 based on FreeBSD7, Then go to System -> Packages and click the '+' add button on the right to install FreeSWITCH from the packages list. The package is around 50mb because it includes 8khz sounds and music on hold. After the installation FreeSWITCH will automatically start. By default it will bind to the WAN IP.
To download pfSense 1.2.3 go to: http://www.pfsense.com/
Screenshots here: http://portableusbapps.com/images/FreeSWITCH/
The pfSense FreeSWITCH package is being used on many live systems on dedicated hardware and some virtual machines.
If you already have a firewall in place and just want to use this package as an easy FreeSWITCH install you can simply use it as a dedicated device and if desired turn off the firewall in pfSense by going to System -> Advanced -> Disable Firewall then put a check mark in 'Disable all packet filtering.'
Ubuntu Intrepid 8.10
If you receive a segmentation fault on FreeSWITCH startup, you are likely affected by this issue: FreeSwitch_FAQ#Q:_Ubuntu_64bit_.28gutsy.2Fintrepid.29_segmentation_fault_on_start
Debian Linux
Debian uses the aptitude a.k.a. “apt” package manager. This allows you to quickly and easily install the prerequisites.
apt-get install build-essential subversion subversion-tools automake1.9 gcc-4.1 autoconf make wget \
libtool g++ libncurses5 libncurses5-dev libgdbm-dev libdb-dev libperl-dev zlib1g-dev
For mod_spandsp you need to install libtiff and libjpeg development files - unless you explicitly disable it, mod_spandsp is now installed by default.
For Python integration, the following will work. Ensure you update /usr/bin/python to point at /usr/bin/python2.5 afterwards and configure will find a working Python library.
For TLS to work (needed to use Dingaling with gmail.com), also GNUTLS is necessary.
For mod_skypopen (skype interconnect) to work you have to have X11 development files
The source tree includes a debian/ directory, so you can build a package using standard debian tools. First, do the git clone into a directory named after the version in the debian/changelog (i.e. freeswitch-1.0~beta3) or move it there immediately after the git clone. Then you still need to start with the ./bootstrap.sh step, and once done you SHOULD NOT move the directory, as explicit paths will have been inserted into some of the Makefiles (don't run bootstrap.sh if you are going to use the debuild tool since its not needed, it will do it for you).
One of the several ways of then building the package is:
- ensure that you have the devscripts package installed.
- Then (optionally) change the package version to something that includes the date you're building. This can be done by running dch -i and setting the version to something like: 1.0~beta3-0~git20100330.
- Perhaps (if you know what you're doing) edit the modules to build that are set near the start of debian/rules
- then just run debuild -i -us -uc -b (which might tell you that there are some build dependencies missing, in which case, just install them and try again)
After that, you should have a several .deb files in the directory above the source directory which can be installed with dpkg -i packagename.deb
Experience compiling FreeSWITCH 1.0.1
NOTE: 1.0.1 is ancient. This information here for reference only. Another way is to first install the "build-essential" package:
Then run "dpkg-buildpackage" to build all the required .deb files:
(Start dpkg-buildpackage in the freeswitch source directory.) dpkg-buildpackage will complain about missing dependencies, use the list of missing packages as indicated above; for example:
aptitude install debhelper automake1.9 autoconf libtool unixodbc-dev libasound2-dev libcurl4-openssl-dev libssl-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev libgnutls-dev
and restart "dpkg-buildpackage" to finish building the Debian packages.
Recommend packages are freeswitch_1.0.1-1_i386.deb and freeswitch-lang-de_1.0.1-1_i386.deb, the packages freeswitch-spidermonkey, freeswitch-lua, freeswitch-perl, freeswitch-sounds-music-8000 and monit are suggested by the base freeswitch package. The package monit have to be installed from the standard repository.
dpkg -i freeswitch_1.0.1-1_i386.deb freeswitch-lang-en_1.0.1-1_i386.deb freeswitch-spidermonkey_1.0.1-1_i386.deb freeswitch-lua_1.0.1-1_i386.deb freeswitch-perl_1.0.1-1_i386.deb freeswitch-sounds-music-8000_1.0.1-1_i386.deb
Installing monit with aptitude:
Monit is used to monitor the fs process and restart it if it dies, but it won't start unless it is configured. First you have to activate it in "/etc/default/monit" with setting the value startup to 1. The second step is to uncomment "set daemon 120" in /etc/monit/monitrc and add "include /etc/monit/freeswitch.monitrc" in the end of the file. After all you should be able to start monit with the provided init-script.
Note: Once you install the packages (using "dpkg -i freeswitch_1.0.1-1_i386.deb", etc.), the installation is non-standard since freeswitch will end up in /opt/freeswitch. The configuration files will be in /opt/freeswitch/conf.
For a Novice, Another Debian Way 1.0.2
I also found this guy's instructions rather very simple for a novice courtsey of http://madhawa.com/?p=10
Fedora
Fedora also uses yum as a package manager; the following installs the required prerequisites on a base install of Fedora 8 and 9.
Note: if you are building mod_xml_curl, be aware that the latest Fedora releases have a broken libcurl shipped with yum and you will end up with an unloadable mod_xml_curl module due to missing symbols. You will probably need to configure FreeSWITCH using the --without-libcurl switch, this will make the build process to download and compile its own libcurl version, and then link the mod_xml_curl module with that. This has been confirmed to be the case (as of 20090403) in Fedora 9 and Fedora 10.
Arch Linux
Arch Linux uses a unique package manager called pacman; it also has a ports-like build system called Arch Build System; The packages for FreeSWITCH (and the zaptel dependency for mod_openzap) are available at the AUR repository:
To build these packages follow the instructions of the Makepkg build system.
Gentoo Linux
The FreeSWITCH ebuilds are maintained by stkn in the freeswitch-overlay at oss.axsentis.de.
Installation instructions: Installation:Gentoo
Solaris
Solaris use the jds-cbe environment or fix path to working tr (as per FSBUILD-30).
- Use Sun Studio 12
- Install SFE (Spec Files Extra)
- Add SFEunixODBC to your Solaris installation
OpenSolaris Nevada
This is the distribution from the opensolaris.org guys, do not mix that up with os200805 which is the new OpenSolaris based distro from SUN.
- Select your development user. I will assume for the time being that the user is called freeswitch.
- Create the target directory for freeswitch
- Give your build and development user software installation rights
- Log out and log back in as the freeswitch user (so that the new permissions become active)
- Download and unpack the new jds-cbe beta package:
/usr/sfw/bin/wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-x86.tar.bz2 gtar xvfz desktop-cbe-1.7.0-rc1-x86.tar.bz2"
- Install JDS-CBE
- Leave everything as default. Select the SunStudio compiler as your default compiler.
- Download the spec-files-extra repository into a subdirectory called SFE
- Load the jds-cbe environment.
- Compile and install SFEunixodbc.
- Download the freeswitch tree.
- Prepare the freeswitch sources.
- And edit the modules.conf file to select which modules you would like to have installed.
- Configure freeswitch sources for 64bit.
CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 ./configure --prefix=/opt/freeswitch --enable-core-odbc-support \ --enable-core-libedit-support --enable-64 --with-openssl=/usr/sfw
- Or for 32bit.
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/freeswitch --enable-core-odbc-support \ --enable-core-libedit-support --with-openssl=/usr/sfw
- Drink a cup of coffee.
- Run make :).
- Install freeswitch into its target directory.
You are done :).
OpenSolaris os200906
- Edit /etc/system and add the following line, to increase the maximum permissible number of file descriptors per user
One million FDs ought to be enough for anyone.
- If doing a Git checkout of FreeSWITCH, it is recommended to create a dedicated ZFS filesystem to hold the git checkout, so that ZFS snapshots can be used on that directory. Create the freeswitch user's home directory first, then create the ZFS filesystem for it.
- Create the freeswitch user
- Note: OpenSolaris will complain that the username freeswitch is too long, however it does work. Some POSIX utils may truncate the username to freeswit (8 chars)
- Create the target directory for FreeSWITCH, and set the ownership on that directory, as well as the freeswitch user's home directory
root@sol:~# mkdir /opt/freeswitch; chown freeswitch /opt/freeswitch; chown freeswitch:staff /export/home/freeswitch
- Give the freeswitch user software installation rights
- You can add ulimit -n 262144 to the freeswitch user's .profile to automatically set a suitable limit
- Log in as the freeswitch user and download/unpack the new jds-cbe beta package
freeswitch@sol:~$ wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-x86.tar.bz2
- Install the following packages if they are not already
freeswitch@sol:~$ pfexec pkg install SUNWhea SUNWsfwhea SUNWxcu4 SUNWsprot SUNWxwinc SUNWxorg-headers ss-dev SUNWgnu-automake-110 SUNWscp
- Run the CBE installer
freeswitch@sol:~$ cd desktop-cbe-1.7.0-rc1 freeswitch@sol:~/desktop-cbe-1.7.0-rc1$ ./cbe-install Desktop Common Build Environment (CBE) Installer version 1.7.0-rc1 Using "pkg" packaging system Checking for required packages... All required packages are installed. Starting from pkgbuild 1.1.0 (CBE 1.5) there is no system-wide build directory (%_topdir), instead, each user has their own. The default directory is $HOME/packages. If you wish to use a different build directory, you can define it in $HOME/.pkgbuildmacros as follows: %_topdir /path/to/my/build/area Would you like to do this now? [no]: no The default topdir (/export/home/freeswitch/packages) will be used Locating compilers...
The following compilers were found on your system: 1 - Sun Studio Express 5.10 (Ceres) in /opt/SunStudioExpress/bin Would you like to configure more compilers for use with the Desktop CBE? [no]: no The following compilers were found on your system: 1 - Sun Studio Express 5.10 (Ceres) in /opt/SunStudioExpress/bin The Desktop CBE includes tools for building GNOME, KDE and/or SFE packages It also includes some optional tools. Please select the tools you wish to install. Would you like install the tools for GNOME? [yes]: no Would you like install the tools for KDE? [yes]: no Would you like install the tools for SFE? [yes]: yes The following tools are optional: rsync cvs Would you like install the optional tools? [yes]: no
- As root, create a new ZFS filesystem for the FreeSWITCH git checkout
- As freeswitch, check out a copy of FreeSWITCH
- Optionally snapshot the fs filesystem (as root). Rolling back to a previous ZFS snapshot is preferable to a make clean
- As freeswitch, load the jds-cbe environment and bootstrap the source
freeswitch@sol:~$ cd fs/
freeswitch@sol:~/fs$ . /opt/dtbld/bin/env.sh freeswitch@sol:~/fs$ ./bootstrap.sh
- Configure
freeswitch@sol:~/fs$ CFLAGS="-g -m64 -I/usr/sfw/include -L/usr/sfw/lib -I/usr/gnu/include -L/usr/gnu/lib" \ CXXFLAGS="-g -m64 -I/usr/sfw/include -L/usr/sfw/lib -I/usr/gnu/include -L/usr/gnu/lib" \ LDFLAGS="-m64 -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/gnu/lib -R/usr/gnu/lib /usr/lib/64/0@0.so.1" \ ./configure --prefix=/opt/freeswitch --enable-64 --with-openssl=/usr/sfw
- Make a cup of coffee
- Build FreeSWITCH
- Make another cup of coffee
- Install FreeSWITCH
Sound Prompts / Music on Hold
Optionally install music on hold and sound prompts:
Alternative Make targets for high quality sounds:
- hd-sounds-install hd-moh-install (16 kHz)
- uhd-sounds-install uhd-moh-install (32 kHz)
- cd-sounds-install cd-moh-install (48 kHz)
Windows
Precompiled Binaries
For those that do not want to compile, I've put together an installer for Windows for version 1.0.4 and an up to date git build. The git version includes Windows 32 and 64 bit builds with the option of installing FreePBX or FusionPBX. Note: you can download either one for a GUI-less install as well. Please check this link for the latest build http://files.freeswitch.org/windows_installer/
The Git build includes the standard modules and libraries. In addition:
FreePBX w/ WAMP preconfigured. Updates to FreePBX can be applied using TortoiseSVN as the .svn folders are included.
FusionPBX w/ WAMP preconfigured.
João Mesquita's QT based FreeSWITCH console
php ESL as required by the FreePBX voicemail and ESL tab
Support for SIP TLS and SRTP
(- WHY was this put here?! SRTP should work out of box anyway. TLS does not work. Please edit / remove this, unless TLS will work out of box.)
mod_skypopen
mod_spandsp
mod_shout
The ability to download and install the various sound files.
See below for an example screenshot of the installer in action:

In the Windows folder you will also find a seperate installer for fsgui if you want to run it on a system other than your FreeSWITCH server.
Windows quick start
It would probably help to know some basic console commands! Once you launch the FreeSWITCH exe you will be placed in the console. From here:
"help" displays all available console commands.
"sofia status" will display all sip profiles, gateways and their status.
You can drill down and say "sofia status profile internal" to list the internal profile and all registered internal endpoints.
"show channels" will display all active sessions.
"status" gives you uptime information.
"version" will display version information.
"shutdown" will bring down the switch. You cannot exit from the initial console that starts the switch without shutting it down. There is a separate executable which will allow you to remotely connect to the switch: http://wiki.freeswitch.org/wiki/Fs_cli
"load <module>" and "unload <module" work similar to the Asterisk equivalent.
"reloadxml" is useful when editing your dialplan and can't afford to restart the server. Just be aware of some restrictions: http://wiki.freeswitch.org/wiki/FreeSwitch_FAQ#Q:_Does_reloadxml_reload_all_XML_files.3F
All of the console commands are covered on this wiki page: http://wiki.freeswitch.org/wiki/Mod_commands#Core_Commands
Finally, the Getting Started wiki page has some useful extensions to try out http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Some_stuff_to_try_out.21 The default configuration includes 20 endpoint definitions in prefix\conf\directory\default (1000-1019).xml. More information on endpoints: http://wiki.freeswitch.org/wiki/Getting_Started_Guide#User_Configuration
See here to configure a trunk (gateway) - http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Sample_Gateway_Configuration
And to dial out via your newly created gateway - http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Dialing_out_via_Gateway
Finally, receiving inbound calls from your gateway - http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Receiving_an_inbound_call_from_a_Gateway
Voicemail via email
A recent git release of FreeSWITCH includes sending voicemail via SMTP from Windows (this was not possible before). See this page for more information: http://wiki.freeswitch.org/wiki/Windows_email
Building from source
To compile FreeSWITCH on Windows, you will need Visual C++ 2005 and if you are installing the Express Edition, the platform SDK (see these instructions for more details). [1]
NOTE: The Visual C++ 2005 Express Edition is no longer supported. Please upgrade to VC++ 2008 Express Edition.
NOTE: There is now a solution file specifically for VC++ 2008 Express. If you open the wrong solution file you will need to click "OK" about 65 times to get through the "solution folders not supported" messages.
Insert non-formatted text here.
Graphical User Interfaces
see: Freeswitch Gui

