Important Note Regarding FreeSwitch® and FreeTDM® Support

Support for FreeSwitch and FreeTDM for Sangoma telephony card products are no longer provided by Sangoma. All FreeSwitch drivers and applications are provided as-is with no warranty.  

Sangoma was previously involved in the FreeTDM and FreeSwitch projects, but has refocused its development efforts primarily on Asterisk-based platforms including FreePBX. The information on this page and other FreeSwitch- and FreeTDM-related pages on the Sangoma Wiki has been retained for historical and reference purposes, but should not be relied upon as reflecting Sangoma's current development efforts or support policies.


Sangoma + FreeSWITCH Overview

As a TDM hardware manufacturer Sangoma has concentrated its efforts in creating the best possible TDM APIs, Drivers and Hardware on the market.  

We have also invested in professional TDM stacks:

Over the last few years Sangoma has been actively developing, testing and integrating its TDM APIs and Stacks into FreeTDM:  FreeSWITCH TDM framework.
Sangoma adopted FreeTDM Framework as its defacto standard high level TDM Signaling and Media API. 
Sangoma has used the FreeTDM API Layer as a Unified Signaling & Media TDM API for both Linux & Windows operating systems, for customers that are looking to develop VoIP/Voice/Media applications over Sangoma hardware.



FreeTDM Native Features

 Open R2

Analog (FXO/FXS)

Sangoma FreeTDM ISDN Library (libsng_isdn)


Sangoma's ISDN Library uses Continuous Computing's (Trillium) LAPD and Q931 stacks to provide a commercial grade ISDN interface to FreeSWITCH, via the FreeTDM channel driver.

List of variants

*INSNET support on J1 is not fully tested yet.
** QSIG support has not been tested yet. 

Customer (CPE) and Network (NET) emulation are supported for all variants.
BRI point-to-point and point-to-multipoint are supported for EuroISDN and INS-NET variants.

Sangoma FreeTDM SS7 Library (libsng_ss7)


Sangoma's SS7 Library uses Continuous Computing's (Trillium) MTP2/3 and ISUP stacks to provide a commercial grade SS7 interface to FreeSWITCH, via the FreeTDM channel driver.

List of supported variants

Server and Operating system Selection

Selecting your server

Sangoma cards are compatible with most commercially available servers and motherboards on the market.
Our cards are available in both PCI and PCI express versions and are backwards compatible (i.e. 16x, 8x, 4x, 2x)
Also available are different size brackets for 1U and 2U server form factors.


For Sangoma analog card installations using FXS modules and/or remora expansion boards, please verify that your server has available molex power connection from internal power supply


Selecting your Linux Operating system

Sangoma cards are compatible with most official Linux distributions and kernels (i.e. CentOS, Debian, Ubuntu) 32 and 64-bit.
Sangoma recommends the use of CentOS as our R&D and QA departments use this distribution on a frequent basis.


Below are instructions for CentOS Installation.  If you would like use a different Linux Distro, please visit the appropriate online resources.

  1. Download latest CentOS distribution:
  2. After downloading the CentOS ISO, simply burn the image on CD/DVD using your choice of burning utility
  3. Boot your server with the CD/DVD containing your CentOS ISO.  Verify your BIOS settings allow for Boot from CD/DVD ROM drive
  4. Follow the on-screen prompts to Install your new operating system. You may wish to visit some online step-by-step tutorials (google:))
  5. Once completed, remove the CD/DVD from your server and reboot your server and log in to your freshly installed operating system


Preparing your Operating system for software packages

After installing your Linux operating system, you must prepare your server with the following software requirements before continuing. 
To install required system dependencies simply copy and paste the below string directly into your Linux command line. The string will automatically download and install missing dependencies on your server.  

must have internet connection for this step


Select only the option that applies to your environment:

CentOS (RedHat distros)

yum -y install kernel-devel-$(uname -r) libtool* make gcc patch perl bison flex-devel gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf libxml2-dev cmake


apt-get -y install gcc g++ automake autoconf libtool make libncurses5-dev flex bison patch libtool autoconf linux-headers-$(uname -r) libxml2-dev cmake


Installing Sangoma Driver (called 'Wanpipe')

