Asterisk安装和测试
asterisk+freepbx+astercrm的安装----lamp rpm安装

Linux下安装呼叫中心服务器(ASTERISK+FreePBX)一、环境要求:操作系统:centos 5.0以上(以最小化形式安装)Linux内核版本:2.6.22Asterisk版本:asterisk V.1.6.2.18FreePBX版本:FreePBX:2.9.0以rpm方式安装好的LAMP环境以root身份登录二、所需软件包/pub/telephony/asterisk/asterisk-1.6.2.1 8.tar.gz/freepbx-2.9.0.tar.gz三、安装步骤1、Lamp的安装下载所有软件包到/usr/local/src路径配置yum源,安装相关软件yum –y updateyum install –y httpd http-devel mysql mysql-devel mysql-server php php-devel php-mysqlyum install php5 php5-cli php5-mysql php-pear libapache2-mod-php5 php5-curl php5-gd php-dbyum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xmlyum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmpphp-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-develperl-DateManip sendmail-cf soxyum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano tftp-server httpd makencurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-develgtk2-devel subversion kernel-develyum install festival festival-devyum install ncurses-base ncurses-bin ncurses-term libncurses5 libncursesw5 libncurses5-dev libncursesw5-devyum install zlib1g zlib1g-devyum install bison bison-docyum install install libxml2 libxml2-devyum install libtiff4 libtiff4-devyum install libasound2 libgsm1 libltdl3 libpq4 libspeex1 libsqlite0 libtonezone1 libaudiofile0 libaudiofile-devyum install libnet-telnet-perl mime-construct libipc-signal-perl libmime-types-perl libproc-waitstat-perlmkdir /var/lib/mysqlchown –R mysql:mysql /var/lib/mysql/etc/init.d/httpd startchkconfig –level 35 httpd onmysql_install_dbchown –R mysql.mysql /var/lib/mysql/etc/init.d/mysqld startchkconfig –level 35 mysqld onmysqladmin –uroot password 123456 \\设置mysql密码为123456 cp /usr/share/doc/mysql-server-5.0.22/f /etc/f /etc/init.d/httpd restartvim /var/www/html/index.php测试一下:测试php连接apache : <? phpinfo(); ?>测试php连接mysql : vim /var/www/html/aaa.php<?php$link=mysql_connect("localhost","root","123456");if(!$link) echo "FAILD!";else echo "OK!";?>访问下即可。
centos6安装asterisk(TDM400P+WIFIPhone)

centos6安装asterisk(TDM400P+WIFIPhone)TDM400P是Digium公司出品的4端口模拟语音卡,电脑加上卡之后就能实现模拟语音网关的功能。
此卡在国内山寨的很多,taobao上到处都是。
asterisk则是一个免费开源的sip服务器。
最近在taobao山买了一块山寨卡,参考了网上众多的资料之后。
配合asterisk实现了模拟线和wifi手机之间的通话功能。
硬件安装买来的TDM400P是带2个FXO端口,2个FXS端口的。
黄色的模块是FXS模块。
黑色的模块是FXO模块。
这些模块其实都是可以拆卸的,可以灵活组合。
FXS的S就是station的意思。
表示一个站点,其实就电话机。
简称S口。
FXO的O就是Office的意思。
表示一个局端,相当于电话局给你提供的端口。
简称O口。
所以O口出来的线是要插到电话机上的。
S口是用来替换电话机的。
不要接错哦。
卡的右下角还有个4芯的D型电源插口,记得在安装卡的时候顺手把电源给接上。
否则是听不到拨号音的。
另外TDM400P这块卡只支持PCI2.2以上规格的插槽(只要不是特别老的主板,应该不会有问题)。
软件安装在centos下有2种方式可以安装:A.rpm包安装先添加Asterisk和Digium的Repositories# vi /etc/yum.repos.d/CentOS-Asterisk.repo[asterisk-tested]name=CentOS-$releasever - Asterisk - Testedbaseurl=/centos/$releasever/tested/$ basearch/enabled=0gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium[asterisk-current]name=CentOS-$releasever - Asterisk - Currentbaseurl=/centos/$releasever/current/ $basearch/enabled=1gpgcheck=0/admin/post.php?id=13 &upd=1#gpgkey=/RPM-GPG-KEY-Digium# vi /etc/yum.repos.d/CentOS-Digium.repo[digium-tested]name=CentOS-$releasever - Digium - Testedbaseurl=/centos/$releasever/tested/$ basearch/enabled=0/admin/post.php?id=13&u pd=1gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium[digium-current]name=CentOS-$releasever - Digium -Currentbaseurl=/centos/$releasever/current/$basearch/enabled=1gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium执行命令安装# yum install dahdi-linux dahdi-tools asterisk16 asterisk16-configs# chkconfig asterisk on用这种方法安装目前只能安装到asterisk1.6版。
AsteriskWin32

