`
weimou66
  • 浏览: 1244687 次
文章分类
社区版块
存档分类
最新评论

安装 asterisk-1.8.0-rc2,添加AMR-NB audio codec

 
阅读更多

为什么我要安装2010年的Asterisk 1.8 rc2,而不是更加新的稳定版本?

因为我还要加AMR-NBaudio codec。

参考文档:http://www.venturevoip.com/How-to-asterisk.1.8_SRTPTLS_snom300_pgsm.pdf


1.下载CentOS 5.8

国内高速下载

http://mirrors.163.com/centos/5.8/isos/i386/CentOS-5.8-i386-bin-DVD-1of2.iso
http://mirrors.163.com/centos/5.8/isos/i386/CentOS-5.8-i386-bin-DVD-2of2.iso


2.Windows XP上用Vmware Player安装CentOS虚拟机


3.Download Asterisk , DAHDI, libpri, libSRTP. First got to /usr/src/ directory
su -
cd /usr/src
4.wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.8.0-rc2.tar.gz
可能是因为我的CentOS比较新,所以要高于2.4版本的dahdi
5.wget http://downloads.Asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.5.0.2+2.5.0.2.tar.gz
6.wget http://downloads.Asterisk.org/pub/telephony/libpri/releases/libpri-1.4.11.4.tar.gz
7.wget http://sourceforge.net/projects/srtp/files/srtp/1.4.4/srtp-1.4.4.tgz/download

8.
yum -y install kernel-devel gcc make gcc-c++ libxml2-devel pkgconfig zlib-devel
yum -y install openssl-devel ncurses-devel autoconf automake libtool zip unzip


Extract Asterisk & DAHDi & libpri & libsrtp
9.
tar -xzvf asterisk-1.8.0-rc2.tar.gz
10.
tar -xzvf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
11.
tar -xzvf libpri-1.4.11.4.tar.gz
12.
tar -xzvf srtp-1.4.4.tgz


Compile srtp, dahdi , libpri and Asterisk (the compilations order is important)
13. cd /usr/src/srtp
14.
./configure --prefix=/usr
15. make
16.
--否则make runtest报错: rtpw_test.sh: line 27: rtpw: command not found
vi /home/jiyang/.bash_profile
修改PATH=$PATH:$HOME/bin
为 PATH=$PATH:$HOME/bin:.

su -
make runtest
17. make install
18. make clean

19.

CFLAGS="-Wall -O4 -fexpensive-optimizations -funroll-loops -fPIC"

./configure --prefix=/usr
20. make
21. make runtest
22. make install


Time to compile dahdi
23. cd ../ dahdi-linux-complete-2.5.0.2+2.5.0.2
24. make all
25. make install
26. make config


Time to compile libpri
27. cd ../libpri-1.4.11.4 (now we are in /usr/src/libpri-1.4.11.4)
28. make
29. make install



Time to copmpile Asterisk
30. cd ../asterisk-1.8.0-rc2
31.
./configure
32. make menuconfig
Running this command will be show the following menu :


asterisk compilation step.
33. make
34. make install
35. make config
36. make samples (this command will generate sample configuration files for Asterisk, under /etc/Asterisk/ folder)


37. service dahdi start
38. service asterisk start


Add AMR codec support
Before start to configure Asterisk, we would like to add one more tool, we reallly need to use ARM-NB codec (AdaptiveMultirate-Codec Ultra Narrow Band) in conjunction with PrivateGSM Enterprise on a mobile phone to get the best voice quality
using mobile internet connections.
Please consider that G.729 codec does not work for mobile network connections in a reliable way, for example it does not work
over GPRS or in degraded network conditions (that on a mobile, means often).
Be sure to read notes on licensing at the end of this howto in order to properly license the AMR codec.


Stop Asterisk

39. service asterisk stop
We go back to /usr/src/ folder,download the Asterisk-amr patch.
40. cd /usr/src/


Download Asterisk-amr patch
41. wget http://sourceforge.net/projects/asterisk-amr/files/1.8.0-rc2_asterisk_amr_patch.diff/download


Apply the patch for AMR codec
42. cd asterisk-1.8.0-rc2/ && patch -p2 < ../1.8.0-rc2_asterisk_amr_patch.diff


Go to asterisk-1.8.0-rc2/codecs/amr/ folder
43. cd ../asterisk-1.8.0-rc2/codecs/amr/
Download AMR codec from 3GPP site
44. wget http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-700.zip
45. unzip -j 26104-700.zip
46. unzip -j 26104-700_ANSI_C_source_code.zip
go back to Asterisk folder /usr/src/asterisk-1.8.0-rc2
47. cd ../.. /..


48. wget http://sourceforge.net/projects/asterisk-amr/files/1.8.0-rc2_crypto_offer.diff/download
Apply the patch
49. cd asterisk-1.8.0-rc2/ && patch -p2 < ../1.8.0-rc2_crypto_offer.diff

Go to asterisk-1.8.0-rc2/ folder
50.
50. cd ..
Recompile Asterisk ,
51. make ; make install



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics