Asterisk运行中报“ Unable to find a codec translation path from (g729) to (slin”错误解决办法

Asterisk 版本

Asterisk 11

问题描述:

新装了台通讯服务器,在打电话的过程中,都是还没出现通话就挂断了,于是查看了下日志记录,发现以下几条报警一直出现

vim /var/log/asterisk/messages
[May 10 22:30:08] WARNING[2491][C-00000003] channel.c: Unable to find a codec translation path from (g729) to (slin)
[May 10 22:30:08] WARNING[2491][C-00000003] res_musiconhold.c: Unable to open file '/var/lib/asterisk/moh/macroform-the_simplicity': No such file or directory
[May 10 22:30:08] WARNING[2491][C-00000003] channel.c: Unable to find a codec translation path from (g729) to (slin)
[May 10 22:30:08] WARNING[2491][C-00000003] res_musiconhold.c: Unable to open file '/var/lib/asterisk/moh/reno_project-system': No such file or directory
[May 10 22:30:08] WARNING[2491][C-00000003] channel.c: Unable to find a codec translation path from (g729) to (slin)
[May 10 22:30:08] WARNING[2491][C-00000003] res_musiconhold.c: Unable to open file '/var/lib/asterisk/moh/manolo_camp-morning_coffee': No such file or directory
[May 10 22:30:08] WARNING[2491][C-00000003] channel.c: Unable to find a codec translation path from (g729) to (slin)
[May 10 22:30:08] WARNING[2491][C-00000003] res_musiconhold.c: Unable to open file '/var/lib/asterisk/moh/macroform-cold_day': No such file or directory
[May 10 22:30:08] WARNING[2491][C-00000003] channel.c: Unable to find a codec translation path from (g729) to (slin)
[May 10 22:30:08] WARNING[2491][C-00000003] res_musiconhold.c: Unable to open file '/var/lib/asterisk/moh/macroform-robot_dity': No such file or directory
[May 10 22:30:08] VERBOSE[2491][C-00000003] res_musiconhold.c:     -- Stopped music on hold on SIP/siptrunk-00000004

解决方案

用谷歌搜了下,发现是音频转码失败,缺少 g729 语音编码,去 http://asterisk.hosting.lv/ 找到右边 Linux binariesAsterisk 11codec_g729-ast110-gcc4-glibc-x86_64-pentium4.so ,下载到服务器 /var/lib64/asterisk/module,重启 Asterisk,然后使用命令查看音频解码列表,发现 g729 加上去了,之后便能正常的打电话了。

cd /var/lib64/asterisk/module
wget http://asterisk.hosting.lv/bin/codec_g729-ast110-gcc4-glibc-x86_64-pentium4.so
mv codec_g729-ast110-gcc4-glibc-x86_64-pentium4.so codec_g729.so
[root@FJr-YZ-KVM-255-141 modules]#  asterisk -rx "module show "
Module                         Description                              Use Count 
.
.
.           
codec_g729.so                  g729 Coder/Decoder, based on Intel IPP   0  
.
.
.
[root@FJr-YZ-KVM-255-141 supdev]# asterisk -rx  'core show translation recalc 10'
         Recalculating Codec Translation (number of sample seconds: 10)

         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  g729  ilbc g726aal2  g722 slin16 testlaw slin12 slin24 slin32 slin44 slin48 slin96 slin192

     g729 15000 15000 15000 15000 15000  9000 15000     - 15000    15000 17250  17000   15000  17000  17000  17000  17000  17000  17000   17000

你可能感兴趣的:(Asterisk,Asterisk,小白成长记)