4.單擊Next, 4.單擊Next,
5.選擇安裝目錄,並單擊Next 5.選擇安裝目錄,並單擊Next
6.選擇Full installation和PBX New Installation 6.選擇Full installation和
7.You can create an desktop icon in this step
database put mgcpphone 333 aaln/1@192.168.1.254
5.SIP 測試 5.1 SIP 測試中moderm鍴的設置與之前的 設置 測試中moderm鍴的設置與之前的 步驟是一樣的 5.2 我們在callagent鍴,可以通過脩改sip.conf來 我們在callagent callagent鍴,可以通過脩改sip.conf sip.conf來 增加或者刪除電話號碼 5.3 打開sip.conf ,我們會看到幾組電話號碼, 打開sip.conf 格式如下圖:
AsteriskWin32使用指南 AsteriskWin32使用指南
安裝AsteriskWin32 安裝AsteriskWin32
1.雙擊AsteriskWin32-0.601.雙擊AsteriskWin32-0.60-Setup.exe
2.單擊Next,開始安裝 2.單擊Next,開始安裝
ห้องสมุดไป่ตู้
3.選擇 I accept the agreement,單擊Next
4.MGCP測試 4.MGCP測試 4.1 配置moderm 配置moderm voice mgcp config callagentaddr=192.168.1.00 voice mgcp config callagentport=2427 4.2 添加電話號碼到database 添加電話號碼到database 在GUI的CLI提示符后執行: GUI的CLI提示符后執行: database put mgcpphone 111 aaln/1@192.168.1.254 aaln/1@192.168.1.254 database put mgcpphone 222 aaln/2@192.168.1.254 aaln/2@192.168.1.254 4.3 添加mgcp 電話號碼 添加mgcp 脩改mgcp.conf,並添加至database 脩改mgcp.conf,並添加至database
Asterisk系统的安装与配置

Asterisk系统的安装与配置一、安装包装备asterisk1.8.7.1.tar.gzdahdi-linux-complete-2.6.1+2.6.1.tar.gzdahdi是Asterisk管理硬件的插件(中间件)二、安装dahdi 安装时需要下载东西,所以需要互联网1.tar zxvf dahdi-linux-complete-2.6.1+2.6.1.tar.gz2.cd dahdi-linux-complete-2.6.1+2.6.13.make all4.make install5.make config ;生成启动脚本/etc/init.d/dahdi6./etc/init.d/dahdi restart ;启动dahdi7.chkconfig dahdi on ;检查编译DAHDI时CONFLICTING TYPES FOR ‘BOOL’解决办法,google上面有,说是linux版本宏引起的。
三、安装asterisk1.tar zxvf asterisk1.8.7.1.tar.gz2.cd asterisk1.8.7.13../configure --build=i3864.;指定安装路径 ./configure --prefix=/usr/local5.make menuselect ;在配置界面选中meete应用6.make ;编译7.make install 安装Asterisk8.make samples ;安装配置文件模版/etc/asterisk下9.make progdocs ;安装Asterisk程序文档10.asterisk 启动四、配置SIP通道默认语言 /etc/asterisk/sip.conf[general]language=cn/enbindaddr=0.0.0.0 服务器IP五、配置基本SIP账户 /etc/asterisk/sip.conf1.CLI命令sip show userssip show peerssip show settingssip set debug on/offsip reload2.分机号码模板[SIPPHONE](!)type=friend 呼入呼出均可host=dynamic 分机号注册时获取contex=geeyavoip ; 分机号呼入时使用的上下文extensions.conf中的上下文nat=no 不支持natqualify=20003.使用号码模板定义分机号[301](SIPPHONE) ;继承SIPPHONE模板username=301accountcode=301directrtpsetup=yes aster工作在proxy,不修改sdp实现rtp透传;secret=301 ;无需密码则注释掉这句;directmidia=yes 媒体穿越nat NAT=yes;canreinvite = yes 与上面一行等效的to disable re-invites if you had NAT=yes六、配置电话会议室 /etc/asterisk/meete.conf[rooms] ;会议室号将作为拨号计划中 meetme参数conf => 1001 ;定义会议室号1001,无密码conf => 1002,918 ;定义会议室密码为918备注:拨号计划中调用meetme函数时,将进入会议桥,如需要密码,系统将提示输入会议室密码。
Asterisk安装和配置

