Internet Low Bitrate Codec (iLBC) is a royalty-free narrowband speech audio coding format and an open-source reference implementation (codec), developed by Global IP Solutions (GIPS) formerly Global IP Sound (acquired by Google Inc in 2011). Cd asterisk make clean make menuselect This will bring up a menu selection for Asterisk. Select item #4 Codec Translators. Scroll to codecilbc and check that box. Save (s) the selection and exit. Then do: make This re-compiles Asterisk and will take a little while. When it is done do: make install.
G.719:Asterisk 1.6.2 -> Asterisk 1.8You will have to enable iLBC in the Asterisk Sangoma codec configuration file.
Asterisk has bug that if you try to register 2 of the same codec it will crash :)
For that reason we are very careful as to what we include automatically.
You will have to edit the asterisk sangoma config file and enable iLBC (register=ilbc).
The same apply for any codec other than G729, by default only G729 is enabled in Asterisk and FreeSWITCH.
If you are hearing no audio during calls when the transcoder is being used, use the following command to determine if Asterisk/FreeSWITCH is processing Tx and Rx packets with the transcoder:
->Asterisk users:
->FreeSWITCH users:
If only the Rx packets are not incrementing, this means that the Tx packets are being sent to the transcoder, but the processed packets are not being returned back to Asterisk/FreeSWITCH. This scenario occurs when the Vocallo module inside the transcoder cannot find a real IP address for Asterisk/FreesWITCH in which to return the Rx packets to, and uses the local host address 127.0.0.1. The result is Rx packets being looped back to the vocallo module. To verify the local host address of your system ping $(HOSTNAME).
If the local host address of your system is 127.0.0.1, this issue can be resolved simply by editing the file:
->Asterisk users:
->FreeSWITCH users:
->Asterisk Users:
In the file add the following line:
-> rtpip= <network interface chosen for transcoder> (i.e. rtpip=10.1.1.1)
This will send the Rx packets up to the network interface of the transcoder, then Asterisk/FreeSWITCH will be able to receive the packets.
The final step is to reload the sangoma codec module in the CLI
->FreeSWITCH users:
In the file add the following line:
-> <param name='rtpip' value='10.1.1.1'/>
This line needs to be added in the <settings> tag of the xml file. See below for an example config.
If Asterisk encounters a codec being registered with a lower cost than one that already exists, it will crash with segmentation fault. This scenario occurs due to a bug in Asterisk, with more information provided here: http://issues.asterisk.org/view.php?id=17092.
The sangoma translator module is designed to prevent such an issue, only if it loads AFTER asterisk codec translators. Make sure that 'codec_sangoma.so' located in /usr/lib/asterisk/modules/ loads after all other codecs in that directory.
However, an easier way to resolve this issue, is to have Asterisk never load the translation paths that will be provided by the sangoma translator.
All Asterisk codecs are located in:
In order to do this edit:
and create 'noload' lines for all asterisk translator paths. (i.e. noload=>codec_g722.so)
Once Asterisk is restarted, in the CLI, you can type 'module show like codec' to view all other codecs loaded by asterisk
If Asterisk stops responding shortly after loading, it could be an issue with the firewall settings on your system. By default, the sngtc server is configured to listen on all network interfaces, however if you decide to specify the interface for the sngtc server, then the firewall must allow for communication between the sngtc server and the client (Asterisk/FreeSWITCH).
To check how the sngtc server is configured, run:
If you have not changed the default configuration, then the output of the above command should indicate that the sngtc_server is listening on 0.0.0.0. If the sngtc server is listening on another port, then make sure that port is allowed through the firewall.
If the issue persists after checking the above, the firewall might still be causing the issue, at which point, all firewall entries should be cleared. To check all firewall entries run:
To clear all entries in the firewall run:
then run
once more to confirm all firewall entries are cleared
Then restart Asterisk to determine if the issue is resolved
After installing the D100 PCIe card, if you notice system debug messages that say: 'Uhhuh. NMI received. Dazed and confused, but trying to continue', this is due to parity error. To resolve this issue, simply download and install the latest tg3 broadcom ethernet driver found here: tg3-3.112d.tar.gz
Reboot the system after the install
After installing the transcoder, asterisk may fail to load. After checking the asterisk logs (/var/log/asterisk/messages) you see the following messages:
ERROR[8124] res_config_ldap.c: No directory URL or host found
ERROR[8124] res_config_ldap.c: Cannot load LDAP RealTime driver.
ERROR[8124] codec_sangoma.c: Refusing to load this module with non-dahdi timing, please disable all res_timing_*.so modules and leave res_timing_dahdi.so as the only timing source in modules.conf
ERROR[8124] codec_sangoma.c: You can load this module with other timing sources by setting allownondahditiming=yes in sangoma_codec.conf general configuration section
To resolve this issue, follow either of the following two steps:
Then asterisk should load properly and all the codecs registered by the transcoder will begin to load
If the output of 'core show translation' in the Asterisk CLI indicates '999999' for all transcoding paths responsible by the Sangoma transcoder then the sngtc_server is not running.
You will also notice messages in the asterisk logs (/var/log/asterisk/messages):
ERROR[8269] codec_sangoma.c: Failed to create Sangoma transcoding session
WARNING[8269] translate.c: Translator 'sngalawtog729' appears to be broken and will probably fail.
ERROR[8269] codec_sangoma.c: Create Transcoding Session Error
To resolve this issue simply turn on the sngtc_server by typing the following in the Linux CLI:
-> sngtc_server_ctrl start
Then either reload codec_sangoma.so or restart Asterisk
running: 'sngtc_cfg --server' may result in the following messages:
[SNGTC_INFO ] Configuring Sangoma Transcoding Server
[SNGTC_INFO ] Configuring Sangoma Transcoding for Asterisk
[SNGTC_INFO ][SNGTC_INFO ][SNGTC_INFO ] Detecting Transcoding Card & Modules ...
[SNGTC_ERROR] sngtc_cfg: Failed to detect transcoding modules!
If the above messages appear, then the reason could be the following:
The system does not recognize the Sangoma transcoder as an Ethernet device, run:
and make sure the proper network driver is loaded (broadcom for PCIe or micrel for PCI). If the network driver is not present, please follow the network driver installation procedure.
The Ethernet interface for the Sangoma transcoder is not up. This can easily be verified by running the command:
If the Ethernet device is not present, type the command:
and located the Ethernet interface in question and then run:
(where X represents the Ethernet interface)
The Ethernet device corresponding to the Sangoma Transcoder does not have an IP address programmed. This can be easily verified by running the command:
(where X represents the interface brought up by the transcoder)
Program an IP address for the transcoder and re-run 'sngtc_cfg --server'
The cost values for the sangoma codecs in 'core show translations' will be very high compared to the asterisk codecs by design. When a Sangoma codec is registered, asterisk will be forced to use the Sangoma codec if a translation is required by that path, since only unique codec paths can be registered in asterisk. However, it is important that the Sangoma codecs are only used when a translation is required by that codec, and not used as an intermediate step for a translation for a separate codec. In order to implement this stipulation, the Sangoma codecs are registered with higher cost values relative to the loaded asterisk codecs, so that when a non-sangoma codec translation is required Asterisk will directly choose the asterisk codec and will not attempt to intermediately use a sangoma codec (the path of least resistance).
Testing the transcoder is easy. Ensure it is configured first as shown in the installation steps. Next simply copy and past the commands below onto your system and this will download a GSM file from our FTP then convert this to g729. Once the file is in g729 it will then be converted back to a wav file you can download and listen to.
Commands To Paste into Linux cli:
11. How to get a core dump of the transcoder
You only need to run the -getcore if you cannot ping/access the vocallo module. If you can ping and run at least 1 transcoding session (i.e. with sngtc_client) you will not get a core output.
1. Stop Asterisk and/or FreeSWITCH or anything else using the card.
2. Stop the sngtc server.
3. ifconfig ethx down && ifconfig ethx up
4. Run sngtc_tool with the -getcore option and save the core if any.
If you get the following, this means no core was generated from the vocallo:
[07:09:24:162] [SNGTC_ERROR] Failed to write core from module 1, this could mean there is no core file to read.
5. Start a pcap trace in the ethernet interface of the transcoding card. Make sure to provide the -s 0 option to not truncate packets and DO NOT capture udp packets (we're not interested in the RTP).
Change ethX to the interface in question. If you are using a D100 locally, this would be the Eth interface of the transcoder from 'ifconfig'
If using a D150 or transcoder is remote, use Eth connected to the lan (i.e. Eth0)
Change X.X.X.X to the IP address representing what you select to replace ethX
i.e. (D100 locally):
i.e. (D150):
6. Start the sngtc server and Asterisk/FreeSWITCH.
7. Reproduce the problem until the octasic errors are thrown or the card become unresponsive.
8. Stop Asterisk and/or FreeSWITCH or anything else using the card.
9. Stop the sngtc server.
10. Stop the pcap trace.
11. ifconfig ethx down && ifconfig ethx up
12. Run sngtc_tool with the -getcore option and check if a core was generated and save it if that's the case.