Asterisk D500 LAN Distributed Codec Module Configuration
Asterisk Codec Module Configuration
This step will create Asterisk codec module configuration files. Perform the following step ONLY on the Asterisk machine(s) that will be sngtc server clients to the remote box with sngtc_server/D500.
This step must be performed for each server that is a client to the remote box containing sngtc_server/D500
Note: If you have Asterisk on the same box hosting the sngtc_server/D500 and configuring for this box, skip the download portion of step 1, as the Transcode Software is already downloaded from previous steps
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 asterisk
-> make installAsterisk Sangoma Transcoding Configuration:
--> sngtc_cfg --asterisk (assuming asterisk is located in /etc/asterisk)
or
--> sngtc_cfg --asterisk --astdir=/etc/asterisk (to manually indicate where asterisk is located)The above commands will generate Asterisk codec configuration files in:
/etc/asterisk/sangoma_codec.conf
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 /etc/asterisk/sangoma_codec.conf
add the following lines:
--> soapserver= <LAN IP of machine hosting sngtc_server/D500>:<Port of machine hosting sngtc_server/D500>
--> rtpip= <LAN IP of Asterisk 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
Start the Sngtc server on the box hosting the sngtc_server/D500, so that the sngtc server clients (this asterisk 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
Asterisk Routing Configuration
For the purpose of the rest of the discussion, Host A will represent this Asterisk server (sngtc client) and Host B will represent the server hosting the sngtc_server
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 serversA 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