Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printablefalse

...

FreeSWITCH Codec Module Configuration

...

  1. Download and install Sangoma Transcode Software
    -> cd /usr/src/
    -> wget <URL of Package>
    -> tar xfz sng-tc-<ver>-<arch>.tgz
    -> cd sng-tc-<arch>-<ver>
    -> make
    -> make install

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

     --> git clone https://freeswitch.org/stash/scm/fs/freeswitch.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

  2. The FreeSWITCH Codec Module is now installed and requires configuration via the following steps. This step will auto detect the D500 transcoder located on the network (through the LAN only) and will create FreeSWITCH codec module and sngtc_server configuration files. These files instruct FreeSWITCH that in order to reach the transcoding resource(s) it must communicate over the LAN to the sngtc_server, which serves as the gateway to the D500.  All transcoding modules on the D500 will all be treated as one big transcoding resource.  There is no option to manually control individual transcoding modules onboard the D500.  Auto detection is performed through the main LAN.

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

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

    If multiple interfaces have detected the D500 transcoder, then you may have multiple LAN connections to this server, or the PCI Express Ethernet interface (tg3) has detected the D500.  Select configuration for only the interface of the main LAN (and only one)

     FreeSWITCH Sangoma Transcoding Config file:         
    /usr/local/freeswitch/conf/autoload_configs/sangoma_codec.conf.xml

    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 the FreeSWITCH Codec Configuration page

  3. After the above configuration file has been created, it must be edited in order to specify:

    a.  the location of the Sngtc server on the network from this particular sngtc client in order to send transcoding session requests
    b.  the return location of the transcoded session(s) from the remote transcoder hardware 

    --> vi /usr/local/freeswitch/conf/autoload_configs/sangoma_codec.conf.xml
         add the following lines into the <Settings> tag:
    --> <param name="soapserver" value="<LAN IP of machine hosting sngtc_server>:<Port of machine hosting sngtc_server>"/>
    --> <param name="rtpip" value="<LAN IP of FreeSWITCH sngtc client>"/>

    The PORT information for the sngtc server specified above must match the information you selected in /etc/sngtc/sngtc_server.conf for 'bindport" (on server hosting sngtc_server.  If you also decided to specify a unique "bindaddr" in the same file, then you must match that IP address with the value for "soapserver" above

  4. Start the Sngtc server on the box hosting the sngtc_server, so that the sngtc server clients (this FreeSWITCH box) can interact with the transcoder hardware via the box with the sngtc_server

    --> sngtc_server_ctrl start  

    If any changes are made to any of the above files, the Sngtc server must be restarts:
    --> sngtc_server_ctrl restart 

...

  1. When Host A requires a transcoding session from the remote transcoder accessible via Host B, it will require to know how to route to the transcoder (ex. 10.1.1.151) via Host B.  Since the transcoder IP is unknown to Host A, a route must be added in the Host A's routing table to Host B.  To add a route to the routing table in Host A, type the following in the Linux CLI:

    -> route add -net 10.1.1.0 netmask 255.255.255.0 gw <LAN IP of Host B> dev <ethX> , where "ethX" represents the Ethernet device of Host A's main LAN

    ---> Multiple routes can be added in Host A if you have multiple connections to the network and want more than one access point for transcoding requests.  Simply add a new route with the ethX of the next Ethernet interface to configure
    ---> Perform the above step for all Asterisk servers

    A route in Host B's routing table will NOT be required because when the returning transcoded RTP stream from the vocallo module cannot find its destination through Host B's routing table (i.e. rtpip=Host A) it will route to Host B's default gateway, which will know about Host A and send the stream back to Host A.

    *  If you are certain that your default gateway does not know about Host A, then you will require to add the route:
    -> route add -net <first 3 octets of Host A. 0> netmask 255.255.255.0 gw <gateway> dev <ethX> ,where "ethX" represents the ethernet device of Host B's main LAN

-> Proceed to Operation

<- back to D500 FreeSWITCH Main