1.安裝所需套件yum install gcc gcc-c++ kernel-devel zlib zlib-devel openssl openssl-devel2.下载asterisk、libpri、zaptelcd /usr/local/src/wgetwgetwget3.安装zapteltar -zxvf zaptel-.1.tar.gzcd /usr/local/src/zaptel-.1./configuremakemake installmodprobe zaptel4.安装libpritar -zxvf libpri-.tar.gzcd /usr/local/src/libpri-makemake install5.安装asterisktar -zxvf asterisk-.tar.gzcd /usr/local/src/asterisk-./configuremakemake installmake samplesasterisk -vvvc6.分机配置vim /etc/asterisk/sip.confSIP分机常用参数配置:[101] ;SIP分机注册账号callerid=ABC ;分机显示名称(可不设定)username=101 ;SIP再注册时要使用的账号(可不设定)type=friend ;连线的模式,一般话机设成friendsecret=101 ;分机注册密码qualify=yes ;验证模式,只有在type=peer时生效(可不设定)nat=yes ;是否在NAT下host=dynamic ;搜寻Client的模式,dynamic由话机主动去注册或者输入Hostname、IP由SIP Server去连线dtmfmode=rfc2833 ;按键信号模式,预设为rfc2833context=internal ;设定要用extensions.conf哪一组的动作canreinvite=no ;分机直通或由SIP连接callgroup=0 ;定义群组,可利用于群组广播....等(可不设定)pickupgroup=0 ;定义代接群组(可不设定)[102]username=102type=friendsecret=102qualify=yesnat=yeshost=dynamicdtmfmode=rfc2833context=internalcanreinvite=no7.设定接通动作vim /etc/asterisk/extensions.conf最后面加放设定[internal]exten => _X.,1,Dial(SIP/${EXTEN}|30) exten => _X.,n,Hangup()说明:_:代表开头X:代表0-9.:代表任意长度的字元_X.:电话以数字开始不限制长度Dial:接通SIP:线路模式SIP协议${EXTEN}:收到的号码30:只振玲等待30秒Hangup:挂断8.设定远端管理账号(依需求设定)vim /etc/asterisk/manager.confenabled = yes最后面增加[admin] secret=admin deny=.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user write =system,call,log,verbose,command,agent,user用telnet localhost 5038到asterisk的管理界面出现Asterisk Call Manager/1.0输入action: login <enter>username: admin <enter>secret: admin <enter><e。
Asterisk安装与配置

YES
Display
Name: 1001
Username:
1001
Authorization
User: 1001
Password:
test
Domain/Realm:
xx.xx.xx.xx ;Asterisk服务器地址
SIP
Proxy: xx.xx.xx.xx ;Astersk服务器地址
Asterisk应该搭配数据库,不然从语音邮箱考虑,存储都是个问题。。。。
�
=> 1234, qiong,
[email=qiong@asterisk-server]qiong@asterisk-server[/email]
1002
=> 1234, ddd,
[email=ddd@astersik-server]ddd@astersik-server[/email]
kernel-smp-devel--zaptel
gcc-c++--asterisk
openssl-devel--asterisk
newt-devel--zaptel
zlib-devel--asterisk
unixODBC-devel--asterisk
libtool--asterisk
#
make config ;对于REDHAT系列系统,可将asterisk添加到/etc/rc.d/init.d中
#
make samples ;安装配置文件
3、Asterisk简易配置
make--asterisk
注:很多包在安装光盘中都有,不需要再下载。
Asterisk安装与配置

