Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

FreeSWITCH D100 Distributed Codec Module Configuration


FreeSWITCH Codec Module Configuration

This step will create FreeSWITCH codec module configuration files.  Perform the following step ONLY on the FreeSWITCH machine(s) that will be sngtc server clients to the remote box with the hardware transcoder. 

This step must be performed for each server that is a client to the remote box containing the transcoder

Note: If you have FreeSWITCH on the same box hosting the sngtc_server/transcoder and configuring for this box, skip the download portion of step 1, as the Transcode Software is already downloaded from previous steps

  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 ALL D100 transcoders located on the same network and will create FreeSWITCH codec module configuration files.  All transcoders detected will be configured to all be 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 --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 defaul <X.X.X>.150 is used

     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 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:
    --> <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 


FreeSWITCH Routing Configuration

For the purpose of the rest of the discussion, Host A will represent this FreeSWITCH server (sngtc client) and Host B will represent the server hosting the sngtc_server

  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

  • No labels