---
title: "asterisk的安装"
author: "04023129"
date: "2010-11-11T10:41:04Z"
tags: ["Debian", "GCC", "Linux", "Ubuntu"]
categories: ["互联网"]
slug: "asterisk"
draft: false
lastmod: "2010-11-11T10:41:04Z"
id: 808418
url: "https://zzh.iteye.com/blog/808418"
---

安装环境

操作系统  ubuntu 8.04 Server

1下载文件

[http://downloads.asterisk.org/pub/telephony/](http://downloads.asterisk.org/pub/telephony/)

 

Libpri    [libpri-1.4.11.4.tar.gz](http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.11.4.tar.gz)

Asterisk  [asterisk-1.8.0.tar.gz](http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.0.tar.gz)

Dahdi    [dahdi-linux-complete-2.4.0+2.4.0.tar.gz](http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.4.0+2.4.0.tar.gz)

下载的文件放到 opt文件夹地下

2 安装asterisk的依赖包

具体内容可以通过一下网址查找

[http://www.adambotbyl.com/debian-asterisk-module-build-dependencies/](http://www.adambotbyl.com/debian-asterisk-module-build-dependencies/)

一般需要到的包（包括RealTime）

apt-get install　gcc g++ make

apt-get install linux-headers-2.6.24-26-server

apt-get install libncurses5-dev 

*apt*-*get* install linux-*kernel*-*devel*

apt-get install libcurl4-gnutls-dev

apt-get install libxml2-dev

apt-get install unixODBC-dev

apt-get install  autotools-dev unixodbc-dev libltdl3-dev

apt-get install  autotools-dev libltdl3-dev

apt-get install tdsodbc

apt-get install unixodbc

 

3 解压缩文件包

 cd /opt

 tar –xvf [libpri-1.4.11.4.tar.gz](http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.11.4.tar.gz)

 tar - xvf [asterisk-1.8.0.tar.gz](http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.0.tar.gz)

 tar - xvf [dahdi-linux-complete-2.4.0+2.4.0.tar.gz](http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.4.0+2.4.0.tar.gz)

 

4.安装libpri

 # cd libpri-1.4.11.4

 # make

 # make install

 

 5.安装[asterisk-1.8.0](http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.0.tar.gz)

 # cd ..

 # cd asterisk-1.8.0

 # ./configure

 # make

 # make install （之前也可以 make menuselect 以选择想添加的模块）

 # make samples （安装例子）

 

6.安装dahdi-linux-complete-2.4.0+2.4.0

 # cd ..

 # cd dahdi-linux-complete-2.4.0+2.4.0

 # ./configure

 # make

 # make install

 # make config

 

使用 首先启动dahdi

命令 ./etc/init.d/dahdi start

再启动asterisk

Cd /etc/asterisk

Asterisk

Asterisk –rvvv

即可进入asterisk控制台