Asterisk安装与配置1.安裝所需套件yum install gcc gcc-c++ kernel-devel zlib zlib-devel openssl openssl-devel2.下载asterisk、libpri、zaptelcd /usr/local/src/wget /pub/asterisk/releases/asterisk-1.4.22.tar.gzwget /pub/libpri/libpri-1.4.7.tar.gzwget /pub/zaptel/zaptel-1.4.12.1.tar.gz3.安装zapteltar -zxvf zaptel-1.4.12.1.tar.gzcd /usr/local/src/zaptel-1.4.12.1./configuremakemake installmodprobe zaptel4.安装libpritar -zxvf libpri-1.4.7.tar.gzcd /usr/local/src/libpri-1.4.7makemake install5.安装asterisktar -zxvf asterisk-1.4.22.tar.gzcd /usr/local/src/asterisk-1.4.22./configuremakemake installmake samplesasterisk -vvvc6.分机配置vim /etc/asterisk/sip.confSIP分机常用参数配置:[101] ;SIP分机注册账号callerid=ABC ;分机显示名称(可不设定)username=101 ;SIP再注册时要使用的账号(可不设定)type=friend ;连线的模式,一般话机设成friendsecret=101 ;分机注册密码qualify=yes ;验证模式,只有在type=peer时生效(可不设定)nat=yes ;是否在NAT下host=dynamic ;搜寻Client的模式,dynamic由话机主动去注册或者输入Hostname、IP由SIP Server去连线dtmfmode=rfc2833 ;按键信号模式,预设为rfc2833context=internal ;设定要用extensions.conf哪一组的动作canreinvite=no ;分机直通或由SIP连接callgroup=0 ;定义群组,可利用于群组广播....等(可不设定)pickupgroup=0 ;定义代接群组(可不设定)[102]username=102type=friendsecret=102qualify=yesnat=yeshost=dynamicdtmfmode=rfc2833context=internalcanreinvite=no7.设定接通动作vim /etc/asterisk/extensions.conf最后面加放设定[internal]exten => _X.,1,Dial(SIP/${EXTEN}|30) exten => _X.,n,Hangup()说明:_:代表开头X:代表0-9.:代表任意长度的字元_X.:电话以数字开始不限制长度Dial:接通SIP:线路模式SIP协议${EXTEN}:收到的号码30:只振玲等待30秒Hangup:挂断8.设定远端管理账号(依需求设定)vim /etc/asterisk/manager.conf enabled = yes最后面增加[admin] secret=admin deny=0.0.0.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user write = system,call,log,verbose,command,agent,user用telnet localhost 5038到asterisk的管理界面出现Asterisk Call Manager/1.0输入action: login <enter>username: admin <enter>secret: admin <enter><e。
asterisk,mysql,freepbx完整安装手册

