Transcode FAQ
- 1 1. While the wiki calls out iLBC as being supported, that codec does not appear in the list of translators?
- 2 2. When using the transcoder why do I hear no audio?
- 3 3. Why does Asterisk crash during load time when using the transcoder?
- 4 4. Why does Asterisk stop responding shortly after loading?
- 5 5. After installing the D100 PCI express card, I get NMI debug messages on my system
- 6 6. Why can't I start asterisk after setting up the Transcoder?
- 7 7. Why does the output of 'core show translation' in the Asterisk CLI indicate 999999 for the particular codecs I have enabled through the Sangoma transcoder?
- 8 8. Why does the "sngtc_cfg --server" fail during configuration?
- 9 9. Why does 'core show translation' in Asterisk indicate very high values for the sangoma codecs?
- 10 10.How can I test the transcoder?
1. While the wiki calls out iLBC as being supported, that codec does not appear in the list of translators?
You 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.
2. When using the transcoder why do I hear no audio?
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:
sangoma show rtp statistics |
->FreeSWITCH users:
sangoma_codec stats <session number> |
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:
/etc/asterisk/sangoma_codec.conf |
->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.
3. Why does Asterisk crash during load time when using the transcoder?
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
4. Why does Asterisk stop responding shortly after loading?
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
5. After installing the D100 PCI express card, I get NMI debug messages on my system
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.
Reboot the system after the install
6. Why can't I start asterisk after setting up the Transcoder?
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:
Edit modules.conf (typically located in /etc/asterisk/) and either comment out or create "noload=>" entries for all res_timing_*.so modules, accept for res_timing_dahdi.so.
Edit sangoma_codec.conf (typically located in /etc/asterisk/) and create an entry "allownondahditiming=yes"
Then asterisk should load properly and all the codecs registered by the transcoder will begin to load
7. Why does the output of 'core show translation' in the Asterisk CLI indicate 999999 for the particular codecs I have enabled through the Sangoma transcoder?
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
8. Why does the "sngtc_cfg --server" fail during configuration?
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"
9. Why does 'core show translation' in Asterisk indicate very high values for the sangoma codecs?
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).
10.How can I test the transcoder?
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.
Note 10.1.1.1 is the IP address of the transcoders network interface. If your IP is different replace 10.1.1.1 with the IP of your transcoder before pasting the commands into the Linux cli.
The output wav file will be called "demo-congrats-transcoded.wav".
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.
Stop Asterisk and/or FreeSWITCH or anything else using the card.
Stop the sngtc server.
ifconfig ethx down && ifconfig ethx up
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.
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):
Start the sngtc server and Asterisk/FreeSWITCH.
Reproduce the problem until the octasic errors are thrown or the card become unresponsive.
Stop Asterisk and/or FreeSWITCH or anything else using the card.
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.