Asterisk + iLBC

Since Asterisk 1.4.19 (and also 1.6), the iLbc codec was removed due to licensing problems (It is not licensed for distribution). To enable it again, it is necessary to download its source code and tell to Asterisk to compile with it.

To do it manually, the instructions says:

run the contrib/scripts/get_ilbc_source.sh
run ‘make menuselect‘ and check the codec_iLBC option under Codec Translators.
compile/install Asterisk as usual
When using PADS you will need to modify the package/asterisk/asterisk.mk file to add the get_ilbc_souce.sh script in a way that it will be executed before the configure script. In addition, it is necessary to modify the get_ilbc_souce.sh to use the right path to download the iLbc source code.

You can look for the following code in asterisk.mk file:

$(ASTERISK_DIR)/.configured: $(ASTERISK_DIR)/.asterisk_unpacked $(ASTERISK_DIR)/.sounds_unpacked
cd $(ASTERISK_DIR); ./configure $(ASTERISK_CONFIGURE_OPTS)
touch $(ASTERISK_DIR)/.configured

Then you can add the following commands just before the configure call:

$(ASTERISK_DIR)/.configured: $(ASTERISK_DIR)/.asterisk_unpacked $(ASTERISK_DIR)/.sounds_unpacked
sed -i “s|codecs/ilbc|build_warp/asterisk/codecs/ilbc|” $(ASTERISK_DIR)/contrib/scripts/get_ilbc_source.sh
$(ASTERISK_DIR)/contrib/scripts/get_ilbc_source.sh
cd $(ASTERISK_DIR); ./configure $(ASTERISK_CONFIGURE_OPTS)
touch $(ASTERISK_DIR)/.configured

Note: The italic code above is all in a single line

Before compiling Asterisk again using PADS, you’ll need to enable the Asterisk menuconfig. To do this, you need to run the PADS ‘make menuconfig’ and check the Asterisk Custom Settings. This will open the Asterisk menu allowing you to set the iLBC codec as explained above.

When everything is done, a simple way to check if the codec was properly installed is to use the asterisk console command core “show translation”. It will show you a table like that with the iLbc code in:

g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
g723 — — — — — — — — — — — — —
gsm — — 6 6 12 6 5 28 — — 132 11 —
ulaw — 13 — 1 8 2 1 24 — — 128 7 —
alaw — 13 1 — 8 2 1 24 — — 128 7 —
g726aal2 — 17 6 6 — 6 5 28 — — 132 1 —
adpcm — 13 2 2 8 — 1 24 — — 128 7 —
slin — 12 1 1 7 1 — 23 — — 127 6 —
lpc10 — 27 16 16 22 16 15 — — — 142 21 —
g729 — — — — — — — — — — — — —
speex — — — — — — — — — — — — —
ilbc — 37 26 26 32 26 25 48 — — — 31 —
g722 — — — — — — — — — — — — —

marek comment:

As you can see from the large numbers in ‘core show translation’ for iLBC, iLBC can be quite CPU-intensive. This ultimately means that only a handful of ports using iLBC will run on appliance.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *