FreeSWITCH D100 Single Server Installation

    1. Transcoding Package
    2. Transcoding Package Downloading & Installing
    3. Hardware Installation & Configuration
    4. Transcoding Codec Module Installation Configuration
    5. Operation


    Transcoding Package

    Download the Latest Sangoma Media Transcoding Release:  
    ---> sng-tc-linux-1.3.8.i686.tgz                   (2016-01-07)             ChangeLog
    ---> sng-tc-linux-1.3.8.x86_64.tgz             (2016-01-07)

    *A manual firmware upgrade is required to use the above 1.2.x releases for cards
    purchased before November 10th, 2010 
    --> Firmware upgrade Procedure 




    Transcoding Package Downloading & Installing 

    To install the transcoding package follow the steps below. Insure you get the URL of the package you need from the list above

    -> cd /usr/src/
    -> wget <URL of Package>
    -> tar xfz sng-tc-<ver>-<arch>.tgz
    -> cd sng-tc-<arch>-<ver>

    1. make 
    2. make install

    Hardware Installation & Configuration

    1. Insert the card in the server and boot it up.
    2. The PCIe version will appear as a Broadcom NIC and the PCI will show up as a Micrel NIC. 
    3. To check if the driver is installed run "ifconfig -a" and see if the new NIC is shown. 
    4. If the card is not detected then you will need to update the Ethernet driver to the latest release. Below is the steps to preform the update. 

    -> cd sng-tc-<ver>/server/eth_driver
    -> ./
    The install script will auto detect the NIC ( Broadcom & Micrel).
    If drivers are not found it will try to build them for the current kernel you are running or contact Sangoma Technical Support

    Configuring the Ethernet device

     * Note this step is distro-dependent

    To Configure the network interface (RedHat/Fedora/CentOS-5.x)

    --> run: system-config-network
    --> Select new eth device created on eth driver module load
    --> Specify a private IP address that is on different subnet than your local LAN.           
          eg:  netmask   
    --> Leave gateway ip empty 

    To apply network settings

    --> run: /etc/init.d/network restart

    If there are more than one D100 devices in the machine, each D100 eth device must have
         its own subnet IP.
           Eg: D100 card1 - IP
                 D100 card2 - IP

    Firmware Update

    To check if the firmware requires updating run the firmware update utility

    --> Run: sngtc_tool –dev ethX –firmware  (replace ‘X’ with the interface of the transcoder)

    --> If the FROM and TO version are the same you are up to date so cancel the update; if the versions are different please update. 

    --> If the update fails insure the ethX interface has a IP address (replace ‘X’ with the interface of the transcoder)

    * Note sngtc_server must NOT be running during the update; sngtc_server_ctrl stop will stop the server if it is running.



    Transcoding Codec Module Installation and Configuration

    *Note: This step assumes FreeSWITCH is on the same server as the transcoder. If FreeSWITCH only exists on other servers please go to ->

    The Sangoma FreeSWITCH codec is part of the FreeSWITCH git repository.  It can be easily obtained by running the following command in linux CLI:

    --> git clone git://

           Note*  You must have git installed

     In the FreeSWITCH source code edit:

    --> modules.conf and uncomment:

            --> # codecs/mod_sangoma_codec

    Then compile FreeSWITCH Sangoma codec module:

        1.  make mod_sangoma_codec    
        2.  make mod_sangoma_codec-install

    The FreeSWITCH Codec Module is now installed and requires configuration via the following steps. This step will auto detect ALL D100 transcoders located on the same computer and will create FreeSWITCH codec module and sngtc_server configuration files.  All transcoders detected will be controlled by this server and treated as one big transcoding resource.  There is no option to manually control particular D100 cards.  Auto detection is performed through the Ethernet interface of your main LAN.

      --> sngtc_cfg --server --freeswitch
    --> sngtc_cfg --server --freeswitch  --fsdir=/usr/local/freeswitch/conf/autoload_configs

    The result of the above command creates an IP address for the transcoding card, by defaul <X.X.X>.150 is used

     FreeSWITCH Sangoma Transcoding Config file:         

    Transcoder Hardware Configuration file:

    If you have more than one D100 in the computer "sngtc_server.conf" will only list information of the first D100 detected (i.e IP address).  The rest of the D100 configurations are hidden and will use consecutive IP addresses. (i.e first D100-, second D100-, third D100-

    Freeswitch now needs to be configured to load the "mod_sangoma_codec" module each time it starts. 

     --> vi conf/autoload_configs/modules.conf.xml

     --> Add the line "<load module="mod_sangoma_codec"/>" into the file. It can be placed anywhere below the line "<load module="mod_sofia"/>"; save and quit

    By default G729 is the only codec registered with FreeSWITCH.  If you require additional codecs please go to the FreeSWITCH Codec Configuration page



    • The sngtc_server is at the heart of the transcoding environment. It interfaces the transcoder hardware and codec module (the codec module, in FreeSWITCH, communicates with the sngtc_server in order to pass information to/from transcoder). It controls all Sangoma transcoders that are located on the same computer (this means you cannot have multiple sngtc_servers controlling/communicating with specific transcoders).  

      The sngtc_server needs to be started before transcoding can be done. Below is the usage of the sngtc_server_ctrl command. 

    --> sngtc_server_ctrl (start|stop|restart)

    *Note by default this script is started on system boot.

    • To enable FreeSWITCH to connect to the sngtc_server and then to the transcoder you will need to have the module mod_sangoma_codec loaded. To load the module run the command below.

     FreeSWITCH CLI> load

             *Note the step above shows you how to auto load this on FreeSWITCH start.


    • To status the mod_sangoma_codec module use the commands below:

    FreeSWITCH CLI>  show codecs

    Several codecs will be listed, all codecs prefixed with "Sangoma" are registered by the module, for example: "Sangoma G729" or "Sangoma G.726 32k".

    FreeSWITCH CLI> sangoma_codec sessions

    This command will show all current RTP transcoding sessions created by FreeSWITCH along with some statistics about Rx/Tx and lost RTP packets and read average times that can be used for debugging purposes. The first column show the session unique identifier for the transcoding session, you can use that identifier to query more information about that particular session using "sangoma_codec stats"

    FreeSWITCH CLI>  sangoma_codec stats <session number> 

    This command will show the FreeSWITCH RTP statistics in the transcoding sessions. Each transcoding session has a RTP connection associated. You can dump the RTP counters with this command

    FreeSWITCH CLI> sangoma_codec settings 

    This command will show each vocallo configured settings