D150 Asterisk Single Server Installation
Transcoding Package
Download the Latest Sangoma Media Transcoding Release:
---> sng-tc-linux-1.3-current.i686.tgz
---> sng-tc-linux-1.3-current.x86_64.tgz
*A manual firmware upgrade is required to use the above 1.2.x releases for cards
purchased before November 10th, 2010
--> Firmware upgrade Procedure
Hardware Installation
Mount your transcoder
-> D150-ETH-Find a free PCI slot insider a server to install
-> D150-BOX- Find a well ventilated flat surface, or install in optional rack mount
---------Attach Power supply
-> D150-ETH- use molex power from server power supply 2A @ 5V (10W),
or external power supply 2A @ 5V (10W)
-> D150-BOX- external power supply 2A @ 5V (10W)
---------Plug the Ethernet cable into your transcoder to attach to your network
* Note: There is no on-board Ethernet switch on the D150, so once plugging in the Ethernet Cable, there is direct access to the transcoding module
Transcoding package installation
Download and Install the transcoding package on a server that is located on the same network as the D150 transcoder
* Note: same network installation is required because the sngtc_server (discussed later) communicates with the hardware via EthernetFor the Official FreePBX Distro - do this before the next step
yum install asterisk<ver>-devel libxml2-devel
-> wget <URL of Package>
-> tar xfz sng-tc-<ver>-<arch>.tgz
-> cd sng-tc-<arch>-<ver>
-> make
-> make installThe D150 transcoder will be detected through the server's Ethernet interface that connects to the network (typically Eth0)
--------Firmware Update
To check if the firmware on the transcoder requires updating run the firmware update utility
--> Run: sngtc_tool –dev ethX –firmware (replace ‘X’ with the interface of the network, such as Eth0)
--> 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 network)* Note sngtc_server must NOT be running during the update; sngtc_server_ctrl stop will stop the server if it is running.
Transcoding Module Installation and Configuration
*Note: This step assumes Asterisk is on the same server as the server hosting the sngtc_server. If Asterisk only exists on other server(s) please go to -> D150 Sngtc Server Configuration
The steps below will install the Asterisk trancoding module, so please insure you have the Asterisk headers already installed (ie: /usr/include/asterisk/)
cd sng-tc-<arch>-<ver>
make asterisk
make install
On 64bit installs run the following
cp /usr/lib/asterisk/modules/codec_sangoma.so /usr/lib64/asterisk/modules/
The Asterisk Codec Module is now installed and requires configuration via the following steps. This step will auto detect ALL D150 transcoders located on the same network and will create Asterisk codec module and sngtc_server configuration files. All transcoders detected will all be treated as one big transcoding resource. There is no option to manually control particular D150 cards. Auto detection is performed through the Ethernet interface of your main LAN.
--> sngtc_cfg --server --asterisk
or
--> sngtc_cfg --server --asterisk --astdir=/etc/asterisk
The result of the above command creates an IP address for the transcoding card, by defaul <X.X.X>.150 is used
Asterisk Sangoma Transcoding Config file:
/etc/asterisk/sangoma_codec.conf
For FreePBX Distro - add to sangoma_codec.conf
allownondahditiming=yes |
Transcoder Hardware Configuration file:
/etc/sngtc/sngtc_server.conf
If you have more than one D150 on the network "sngtc_server.conf" will only list information of the first D150 detected (i.e IP address). The rest of the D150 configurations are hidden and will use consecutive IP addresses. (i.e first D150- 10.1.1.150, second D150- 10.1.1.151, third D150- 10.1.1.152...)
If the server has more than one Ethernet interface connected to the network, "sngtc_server.conf" will list all Ethernet interfaces that have detected the D150(s) and populate the exact same information in each EthX tag
Asterisk now needs to be configured to load the "codec_sangoma" module each time it starts.
--> vi /etc/asterisk/modules.conf
--> Add the line "load => codec_sangoma.so" into the file; save and quit
By default G729 is the only codec registered with Asterisk. If you require additional codecs please go to the following wiki page to configure them --> codec support and configuration.
Operation
The sngtc_server is at the heart of the transcoding environment. It interfaces the transcoder hardware and codec module (the codec module, in asterisk, 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.
*Note by default this script is started on system boot.
--> sngtc_server_ctrl (start|stop|restart)
To enable Asterisk to connect to the sngtc_server and then to the transcoder you will need the have the module codec_sangoma loaded. To load the module run the command below.
*Note the step above shows you how to auto load this on Asterisk start.
Asterisk CLI> module load codec_sangoma.so
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. You can 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.
To status the codec_sangoma module use the commands below.
Asterisk CLI> sangoma show translators(Shows codecs registered by codec_sangoma)
Asterisk CLI> sangoma show transcoding sessions(Shows active transcoding sessions)
Asterisk CLI> sangoma show rtp statistics(Shows real time RTP stats including dropped packets)