The following instructions will guide you through the Installation of the Sangoma Wanpipe driver on your server that contains all required software packages already installed (i.e. Asterisk, DAHDI, Libpri).

  1. Download the latest official release of the Sangoma Wanpipe Driver
    1. Copy & Paste the line,without the quotes, into your Linux command line in the /usr/src/ directory.This will automatically download from the internet.
      -> "  wget "


      If your server does not have internet access simply download the driver on another machine with internet access, then transfer the downloaded .tgz package to /usr/src on this serer.

  2. Un-compress the download Wanpipe driver (.tgz file) located in /usr/src
    1. tar xvfz wanpipe-current.tgz
    2. cd wanpipe-<version>/


  3. Compile and install the Sangoma Wanpipe driver by typing the following in the newly created wanpipe-<version> directory:
    -> make install

    The 'make 'command will compile the driver. This process may take a few minutes.
    The 'make install' command installs the driver 

  4. Verify the Sangoma driver is installed by typing the following command on your Linux command line to verify that your system detects your Sangoma card(s) :

    -> wanrouter hwprobe

    Example output of a system with an a200, B700 and A108 card:

    [root@support-sys1 ~]# wanrouter hwprobe
    | Wanpipe Hardware Probe Info |
    1 . AFT-A200-SH : SLOT=4 : BUS=5 : IRQ=15 : CPU=A : PORT=PRI : HWEC=32 : V=11
    2 . AFT-B700-SH : SLOT=1 : BUS=7 : IRQ=3 : PORT=1 : HWEC=16 : V=35
    3 . AFT-B700-SH : SLOT=1 : BUS=7 : IRQ=3 : PORT=2 : HWEC=16 : V=35
    4 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=1 : HWEC=256 : V=44
    5 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=2 : HWEC=256 : V=44
    6 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=3 : HWEC=256 : V=44
    7 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=4 : HWEC=256 : V=44
    8 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=5 : HWEC=256 : V=44
    9 . AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=6 : HWEC=256 : V=44
    10. AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=7 : HWEC=256 : V=44
    11. AFT-A108-SH : SLOT=2 : BUS=7 : IRQ=14 : CPU=A : PORT=8 : HWEC=256 : V=44
    Sangoma Card Count: A108=1 A200=1 B700=1

Download and Install Software Package

For PRI or BRI support, you need to install the Sangoma ISDN Library (libsng_isdn).

If you have an analog card, no software package is required as FreeTDM has analog support already built in.

  1. Navigate to the /usr/src/ directory which will be used to store the downloaded libsng_isdn package. To do this type the following in your Linux command line, then press <enter>:
    1. -> cd /usr/src
  2. Download libsng_isdn by copy & pasting the following (without the quotes ""), then press <enter>:
    1. For 32-bit : " wget "
    2. For 64-bit : " wget  "

  3. Install the libsng_isdn by un-compressing the downloaded '.tgz' file and install using make command

    you are still inside the /usr/src/ directory by typing 'pwd' in the Linux command line. If you are not, navigate inside by typing 'cd /usr/src/' then press <enter>


    1. tar xfz libsng_ss7-current.<arch>.tgz

    2. cd libsng_isdn-<version>.<arch>

    3. make install

Now we are ready to download and install FreeSWITCH as our final step.

