Installation for Windows
Simple Installation (Precompiled Binaries)
Download Freeswitch for Windows here: Download Freeswitch Installer
The binary MSI installer is built from Weekly Git head automated builds.
These builds are uploaded every weekend and include default modules and 8khz sounds and are available for both x86 and x64.
This is intended to distribute the FreeSWITCH Core in an easy to install and run configuration.
Custom FreePBX and Fusion PBX Installers
For those that do not want to compile there are several options available:
Builds that are packaged with FreePBX and FusionPBX or standalone - these are older.
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/
Install from Source
Before proceeding you should decide what directories to load FreeSWITCH into. The source and binaries can go into separate directories. For instance, c:\source and c:\freeswitch.
Git Clients for Windows
Once Git is installed, the FreeSWITCH source can be downloaded from the Git Bash command line, for instance:
git clone -v git://git.freeswitch.org/freeswitch.git C:/FS_GIT/
- Verify the core.autocrlf values type on git config --get-all core.autocrlf is false
TortoiseGit for Windows GUI Tool
TortoiseGit is an optional Front-End GUI to the Git client previously installed.
Check the TortoiseGit general settings for the location of the Git client. msysgit -> Git.exe Path otherwise set it, i.e., C:\Program Files (x86)\Git\bin.
Once TortoiseGit is installed, follow these steps:
BE SURE TO VERIFY AUTOCRLF!
- See the screen shot below. To check the actual .gitconfig file select edit global config to verify.
- If you do not have this properly set the line endings will be incorrect and your build will fail.
- I've see the GUI not update the actual .gitconfig file so that is why it is good to verify it.
- Open the Windows Explorer
- Navigate to an appropriate folder (like My Documents)
- Create a new folder named "FreeSWITCH"
- Set autocrlf=false otherwise the gawk scripts will fail!
- Right-click the "FreeSWITCH" folder and click on "Git Clone"
- The Git repo is git://git.freeswitch.org/freeswitch.git
- The clone will take several minutes.
When the clone is finished, you can check the status by right-clicking and selecting properties on the cloned folder, and selecting the Git tab. You'll see something like:
HEAD: 3c66b497d66ae180de30bffe449d0421f5d16221 S-2784, missing incoming calls to one interfacename Giovanni Maruzzelli 2010-10-29 01:57:37
Last Modified: 3c66b497d66ae180de30bffe449d0421f5d16221 skypopen: fix FS-2784, missing incoming calls to one interfacename Giovanni Maruzzelli 2010-10-29 01:57:37
Building the source
To compile FreeSWITCH on Windows, you will need Visual Studio 2008, 2010 full or Express version.
NOTE (1): There is a solution file specifically for VC++ 2008, 2010 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.
NOTE (2): When building Freeswitch using VC++ 2008, 2010 Express you will need to 'remove' from the build list "mod_managed", since that requires C# which is not part of VC++ 2008, 2010 Express.
NOTE (3): When building using VC++ 2008, 2010 Express to remove the warnings about 64-bit support the Windows SDK Version 7.1 can be installed after VC++ 2008, 2010 Express has been installed.
NOTE (4): You will need to 'Remove' mod_cepstral unless you have the SDK installed.
To 'remove' modules from the build, just right click on the module name in the Solution Explorer, select Unload Project.
Compiling the Source Code
- Open Freeswitch.2008.sln or Freeswitch.2010.sln depending on your Visual Studio version (or Freeswitch.2008.express.sln, Freeswitch.2010.express.sln if using VC++ Express Edition)
- Select whether you want a Release or Debug build and Win32 or x64
- 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/libsndfile/src/sfconfig.h; also rename libs/win32/libsndfile/config.h to libs/win32/libsndfile/sfconfig.h
Alternatively, right click on the main Solution node and select Clean.
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.
You may also have to disable your virus scanner(AVG2011, Avast) in case you have gawk failures (resulting in missing .h files), remember to turn it back on after! (Had this issue on Win 7 64bit)
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.
Building the installer
The above steps produce a Debug or Release version of FreeSWITCH in the <git dir>/Win32/Release or Debug directories.
To build the FreeSWITCH install package:
- Use the full VS 2010, Express version will not build Installer version
- This requires you to install WIX 3.0 or later. WIX
- set the Solution Configuration to Release and right click on Setup in the Solution Explorer. This creates the FreeSWITCH.msi file in <git dir>/w32/Setup/bin/<platform>/release.
Note - currently (as of September 2012), there is an art (or rather a knack) to building the installer. You need to build for w32 first; then you can build the Installer (using either the x86 Setup or x64 Setup targets). If you don't do this w32 build first, the sound files will not be where the Installer build file expects them to be, and an x64 installer build will fail.
You could hack the x64 Setup file's pre-build properties to change the sound file command from ..w32/Release to x64/Release, but it's easier just to do the builds in this order.
As Jeff Lenk said on the -users list: "At this time the installer is designed to require the 32 bit version to be run first which satisfies the sound file requirements."
Windows Quick Start
If you are using Windows firewall or other make sure you add FreeSWITCH as an exception otherwise no incoming SIP connections will work.
All of the console commands are covered on this wiki page: Core Commands
Getting Started and Basic Configuration
Finally, the Getting Started wiki page has some useful extensions to try out Some stuff to try out! The default configuration includes 20 endpoint definitions in prefix\conf\directory\default (1000-1019).xml. More information on endpoints: User Configuration
See here to configure a trunk (gateway) - Sample Gateway Configuration
And to dial out via your newly created gateway - Dialing out via Gateway
Finally, receiving inbound calls from your gateway - Receiving an inbound call from a Gateway
Although Windows generally uses the backslash character as the path separator, all modern versions of Windows support using the forward slash as well. Internally FreeSWITCH uniformly uses the forward slash character for path separation. In your configuration files use the forward slash and not a back slash:
<action application="playback" data="c:/path/to/soundfile.wav"/>
FreeSWITCH on Windows supports sending email notifications of voicemail via SMTP from Windows.
You'll need to change a value in prefix/conf/autoload_configs/switch_conf.xml
The parameter, mailer-app, defaults to sendmail. This needs to be changed to msmtp
<param name="mailer-app" value="msmtp"/>
You will also need to download a sendmail clone for Windows (msmtp): http://msmtp.sourceforge.net/index.html. Download and copy the .exe to %winddir%\system32. You'll need to create a small config file for smtp credentials (host name, authentication, tls, etc.) in %USERPROFILE%\Application Data\ called "msmtprc.txt". Below is a sample copy of this file:
################################### # The SMTP server of the provider. account provider host smtp.myisp.com from email@example.com auth login user johndoe password mypassword # Set a default account account default : provider ###################################
Note: if you plan to send email via your Gmail account you'll have to follow a guide similar to this one for configuring Gmail's signed server certificate (you have to use TLS with Gmail). http://laurentbois.com/2007/10/20/activemailer-using-msmtp-and-gmail/
Once configured your msmtprc.txt file should look something like this one:
################################### account gmail host smtp.gmail.com auth on user firstname.lastname@example.org password mypassword tls on tls_starttls on tls_trust_file "C:\Documents and Settings\jdoe\Application Data\ThawtePremiumServerCA_b64.txt" port 587 from email@example.com maildomain gmail.com account default : gmail ###################################
Spanish FreeSWITCH Windows Guide
There is a Spanish Version of installing FreeSWITCH 1.0.4 on Windows Vista available.