利用开源软件30分钟搭建自己的voip网络电话系统 大家可以根据以下文档在30分钟内就能搭建一个功能强大的voip网络电话系统,在此基础上还可以增加网络电子传真功能,功能非常强大,很实用。 简单介绍: Asterisk是一款实现電話用户交换机(PBX)功能的自由软件、开源软件。Asterisk提供完善PBX功能,可以连接多种不同的电话终端,包括普通电话机,IP电话机,软电话等,支持多种主流的IP电话协议和系统接口。Asterisk提供给用户一个廉价并功能强大的PBX解决方案。它被越来越多的用于代替传统专用的PBX,或被用于跨国VoIP电话以节省长途费用。由于Asterisk过于专业,所以目前也存在大量的基于Asterisk开发的容易使用的通信系统,比如在欧美比较流行的elastix、 trixbox、或以中文为基础的Freeiris等。 环境: centos 5.4 asterisk 1.4.31 freePBX 2.7.0 httpd php5 1.下载地址: cd /usr/src wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.31.tar.gz wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.4.11.tar.gz wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.3.0+2.3.0.tar.gz wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.2.tar.gz wget http://downloads.asterisk.org/pub/telephony/libss7/releases/libss7-1.0.2.tar.gz wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz?use_mirror=nchc wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz wget http://mirror.freepbx.org/freepbx-2.7.0.tar.gz 2.安装依赖包 yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp httpd mysql-server mysql php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf sox cd /usr/src tar zxvf lame-398-4.tar.gz cd lame-398-4 ./configure make && make install 3.安装asterisk和freePBX cd /usr/src tar xvzf dahdi-linux-complete-2.3.0.2+2.3.0.tar.gz tar xvzf asterisk-1.4.31.tar.gz tar xvzf libpri-1.4.10.2.tar.gz tar xvzf asterisk-addons-1.4.11.tar.gz tar xvzf freepbx-2.7.0.tar.gz mkdir -p /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds tar xvzf /usr/src/asterisk-extra-sounds-en-gsm-current.tar.gz cd /usr/src/dahdi-linux-complete-2.3.0.2+2.3.0 make && make install make config cd /usr/src/libpri-1.4.10.2 make clean make && make install cd /usr/src/asterisk-1.4.31 useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk mkdir /var/run/asterisk mkdir /var/log/asterisk chown -R asterisk:asterisk /var/run/asterisk chown -R asterisk:asterisk /var/log/asterisk chown -R asterisk:asterisk /var/lib/php/session/ ./configure make && make install make samples cd /usr/src/freepbx-2.7.0 mysqladmin -uroot -p create asterisk mysqladmin -uroot -p create asteriskcdrdb mysql -uroot -p asterisk < SQL/newinstall.sql mysql -uroot -p asteriskcdrdb < SQL/cdr_mysql_table.sql mysql -uroot -p GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘SOMEPASSWORD’; GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘SOMEPASSWORD’; flush privileges; \q cd /usr/src/asterisk-addons-1.4.11 ./configure make && make install cd /usr/src/freepbx-2.7.0 ./start_asterisk start ./install_amp –username=asteriskuser –password=SOMEPASSWORD 访问web进行配置 完成! |