Call Us Today! 877.742.2583

Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added yasm for libvpx


New To You
A new folder (directory) named /usr/local, it's part of the Linux/UNIX standard directories. We'll also use the Linux/Unix commands: cdmkdirlscpmv,chmodchown, and sudo. You don't need to learn about them unless you change the steps or directories used in this document.



The manual installation steps below involve downloading and installing the following software:
  • Apple Xcode that provides Command Line Tools and Compilers that provide the tools needed to generate everything else
  • Prerequisite packages that FreeSWITCH™ needs to function
  • FreeSWITCH™ itself

It takes about one to two hours to have the sample FreeSWITCH™ configuration running on macOS. There's extra information for technical people who want it, don't be concerned if you don't understand it.



All of the software this procedure installs can be removed easily. However, to restore to a point where nothing was added or changed, a backup is required.

Terminal Application Preferences

The Terminal application is used extensively during installation. The following changes are highly recommended:

  1. Copy Terminal in the Applications/Utilities folder into the Dock for quick access.
  2. Start the Terminal application by clicking it in the dock. Then open its preferences panel.
  3. In Settings–>Profiles–>Window change the Window Size to larger values such as 140x48 to reduce having to resize the window often.

macOS Developer Tools

The macOS Developer Tools are composed of two parts, the Xcode macOS Software Developer Kit used to develop and test macOS GUI applications, and the Command Line Tools that provide LLVMClangGit and other tools required to generate non-GUI applications such as FreeSWITCH™ and its prerequisites. The Command Line Tools are included with Xcode. The Apple Developer site offers the standalone CLT but it cannot be used because Homebrew will not install without the Xcode+CLT version.

Download Xcode

Xcode takes a while to download and is placed into the Applications folder (/Applications directory) with the Command Line Tools in /Applications/

High Sierra 10.13:  install Xcode 9 using the macOS App Store application then start Xcode.
Sierra 10.12:  install Xcode 9 using the macOS App Store application then start Xcode.
These Xcode Downloads require you to sign in with your Apple ID and agree to the Software Agreement: 
El Capitan 10.11:  download and install Xcode 7.3.1 from Xcode 7.3.1 Download then start Xcode.  NOTE: Xcode 8 CANNOT be used. See FS-9521.
Yosemite 10.10:   download and install Xcode 7.2.1 from Xcode 7.2.1 Download then start Xcode. Perform Rename Xcode Directory (As of Xcode 7.1).




Important: To complete installation of Xcode it must be started once to accept the license agreement and install the final components.




Show Invisible Files and Directories in the Finder

macOS hides many Unix directories and files from the Finder including the directories created by this procedure. These files and directories must be unhidden so they appear on the desktop, Finder windows and file dialogs. Additional information and scripts for showing invisible files are in the macOS Customization guide. View hidden files by running the lines below in Terminal:
Code Block
  defaults write AppleShowAllFiles YES
  killall Finder

Directories Overview and Security


Create /usr/local Subdirectories

In OS X 10.10 Yosemite /usr/local is not supplied so it must be created by running the following commands in Terminal, sudo will prompt for the administrator password:

Code Block
  cd /usr
  sudo mkdir local                          # Create the /usr/local directory

The user name (owner) and group name of the /usr/local subdirectories created by this procedure must match the user and group FreeSWITCH™ will run under. This is typically the main user name of the Mac. Use the mkdir command to create the freeswitch and src directories and the chown command to change the owner. Copy/paste these commands in Terminal, sudo will prompt for the administrator password:

Code Block
  cd /usr/local                             # Change to the /usr/local directory
  sudo mkdir freeswitch src                 # Create the FreeSWITCH™ runtime and source directories
  sudo chown -R `id -u`:`id -g` freeswitch src  # Change the owner of the two new directories to yours


Additional programs are required to generate and run FreeSWITCH™. They are installed using  using Homebrew, a package manager and its repository of products for macOS. Homebrew saves time since there is no need to locate packages and determine the version required for each macOS release. Homebrew's Git repository is maintained by volunteers. 