asterisk,mysql,freepbx完整安装手册1 Install Asterisk server1.1 Install CentOS 5.3Description :CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible.●Need install Web Server , Mail Server , MySQL Database , Development T ools●Enable W eb server, Mail server, MySql Database, Development tools.●Disable firewall, SElinux.●Config your network, make sure you can connect to the internet.1.2 Update your system#yum -y update1.3 Install dependencies and extra packages# yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear php-pear-DB php-gd php-mysqlphp-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf1.4 Install lame-3.97Description :LAME is an educational tool to be used for learning about MP3 encoding. The goal of the LAME project is to use the opensource model to improve the psycho acoustics, noise shaping and speed of MP3. LAME is not for everyone - it is distributed as source code only and requires the ability to use a C compiler. However, many popular ripping and encoding programs include the LAME encoding engine.# cd /usr/src# wget /doc/945198382.html,/sourceforge/lame/l ame-3.97.tar.gz# tar zxvf lame-3.97.tar.gz# cd lame-3.97# ./configure# make# make install1.5 Install libpriDescription :libpri is a C implementation of the Primary Rate ISDN specification. It wasbased on the Bellcore specification SR-NWT-002343 for National ISDN. As ofMay 12, 2001, it has been tested work with NI-2, Nortel DMS-100, andLucent 5E Custom protocols on switches from Nortel and Lucent.# cd /usr/src# wget /doc/945198382.html,/pub/libpri/libpri-1.4-current.tar.gz# tar zxvf libpri-1.4-current.tar.gz# cd libpri-1.4.10/# make# make install1.6 Install mpg123The mpg123 is make for the “music on hold” module to up custom *.mp3 or *.wav file to PBX.#tar xvf mpg123-1.9.0.tar.bz2#./configure#make#make install1.7 Install Dahdi / Dahdi-toolsDescription :Dahdi is a short for ZAPata TELephony.This packet is the drive of the Digital Cards# cd /usr/src# download dahdi-linux-current.tar.gz dahdi-tools-current.tar.gz# tar zxvf dahdi-linux-2.2.0.2# cd zaptel-1.4.12.1# make# make install# cd .# . tar zxvf dahdi-tools-current.tar.gz# ./configure# make# make install# make config/etc/init.d/dahdi start# echo "/etc/init.d/dahdi start" >> /etc/rc.d/rc.local# dahdi_genconf //check the TDM400P board automatic#copy dahdi_channels.conf content to chan_dahdi.conf# dahdi_cfg –vv1.8 Install asterisk1.7.1 Install asterisk-1.6.1.4Description :Asterisk is the world's leading open source PBXi, telephony engine, and telephony applications toolkit. Offering flexibility unheard of in the world of proprietary communications, Asterisk empowers developers and integrators to create advanced communication solutions...for free.# cd /usr/src# 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/# sed -i "s/User apache/User asterisk/" /etc/httpd/conf/httpd.conf# sed -i "s/Group apache/Group asterisk/" /etc/httpd/conf/httpd.conf# sed -i "s/AllowOverride None/AllowOverride All/" /etc/httpd/conf/httpd.conf# download asterisk-1.6.1.4.tar.gz# tar zxvf asterisk/asterisk-1.6.1.4.tar.gz# cd asterisk-1.6.1.4# ./configure# make# make install# make samples# make config1.7.2 Install asterisk-addons-1.6.1.1Description :This package contains additional modules for Asterisk which are, for one reasonor another, not included in the normal base distribution. Many of thesemodules are experimental.# cd /usr/src# download asterisk-addons-1.6.1-current.tar.gz# tar zxvf asterisk-addons-1.6.1-current.tar.gz# cd asterisk-addons-1.6.1.1# ./configure# make# make install# make samples1.7.3 Install asterisk-soundsDescription :This packet is not for hardware dependency. It’s just the necessary packet (Include many sound file) for asterisk server.Download the packet asterisk-sounds-1.2.1.tar.gz# cd /usr/src# tar zxvf asterisk-sounds-1.2.1.tar.gz# cd asterisk-sounds-1.2.1# make install1.9 Install FreePBXDescription :FreePBX is for both developers and people searching for a Business Phone System (or a really fancy home one).# cd /usr/src# wget/doc/945198382.html,/sourceforge/ampo rtal/freepbx-2.3.1.tar.gz# tar zxvf freepbx-2.5.0.tar.gz# cd freepbx-2.5.0# service httpd start# service mysqld start# chkconfig httpd on# chkconfig mysqld on1.9.1 Config MySql# mysqladmin create asterisk# mysqladmin create asteriskcdrdb# mysql asterisk < SQL/newinstall.sql# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql# mysql# GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'occvoip';# GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'occvoip';# mysqladmin -u root password 'occvoip'1.9.2 Install freepbx# vi /etc/asterisk/asterisk.conf++++++++++++++++++++++++++++++++Modify [directories](!) ==> [directories]Modify /var/run ==> /var/run/asterisk++++++++++++++++++++++++++++++++# cd /usr/src/freepbx-2.5.0# ./start_asterisk start# ./install_amp --username=asteriskuser --password=occvoip# echo /usr/local/sbin/amportal start >> /etc/rc.localOpen browser to http://ipaddressofpbx#Click the FreePBX Administration to config the FreePBX. Then click Apply configuration changes.Download modules.: click Module Admin to download this modules:Feature codeVoicemailPhonebook Directory toolPhonebookSpeed dialDay night modeIVRFollow meRing groupCall ForwardCall WaitingCallbackConferencesDo-Not-Disturb (DND)Info ServicesannouncementMisc ApplicationsMisc DestinationsMusic on HoldPIN SetsParking lotAsterisk Info toolCustom Applications tool# reboot1.10 Open browser to http://ipaddressofpbxClick the FreePBX Administration to config the FreePBX.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Asterisk安装(红色字体部分为需要键入或修改的部分)下载准备系统环境:Linux CentOS 5.0,安装开发工具以及开发库。
Asterisk 源代码包asterisk-1.6.1.20.tar.gz,版本:1.6.1.20。
SIP软电话使用eyebeam 版本:1.5.8。
1.切换用户(需要输入管理员密码),执行su root2.进入源码包存放文件夹[root@asterisk-test1 ~]#cd /usr/local/src3.下载[root@asterisk-test1 ~]#wget/pub/telephony/asterisk/releases/asterisk1.6.1.20.tar.gz编译安装Asterisk1.解压源代码包[root@asterisk-test1 ~]# tar -zxvf asterisk-1.6.1.20.tar.gz2.进入包目录[root@asterisk-test1 ~]# cd asterisk-1.6.1.203.环境检测和预配置[root@asterisk-test1 asterisk-1.4.5]# ./configure(其实这样直接进行configure并非十分规范。
应当先使用“./configure –help”命令来查看一些可用的选项和参数,然后根据实际情况才进行定制操作。
)当环境预检测和预配置工作做完时,最后会显示以上反馈信息。
并且建立好Makefile。
注意:系统如果缺少安装必须的包,此步骤可能会出现configure: error错误,解决方案见后文可能遇到的问题configure: creating ./config.statusconfig.status: creating build_tools/menuselect-depsconfig.status: creating makeoptsconfig.status: creating channels/h323/Makefileconfig.status: creating include/asterisk/autoconfig.h.$$$$$$$$$$$$$$$=...$7$7.. .7$$7:..$$:. ,$7.7.$7. 7$$$$ .$$77..$$. $$$$$ .$$$7..7$ .?. $$$$$ .?. 7$$$.$.$. .$$$7. $$$$7 .7$$$. .$$$..777. .$$$$$$77$$$77$$$$$7. $$$,$$$~ .7$$$$$$$$$$$$$7. .$$$..$$7 .7$$$$$$$7: ?$$$.$$$ ?7$$$$$$$$$$I .$$$7$$$ .7$$$$$$$$$$$$$$$$ $$$.$$$ $$$$$$7$$$$$$$$$$$$ .$$$.$$$ $$$ 7$$$7 .$$$ .$$$.$$$$ $$$$7 .$$$.7$$$7 7$$$$ 7$$$$$$$$ $$$$$$$7. $$ (TM)$$$$$$$. .7$$$$$$ $$$$$$$$$$$$$$7$$$$$$$$$.$$$$$$$$$$$$$$$$$$$$$$.configure: Package configured for:configure: OS type : linux-gnuconfigure: Host CPU : i6864.清除陈旧的已编译文件[root@asterisk-test1 asterisk-1.4.5]# make clean5.重新编译Asterisk程序[root@asterisk-test1 asterisk-1.4.5]# make编译完成后会显示以下反馈提示信息,提示用户进行下一步可选的操作。
+--------- Asterisk Build Complete ---------++ Asterisk has successfully been built, and ++ can be installed by running: ++ ++ make install ++-------------------------------------------+这里提示用户下一步可以使用“make install”命令,来进行安装了。
6.安装Asterisk程序[root@asterisk-test1 asterisk-1.4.5]# make install当安装完成后就会显示以下反馈提示信息,提示用户进行进一步可选的操作。
+---- Asterisk Installation Complete -------++ ++ YOU MUST READ THE SECURITY DOCUMENT ++ ++ Asterisk has successfully been installed. ++ If you would like to install the sample ++ configuration files (overwriting any ++ existing config files), run: ++++ make samples ++++-----------------or ---------------------++ ++ You can go ahead and install the asterisk ++ program documentation now or later run: ++ ++ make progdocs ++ ++ **Note** This requires that you have ++ doxygen installed on your local system ++-------------------------------------------+这里提示用户还能够有2种可选的操作分别是通过“make samples”来安装配置模版,以及通过“make progdocs”来安装一些程序文档。
7.安装配置模版:[root@asterisk-test1 asterisk-1.4.5]# make samples通过这个命令会安装Asterisk的配置文件模版,当然不会有强大的现成的配置,但确实是相当有帮助的,是配置过程中的重要参考。
8.还可以安装网页语音信箱:(这里暂时没有用到,可以不安装)[root@asterisk-test1 asterisk-1.4.5]# make webvmail安装页面语音信箱,会试图和Apache这种网站服务进行配合,当然还需要许多定制配置。
这里暂时不会用到,但还是觉得应该提一下。
+--------- Asterisk Web V oicemail ----------++ ++ Asterisk Web V oicemail is installed in ++ your cgi-bin directory: ++ /var/www/cgi-bin+ IT USES A SETUID ROOT PERL SCRIPT, SO ++ IF YOU DON'T LIKE THA T, UNINSTALL IT!++ ++ Other static items have been stored in: ++ /var/www/html+ ++ If these paths do not match your httpd ++ installation, correct the definitions ++ in your Makefile of HTTP_CGIDIR and ++ HTTP_DOCSDIR ++ ++-------------------------------------------+编辑Asterisk的配置文件Asterisk 的体系比较巨大,目前只是稍微的了解一下,所以只是做了最最最简单的测试配置,为了通过SIP协议使两个终端注册上来并互相呼叫通话而已,因此配置相当有限,仅仅是为了初步的测试而已。
还有一个地方要注意的是在Asterisk配置文件中的注释符是采用“;”分号的,而不是其他符号。
1.编辑Asterisk的主配置文件:[root@asterisk-test1 ~]# vi /etc/asterisk/asterisk.conf主配置文件是Asterisk的关键部分,这个主配置文件大多数都是为Asterisk指定了环境、调用的路径。
一般情况下不需要去改动它,这里贴出来先看看。
[directories]小节directories主要记录Asterisk的几个重要调用路径astetcdir => /etc/asterisk指定了配置文件路径。
astmoddir => /usr/lib/asterisk/modules指定了模块调用路径。
astvarlibdir => /var/lib/asteriskastdatadir => /var/lib/asterisk指定了本地数据库以及一些重要相关部件的路径。
astagidir => /var/lib/asterisk/agi-bin指定了AGI程序的调用路径。
astspooldir => /var/spool/asterisk指定了呼叫信息记录存放的路径。
astrundir => /var/run指定了PID文件路径。
astlogdir => /var/log/asterisk指定了日志路径。
;[options];internal_timing = yes;systemname = my_system_name ; prefix uniqueid with a system name forglobal uniqueness issues; Changing the following lines may compromise your security.;[files];astctlpermissions = 0660;astctlowner = root;astctlgroup = apache;astctl = asterisk.ctl小节options中记录的都是Asterisk一些可选的设置信息,务必要根据实际情况修改,这里我就先不做变动了。
2.配置SIP对象配置文件:[root@asterisk-test1 ~]# vi /etc/asterisk/sip.conf;; SIP Configuration example for Asterisk;; Syntax for specifying a SIP device in extensions.conf is; SIP/devicename where devicename is defined in a section below.;; You may also use; SIP/username@domain to call any SIP user on the Internet; (Don't forget to enable DNS SRV records if you want to use this);; If you define a SIP proxy as a peer below, you may call; SIP/proxyhostname/user or SIP/user@proxyhostname; where the proxyhostname is defined in a section below;; Useful CLI commands to check peers/users:;这里注释的部分中还提供一些关于SIP部分的调试命令。