为什么我要安装比较老的asterisk-1.8.10.1,而不是更加新的稳定版本?
因为我还要加AMR-NB audio codec。
参考文档:http://www.venturevoip.com/How-to-asterisk.1.8_SRTPTLS_snom300_pgsm.pdf
CentOS用户准备:
useradd asterisk
1.下载CentOS 5.8
国内高速下载
http://mirrors.163.com/centos/5.8/isos/i386/CentOS-5.8-i386-bin-DVD-1of2.iso2.Windows XP上用Vmware Player安装CentOS虚拟机
4.wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.10.1.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.gz6.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
CFLAGS="-Wall -O4 -fexpensive-optimizations -funroll-loops -fPIC"
./configure --prefix=/usrsu -
cd /usr/src/srtp
-否则make runtest报错: rtpw_test.sh: line 27: rtpw: command not found
--------------------------------------------------
24. make all
出错处理:You do not appear to have the sources for the 2.6.18-308.el5 kernel installed.
uname -r
2.6.18-308.el5
cd /lib/modules/
看到下面有 2.6.18-308.11.1.el5 2.6.18-308.el5
cd /lib/modules/2.6.18-308.el5
重新创建build link
rm build
ln -s ../../../usr/src/kernels/2.6.18-308.11.1.el5-i686/ build
解决办法2:
# yum -y install kernel-devel-`uname -r`
屏幕提示:
/sbin/chkconfig --add dahdi
DAHDI has been configured.
List of detected DAHDI devices:
pci:0000:03:0c.0 wcfxo- 1057:5608 Wildcard X100P
run 'dahdi_genconf modules' to load support for only
the DAHDI hardware installed in this system. By
default support for all DAHDI hardware is loaded at
DAHDI start.
27. cd ../libpri-1.4.11.4
(now we are in /usr/src/libpri-1.4.11.4)
28. make30.Time to copmpile Asterisk
注:yum install ncurses-devel (make menuconfig要这个包)
cd asterisk-1.8.10.1
contrib/scripts/install_prereq install
注意:如要mp3,需要执行下面操作
yum install subversion
contrib/scripts/get_mp3_source.sh
注意:如要ilbc codec,需要执行下面操作
contrib/scripts/get_ilbc_source.sh
cd codec/ilbc/
看到里面只有几个文件
extract-cfile.awk rfc3951.txt
拷贝 http://ilbcfreeware.org/documentation/extract-cfile.txt
内容到extract-cfile.awk
awk -f extract-cfile.awk rfc3951.txt
这将在这个目录下面产生几十个文件。
参考:
http://www.telecom-cafe.com/forum/viewthread.php?tid=3992
31. cd ../../
./configure --with-bluetooth
32. make menuconfig (add-on 选择chan_mobile, format_mp3, res_config_mysql, EXTRAS-SOUNDS-EN-GSM )
Running this command will be show the following menu :
33. make
34. make install
35. make config netstat -na|grep 506
udp 0 0 0.0.0.0:5060 0.0.0.0:*
Stop Asterisk
39. service asterisk stop52. asterisk -rvvvvvvvvvvv
core show codecs
================================
CentOS后记:
设置runlevel 3
编辑/etc/inittab
id:3:initdefault:
安装vncserver
yum install vnc
================================
每小时reboot一次:
cd /etc/cron.hourly/
touch reboot
chmod 777 reboot
#!/bin/sh
/sbin/reboot
================================
关闭Ubuntu 防火墙
# service iptables save
# service iptables stop
# chkconfig iptables off
================================
启用amr codec
vi sip_general_additional.conf
修改
disallow=all
allow=ulaw
allow=alaw
为
allow=all
重新启动Asterisk
================================http://blog.csdn.net/berryreload/article/details/7403267
后续:
CentOS 5.8 asterisk-1.8.10.1 安装之二:安装freepbx