asterisk -安装、配置 (Linux)

本文详细介绍了在Linux环境下从源码安装Asterisk PBX系统的全过程,包括获取安装包、解压配置、解决依赖错误及最终的安装步骤。通过遵循这些步骤,读者将能成功搭建自己的Asterisk电话交换平台。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、获取asterisk安装包

  1.  sudo apt-get install wget (如果有可以忽略这一步)
 2.  wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-17-current.tar.gz( 目前最新版本为17.1.0) 
        想要其他版本可以去  https://downloads.asterisk.org/pub/telephony/asterisk  参考

二、解压配置
1. [root@~]# tar -zxvf asterisk-17-current.tar.gz // 解压asterisk安装包
2.[root@~]# cd cd asterisk-17.1.0/ // 进入asterisk安装包
3.[root@asterisk asterisk-17.1.0]# ./configure // 环境检测和预配置

下面是我出现的错误 ,可能有所不同 但一般来说就是缺少工具,提示你安装工具包罢了

4.[root@asterisk asterisk-17.1.0]#  ./configure
    [root@asterisk asterisk-17.1.0]# Please install the ‘libedit’ development package 
                        解决方法  :          apt-get install libedit-dev
5.[root@asterisk asterisk-17.1.0]#  ./configure
    [root@asterisk asterisk-17.1.0]#   configure: error: *** uuid support not found (this typically means the uuid development package is missing)
                        解决方法:            apt-get install uuid-dev
6.[root@asterisk asterisk-17.1.0]#  ./configure    
    [root@asterisk asterisk-17.1.0]# configure: *** Asterisk requires libjansson >= 2.11 and no system copy was found.
                                                 configure: *** Please install the 'libjansson' development package or
                                                 configure: *** use './configure --with-jansson-bundled'

                        解决方法:            ./configure --with-jansson-bundled (这个错误可能后面还会出现几次 出现就用这个解决方法就可以了)

 7.[root@asterisk asterisk-17.1.0]#  ./configure --with-jansson-bundled
   [root@asterisk asterisk-17.1.0]# configure: *** The Asterisk menuselect tool requires the 'libxml2' development package.
                                                configure: *** Please install the 'libxml2' development package.

                        解决方法:            apt-get install libxml2-dev


8.[root@asterisk asterisk-17.1.0]#   ./configure --with-jansson-bundled
    [root@asterisk asterisk-17.1.0]# configure: error: *** Asterisk now uses SQLite3 for the internal Asterisk database.

                        解决方法:               apt-get install libsqlite3-dev

出现如下图就代表配置成功了
在这里插入图片描述
三、安装asterisk

1.[root@asterisk asterisk-17.1.0]# make        

在这里插入图片描述
make 成功后提示你输入make install
2.[root@asterisk asterisk-17.1.0]# make install
在这里插入图片描述
这里提示用户还能够有2种可选的操作分别是通过“make samples”来安装配置模版,以及通过“make progdocs”来安装一些程序文档。

2.[root@asterisk asterisk-17.1.0]# make samples
这个时候,在/etc/asterisk目录下会建立一些文件,最主要的有sip.conf、extensions.conf 这两个。

至此安装完成!!!

安装完CenterOS5.4 系统登陆后进到#号下,一般我们选择/usr/src目录进行下载及安装: cd /usr/src //安装开发环境及编绎环境: yum -y groupinstall 'Development Tools' yum -y install libtool* yum -y install kernel-heads* yum -y install ncurses-dev* yum -y install kernel-devel yum install -y kernel kernel-devel //下载最新的ver:1.6版本 wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.2.tar.gz wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.8-rc1.tar.gz wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.1.tar.gz wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.3.0.tar.gz wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.3.0.tar.gz //安装libpri: tar zxvf libpri-1.4.10.2.tar.gz cd libpri-1.4.10.2 make make install cd .. //安装dahdi驱动: tar zxvf dahdi-linux-2.3.0.tar.gz cd dahdi-linux-2.3.0 make make install cd .. //安装dahdi-tools工具: tar zxvf dahdi-tools-2.3.0.tar.gz cd dahdi-tools-2.3.0 ./configure make make install make config cd .. Dahdi开启回音消除模块:编辑/etc/dahdi/modules 在末尾处添加Dahdi_echocan_mg2 yum install libxml2-devel ncurses-devel subversion doxygen texinfo yum install gcc-c++ make gnutls-devel kernel-devel //安装asterisk: tar zxvf asterisk-1.6.2.8-rc1.tar.gz cd asterisk-1.6.2.8-rc1 ./configure make make install make config make samples cd .. //安装asterisk扩展包(H323\mysql支持): tar zxvf asterisk-addons-1.6.2.1.tar.gz cd asterisk-addons-1.6.2.1 ./configure make make install make samples 至此 asterisk的基本环境安装完毕!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值