macOS Developer Tools

Generation of FreeSWITCH™ and its prerequisites require the macOS Developer Command Line Tools that provide LLVMClangGit and other tools required to generate non-GUI applications. The Xcode Software Developer Kit used to develop macOS GUI applications already includes the CLT. This is not something you need to worry about because if:

  1. Xcode and CLT are not already installed Homebrew will download and install the Command Line Tools during Homebrew installation.
  2. You are using the latest macOS and Xcode is installed, the correct CLT is already installed.
  3. You are using a macOS prior to the latest release and Xcode is installed you may have the wrong CLT. That's because when Apple upgrades Xcode, only the latest release of macOS CLT are usually supplied. If macOS is not the latest release, the CLT may not match.  Homebrew will determine if the correct Command Line Tools are already installed. If not, it will download and install them during Homebrew installation.

Install the Homebrew Package Manager and Prerequisites

The Homebrew package manager and prerequisites install in approximately 10 to 15 minutestakes several minutes to install.

Install Homebrew

Homebrew installation is simple, the install command is found at the Homebrew home page and is listed below.


The basic FreeSWITCH™ prerequisite packages are installed by running the following command (copy/paste the entire line) in Terminal from any directory:

Code Block
brew install autoconf automake curl FreeSWITCH/homebrew-freeswitch/fliteffmpeg jpeg ldns libpq libsndfile libtiff libtool lua openssl opus pcre pkg-config speex speexdsp sqlite yasm signalwire/homebrew-signalwire/flite signalwire/homebrew-signalwire/libks signalwire/homebrew-signalwire/signalwire-c

Some packages produce Ignore any keg-only messages which can be ignored. It means , they mean an alias (link) for the package was not placed into /usr/local/bin because brew found that macOS has another version installed. This is not a problem because the FreeSWITCH™ installation process searches Homebrew directories to find packageprerequisite packages.

titleAlready had some prerequisites installed?

If non-Apple compilers are installed, or prerequisites were previously installed without homebrew, there may be problems.



Download FreeSWITCH™

macOS is now ready to download and install FreeSWITCH™. First, change to the directory the source will be downloaded into:


The primary FreeSWITCH™ releases are: The current production version Current public release, recommended for production systems, unless you need newer features or patches added since its release. The master development versionCurrent branch, contains in-test fixes since current public release, intended as the next maintenance release. Master development, containing the latest fixes and features used during development, intended as the next major release. Additional Information is located at Source Options.

Download Current


Public Release

Download the current public release of FreeSWITCH™ from freeswitch-files, then decompress, rename and move the unzipped directory to /usr/local/src. It's much easier to copy/paste the very long line below into the You can copy the long line below and paste it into a Terminal command line. This single line performs: 1- Determines the latest production release public release available. 2- Downloads the compressed source file. 3- Decompresses the file into a folder in the current directory (should be /usr/local/src/). 4- Renames the folder to freeswitch.

