Transcoder release Installation on a Single Server
- Sangoma Transcode Package Installation
- Hardware & Ethernet Driver Installation & Configuration
- Sangoma Transcode Installation
- Sangoma Codec installation for Asterisk
- Sangoma Codec installation for FreeSWITCH
- Sangoma Transcoding Auto Configuration
- Sangoma Transcoding Server Operation
- Asterisk Sangoma Transcoding Operation
- FreeSWITCH Sangoma Transcoding Operation
- FAQ
Sangoma Media Transcode Packages
Download the Latest Sangoma Media Transcoding Release:
---> sng-tc-linux-1.3.3.2.i686.tgz (2012-04-09) ChangeLog
---> sng-tc-linux-1.3.3.2.x86_64.tgz (2012-04-09)
---> sng-tc-windows-x86-1.2.3.tgz (2010-10-13)*A manual firmware upgrade is required to use the above 1.2.x releases for cards
purchased before November 10th, 2010
--> Firmware upgrade Procedure
Release Conents:
| server/libsngtc/ | Sangoma transcoding library (SNGTC API) |
| server/sngtc_server/ |
Sangoma transcoding SOAP server |
| server/sngtc_tool/ | Transcoding server utility (upgrade firmware, licensing etc) |
| server/eth_drivers/ | Broadcom and Micrel ethernet drivers. In case your kernel does not have support for the aforementioned hardware. |
| client/libsngtc_node/ | Sangoma transcoding node library (SOAP client API) |
| client/codec/asterisk/ | Asterisk codec module (Works as a SOAP client to the sngtc_server binary) |
| client/sngtc_client/ | Stand alone transcoding client |
| sngtc_cfg/ | Server and client configuration utility |
Hardware & Ethernet Driver Installation & Configuration
- Insert the D100 PCI/PCIe card into the system PCI slot and boot your Linux system.
--- - Depending on your kernel:
a. The Broadcom or Micrel kernel ethernet driver will automatically load and
additional ethernet device will appear in:
--> cat /proc/net/dev (proceed to step 5 in this case)
OR
b. The kernel does not support Broadcom or Micrel drivers.
Drivers will have to be compiled and installed manually as shown in the following step
--- - Installing Broadcom/Micrel Driver Manually (case: step 2b)
Run this step only if the kernel does not support the above Ethernet drivers.
--> cd sng-tc-<ver>/server/eth_driver
--> ./install.sh
The install script will auto detect Broadcom & Micrel support.
If drivers are not found it will try to build them for the currently running kernel.
The build steps below will be automatically executed by the install.sh script.
--
For Broadcom For Micrel
--> Latest Driver tg3-3.116j
--> cd tg3 --> cd ks8842_pci
--> make --> make
--> make install --> make install
- Note: the contents of the following chart will be covered by the install.sh script and is presented for FYI purposes only
|
Broadcom driver (tg3) detection in available driver list If Broadcom driver is loaded then proceed to configure the ethX device Load Broadcom driver into the kernel |
Micrel driver (ks8842) detection in available driver list |
4. Configuring ethernet devices and assigning IP addresses
* Note this step is distro-dependent
RedHat/Fedora/CentOS
--> 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: 10.1.1.1 netmask 255.255.255.0
--> 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 10.1.1.1
D100 card2 - IP 10.1.2.1
Sangoma Transcode Installation
The following will perform a complete installation of the Sangoma transcoder, which includes the Sangoma transcoding library (SNGTC API), the Sangoma transcoding configuration utility (sngtc_cfg) and the Sangoma SOAP library & server
- Untar the release in arbitrary directory
-> tar xfz sng-tc-<ver>-<arch>.tgz - cd sng-tc-<arch>-<ver>/
- make
- make install
4. Proceed to the following step for Asterisk installation, otherwise skip to Sangoma codec installation for FreeSWITCH
Sangoma Codec installation for Asterisk
*In order to perform this steps, you must have Asterisk already installed along with its headers (ie: /usr/include/asterisk/)
- cd sng-tc-<arch>-<ver>
- make asterisk
- make install
Proceed to Sangoma Transcoding auto configuration
Sangoma Codec installation for FreeSWITCH
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 git://git.freeswitch.org/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
Sangoma Transcoding Auto Configuration
This step will auto detect all configured D100 cards and will create Asterisk and/or FreeSWITCH codec module configuration files. The utility is used to configure is called "sngtc_cfg".
This utility will probe all the ethernet interfaces looking for transcoding modules. Be aware it will attempt to bring up all interfaces in the system in order to transmit some special ethernet frames
to discover transcoding modules. It will then ask for configuration for each interface where transcoding modules were detected.
- Asterisk Sangoma Transcoding Configuration:
--> sngtc_cfg --server --asterisk
or
--> sngtc_cfg --server --asterisk --astdir=/etc/asterisk
Asterisk Sangoma Transcoding Config file:
/etc/asterisk/sangoma_codec.conf - FreeSWITCH Sangoma Transcoding Configuration:
--> sngtc_cfg --server --freeswitch
or
--> sngtc_cfg --server --freeswitch --fsdir=/usr/local/freeswitch/conf/autoload_configs
FreeSwitch Sangoma Transcoding Config file:
/usr/local/freeswitch/conf/autoload_configs/sangoma_codec.conf.xml
Sangoma Transcoding Server Operation
Before using the FreeSWITCH or Asterisk codec module, it is necessary to start the Sangoma transcoding SOAP server. Both, FreeSWITCH and Asterisk codec modules work as SOAP clients for this server, therefore if the server is not started, FreeSWITCH and/or Asterisk won't be able to use the Sangoma transcoding card. This also means you can have multiple FreeSWITCH or Asterisk boxes using the same transcoding card where each box requests transcoding sessions to the box with the card actually installed. In order to start the transcoding server you must use the sngtc_server_ctrl script:
--> sngtc_server_ctrl start
Asterisk Sangoma Transcoding Operation
Once the sangoma transcoding configuration file is created by sngtc_cfg configurator we can start Asterisk and load codec_sangoma.so module from the Asterisk CLI.
Asterisk CLI> module load codec_sangoma.so
An alternative for production systems is add the line load => codec_sangoma.so to Asterisk configuration modules.conf to get the codec module loaded at startup.
At this point the module will read the sangoma_codec.conf configuration and load the configured codec translators. Asterisk will make use of the translators as necesary.
WARNING: There is a bug in Asterisk that may lead to crashes when loading codecs if there are 2 different modules providing the same translation paths. See this bug report for more information:
http://issues.asterisk.org/view.php?id=17092
And also read the sample configuration comments in sng-tc-<version>/codec/asterisk/sangoma_codec.conf.sample to learn more about work-arounds in case you face the problem.
Once the module is loaded Asterisk will use the translation resources when needed. You can see which translators were registered by the Sangoma module using:
Asterisk CLI> sangoma show translators
You can monitor the usage of the translation resources using Asterisk CLI commands:
This command display all the transcoding sessions currently active along with some statistics per session like Tx/Rx packet counters and average Rx/Tx times in milliseconds.
Asterisk CLI> sangoma show transcoding sessions
This command display the lost RTP packets statistics for all sessions.
Asterisk CLI> sangoma show rtp statistics
FreeSWITCH Sangoma Transcoding Operation
Once the sangoma transcoding configuration file is created by sngtc_cfg configuratior we can start FreeSWITCH and load mod_sangoma_codec.so module from the FS CLI.
FS CLI> load mod_sangoma_codec
An alternative for production systems is add the line <load module="mod_sangoma_codec"/> to conf/autoload_configs/modules.conf.xml to get the codec module loaded at FS startup.
At this point the module will read the sangoma_codec.conf.xml configuration and load the configured codecs. FreeSWITCH will make use of the codecs as necessary.
You can verify which codecs were registered by the module using the FS native command to list codecs:
FS 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".
You can use several commands to monitor the usage of the codecs:
This command will show each vocallo configured settings.
FS CLI> sangoma_codec settings
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".
FS CLI> sangoma_codec sessions
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:
FS CLI> sangoma_codec stats <session number>