Install Ilbc Codec Asterisk Definition

  • Main codecs used in VoIP. G711, G722, G723, G726, G728, G729, DVI, GSM, L16, LPC, Speex, ILBC showing the bit rate, sampling rate and frame size.
  • On asterisk you simply have to edit /etc/asterisk/sip.conf and place 'allow=g722' before all the other 'allow=' statements and reload asterisk. This will make asterisk try negotiate g722 before the other codec’s. Newer versions of FreePBX (introduced around v2.8) now have a feature for re-arranging the priority of codec’s.

That should run through without any issues, so now we’re going to tell Asterisk that we only want to build a very basic system (for the sake of time) and we want the iLBC codec. To enable the iLBC Codec you need to ensure in “4. Codec Translators” that “codecilbc” is checked. Note: When you press “Esc” to quit “make menuconfig. Asterisk 1.6.2 - Asterisk 1.8. The addition of G.719 pass-through support. RESAMPLE Codec: Asterisk 1.4 - Asterisk 1.6.0. Added a new codec translation module, codecresample, which re-samples signed linear audio between 8 kHz and 16 kHz to help support wideband codecs. ILBC Codec: Asterisk 1.4 - Asterisk 1.6.0. Step by step guide to install g729 codec of your asterisk pbx, this codec will help you improve voice quality.

Skip to end of metadataGo to start of metadata

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:

->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.


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 found here: tg3-3.112d.tar.gz

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:

Install ilbc codec asterisk definitions

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:

  1. 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.
  2. 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.
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)

Install Ilbc Codec Asterisk Definition

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.

This document is deprecated. This script is not maintained.
Please refer to Asterisk Install

aster-install is a shell script for Linux that will install Asterisk with the necessary add-ons for Asterisk to function with dahdi, faxing and Asterisk Analyser. The shell script is designed to run on a clean installation of CentOS based on the instructions CentOS_Installation.

What does aster-install install

aster-install will install the following components plus any dependencies:

  • Asterisk version 1.4.x or 1.6.x
  • DAHDi
  • g729 and g723 codec
  • iLBC codec
  • speex codec
  • openclose. Announce if office is closed, Out of Hours or Public holiday etc.
  • MySQL
  • spanDSP
  • agx-ast-addons if Asterisk 1.4.x selected (faxing)
  • fax2mail script
  • phpSysinfo
  • NTP time synchronisation
  • Backup script /opt/asterisk-backup. Saves backups to /usr/lib/asterisk/backups/
  • LDAPget. Asterisk 1.4.x only. Asterisk 1.6.x is currently not supported.
  • Cepstral Text-to-Speech engin
  • Option to install mpg123 for MOH

What does not get installed

To be implemented

  • Asterisk svn support.
  • WEB Callback and Voice Conferencing
  • Asterisk GUI. I'm currently thinking about implementing this but not 100% sure if I should.

How do I install and activate the script

To install the script copy and past the following lines to your Linux CLI

Install Ilbc Codec Asterisk Definition Free

Edit the file aster-values to suite your needs, then run aster-install.sh

aster-values is the data file that contains the version of the applications that you want to install.

Editing aster-values

Install Ilbc Codec Asterisk Definition

The file has the following sections:

  • Asterisk version
  • Codec type for sound files
  • MySQL user and database details
  • phpsysinfo
  • OS updates
  • Internode repository
  • email address for logwatch
  • spanDSP version
  • FOP version and username/password details

Once you open the file and look at its contents it becomes self explanatory.

Asterisk Functional

From the Linux CLI type in:

If you are entered into the Asterisk CLI then you know Asterisk has been installed correctly. If asterisk did not start it could possibly be the cause of an incompatible g729/3 codec. Edit aster-values and change the value of Install_g72x to equal no.

g729, g723 codec

If you see a dash under the g729 or g723 column then the codec is not installed.

Faxing

should give you a result like

CDR

should give a result like

WEB Sites

Using a WEB browser you should be able to connect to the WEB CDR Analyser and pspSysInfo

DAHDi

should give a result like

G729 Codec Bandwidth

LDAPget

Install Ilbc Codec Asterisk Definition Online

should give a result like

Install Ilbc Codec Asterisk Definitions

Retrieved from ‘https://klaverstyn.com.au/david/wiki/index.php?title=Aster-install&oldid=2000’