FreeSWITCH Installation

  1. Download FreeSWITCH into your /usr/src/ directory
    1. Copy and paste the below line into your Linux command line to automatically start downloading FreeSWITCH
      -> git clone -b v1.6

      This command will download FreeSWITCH using Git the Git online repository. If you do not have Git on your system, you will need to download it first before running the above command.
      If you need to download Git on CentOS, simply type 'yum install git-all', or 'apt-get install git-all' for ubuntu 

  2. After the download is complete, you will notice a new directory called 'freeswitch'. You can verify this by typing 'ls' in your Linux command line.
  3. Navigate inside this new 'freeswitch' directory by typing the following in your Linux command line:
    -> cd freeswitch

    Its recommended to use Sangoma FreeTDM code . Follow Telephony Cards for FreeSWITCH#SangomaFreeTDM instructions to use Sangoma "FreeTDM" code.

  4. Type the following command to prepare the freeswitch system:
    -> ./bootstrap

    This will take a few minutes to complete.
  5. Enable mod_freetdm which will enable the FreeTDM signaling stack inside FreeSWITCH
    1.  Open the modules.conf file by typing the following:
      -> vi modules.conf
    2. un-comment  the following line by removing the '#' character from the beginning:

      -> #../../libs/freetdm/mod_freetdm

      So your result should look like:
      -> ../../libs/freetdm/mod_freetdm

    3. save and exit modules.conf

  6. Configure your FreeSWITCH system by typing the following command:
    -> ./configure

    (This will make the freeswitch working directory: /usr/local/freeswitch

    If you would like the working directory of freeswitch to be anything different than /usr/local/freeswitch you can indicate this by typing the following command, instead of './configure':
    -> ./configure --prefix=<location to install FreeSWITCH to> 

  7. Compile and Install FreeSWITCH
    1. Type the following command to compile FreeSWITCH:
      -> make
    2. Type the following command to install FreeSWITCH:
      -> make install

FreeSWITCH is now Installed 

Sangoma FreeTDM 

Its recommended to use our FreeTDM. User can start using Public FreeSwitch + Sangoma FreeTDM in either of the ways as described below:

Using already merged Public Freeswitch and Sangoma FreeTDM

Please find the below set of instructions to download the Public Freeswitch + Sangoma FreeTDM:

  1. Download Public Freeswtich + Sangoma FreeTDM compress file from Sangoma FTP server as given below:
  2. Now, untar the file using command as:

    tar -xvf public_fs_merge_v1.6.tgz

  3. Now, compile the freeswitch as usuall or can refer to  "sangoma-public-fs-compile.txt" as present within public_fs_merge_v1.6 folder, for freeswitch compilation related instruction

  • The merged (Public Freeswitch + Sangoma FreeTDM) tar ball is created on Public Freeswitch below are the details:
    branch: v1.6

Using Sangoma FreeTDM and Manully merging it to Public Freeswitch

Please find below instructions to download our FreeTDM code and copy to Freeswitch source code directory before freeswitch compilation.

1. Download our FreeTDM source code. Copy and paste below line into your Linux command line to start download.
        -> git clone -b public_v1.6-merge

2. Copy the freetdm code to Freeswitch directory.
   a) mv <freeswitch_source_code_dir>/libs/freetdm /tmp/freetdm.bkup.junk
   b) cp -r <downloaded_freetdm_dir> <freeswitch_source_code_dir>/libs/freetdm

3. Please use the below script in order to apply patch and build freeswitch with our FreeTDM. Please find below script file below
    Sangoma FS-1.6 Patch Apply Script

NOTE: Once script is successfully executed "sangoma-public-fs-compile.txt" file is generated. User can refer to this file in order to get the details with respect to How to compile (sangoma + Public) merged FreeTDM with public Freeswitch


To configure your Sangoma card(s), run the following command in your Linux command line:

-> wancfg_fs

This command will configure all your Sangoma cards in your system.

Simply follow the prompts and answer all the questions. 

 After running the wancfg_fs configuraiton tool, the following files will have been created:


Click here for Sample Configuration files

Last Step:
Enable FreeTDM by editing modules.conf.xml located in /usr/local/freeswitch/conf/autoload_configs/ :

Type the following command in your Linux command line:
-> vi /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml

Locate the following line:
 <!-- <load module="mod_freetdm"/> --> 

Un-comment the line by removing the <!-- and -->:
i.e. <load module="mod_freetdm"/>

Save the file and exit.



To start the Sangoma driver, which also starts your Sangoma card(s) run the following command on your Linux command line:

-> wanrouter start 


card control commands start with 'wanrouter'

Immediately after running this command, you will see on-screen output of all the ports (i.e. wanpipe1, wanpipe2..etc) starting on your card.
You will also see your ports plugging into the DAHDI signaling layer.
If you see errors occurring, investigate the /var/log/messages file.


Starting FreeSWITCH

-> Background Mode  (Production)

/usr/local/freeswitch/bin/freeswitch -nc

Run "ps fax" to see if Freeswitch is up.

ps fax |grep freeswitch

Wait a few seconds, then run the FreeSWITCH CLI:


Console Mode (Debugging)

/usr/local/freeswitch/bin/freeswitch -nonat

Stopping FreeSWITCH

If FreeSWITCH is currently running in Background Mode

/usr/local/freeswitch/bin/freeswitch -stop 

If FreeSWITCH is currently running in Console Mode

CLI> ...