这里记录了编译安装Asterisk的步骤。
更新软件包列表:
$ sudo apt-get update
安装linux-headers:
$ sudo apt-get install linux-headers-$(uname -r)
安装编译环境及依赖库:
$ sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev libsqlite3-dev uuid-dev
下载Asterisk源代码:
$ cd
$ wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
$ wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
去下载url获得最新源码包。
解压下载的安装包:
$ tar zxvf dahdi-linux-complete*
$ tar zxvf libpri*
$ tar zxvf asterisk*
编译dahdi-linux-complete:
$ cd
$ cd dahdi-linux-complete*
$ make
$ sudo make install
$ sudo make config
编译libpri:
$ cd
$ cd libpri*
$ make
$ sudo make install
编译asterisk:
$ cd
$ cd asterisk*
$ ./configure
$ make menuselect
选择你要编译的模块:
$ make
$ sudo make install
$ sudo make config
$ sudo make samples
启动asterisk:
$ sudo /etc/init.d/dahdi start
$ sudo /etc/init.d/asterisk start
$ asterisk -rvvv