Code Block
FSfile=$(curl -s | sed -n 's/.*"\(freeswitch\-[0-9]*\.[0-9]*\.[0-9]*\.tar\.gzbz2\)".*/\1 /p' | tail -n 1) && echo Downloading $FSfile && curl$FSfile | tar -xzxj && mv ${FSfile/.tar.gzbz2//} freeswitch

Download Master Development


If there are problems with the current public release, the developers may request that you install the current branch or master development for diagnosis.

Download Current Branch

The git command creates the freeswitch directory in src  (/usr/local/src/freeswitch) and downloads the FreeSWITCH™ source files. If there are problems with the current production version, the developers may request that you install the master version or current branch for diagnosis., replace # with the release number. 

Code Block
  git clone –b v1.#    # Master Development
  git clone –b v1.$ 

Download Master Development

The git command creates the freeswitch directory in src  (/usr/local/src/freeswitch) and downloads the FreeSWITCH™ master development source files.

Code Block
git clone
  # Current branch, replace $ with release number - Use only if directed



Install FreeSWITCH™

Generate Installation and Configuration Files

This step creates First, change to the newly created freeswitch directory containing the source:

Code Block
cd freeswitch

Perform the next line only if current branch or master development were download. It creates many additional installation files based on the operating system and installed packages. ./ creates many files such as . For instance, modules.conf used to add optional functionality to FreeSWITCH™, while ./configure sets compilation options. Enter the following commands (each will . The command will run several minutes):

Code Block
  cd freeswitch    # <- the new freeswitch directory containing the source
  ./   # <- OnlyNot needed if Master Development was download using git! for Current Production does not include it.
  .public release.

This step determines if the correct prerequisites are installed and sets compilation options. It will run several minutes:

Code Block

Add Text–To–Speech Module


  1. Use the Finder to navigate to the /usr/local/src/freeswitch directory.
  2. Scroll to and double-click modules.conf in the freeswitch directory, the first time requires application selection, Textedit should be used.
  3. Search for "flite" and remove the # to uncomment.
  4. Save the file.



If this is your first FreeSWITCH™ don't add more than the FLITE module. Some modules may have prerequisites in addition to what is listed in this procedure.


Compile, Create Additional Source Directories and Check for Errors

This step compiles the programs and creates additional directories and files based on modules.conf. While still in /usr/local/src/freeswitch compile FreeSWITCH™ with the "make" command, it runs for several minutes:

Code Block

If there are no errors proceed, otherwise seek assistance from the FreeSWITCH-users mailing list


This creates the /usr/local/freeswitch runtime library and executable programs.

Code Block
  make install

Download and Install Sounds


The cd sounds are recommended since all the sampling rates are provided resulting in fewer problems. Invoke the following command:

Code Block
  make cd-sounds-install cd-moh-install


This optional step can be performed to save space by removing the temporary files created by make:

Code Block
  make clean


Test FreeSWITCH™!


FreeSWITCH™ may occasionally require updating due to new features, fixes, etc. To update the current productionpublic release, download and install the latest maintenance level.

To update master or the current branch, download the latest updates, compile FreeSWITCH™ and create updated runtime binaries, run the following two commands:

Code Block
  cd /usr/local/src/freeswitch
  git pull && make current

Updating Prerequisites

To update Homebrew and its formulas run "brew update" in Terminal, this should be run prior to upgrading packages. To upgrade all packages, run "brew upgrade", or to upgrade a single package run "brew upgrade package-name" command.




Removing FreeSWITCH™

Consider backing up modified or new configuration files you created! FreeSWITCH™ is completely removed by deleting the /usr/local/freeswitch and /usr/local/src/freeswitch directories using the Finder (drag to trash) or in Terminal:

Code Block
  rm -r /usr/local/freeswitch
  rm -r /usr/local/src/freeswitch


Code Block
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
sudo rm -r /Library/Caches/Homebrew   # (macOS prompts for the administrator password)


Remove Xcode

Xcode is installed as an macOS package (directory) that looks like a single application file. To remove Xcode drag the application to the trash, empty it and restart macOS.

Remove the Command Line Toole

  1. Move the /Library/Developer directory to the trash. Or delete it in Terminal (macOS prompts for the administrator password):
Code Block
  sudo rm -r /Library/Developer

Remove Everything Else

If the /usr/local directory existed prior to using this procedure it has to be examined to determine if the contents are deletable. If the instructions on this page were followed, and the /usr/local directory was created during this procedure, everything can be removed to roll back the system prior to using this procedure by performing these steps:

  1. Drag everything in the /usr/local directory to the trash. Or delete it in Terminal (macOS prompts for the administrator password):
Code Block
  sudo rm -r /usr/local/*


For OS X 10.11 and 10.12: NEVER delete the /usr/local directory! It's very difficult to recreate, it must be restored from a backup. This is due to System Integrity Protection (aka rootless) security.


To reverse the show hidden files step, open the Terminal application and run each line below. All hidden files will disappear from the desktop, Finder and file dialogs.

Code Block
  defaults write AppleShowAllFiles NO
  killall Finder