[HOWTO] Cài đặt Asterisk 1.6 trên Ubuntu
Các lệnh để bạn cài đặt Asterisk 1.6 trên Ubuntu Linux:
## Build the DAHDI kernel modules, for MeetMe function
DAHDI là tên gọi mới của module Zaptel trên Asterisk 1.4.x, để điều khiển các card Digium (dành cho cổng FXO, FXS và E1/T1). Nếu bạn muốn dùng chức năng Conference của Asterisk, bạn phải cài đặt DAHDI hoặc Zaptel để nó load module dahdi_dummy hay zaptel_dummy vào trong kernel.
Để cài đặt DAHDI, ta phải có gói header của nhân linux đang dùng, cùng với gói build-essential.
$> apt-get install linux-headers-`uname -r` build-essential
$> wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
$> tar xzvf dahdi-linux-complete-current.tar.gz
$> cd dahdi-linux-xxxx
$> make
$> make install
Để cài đặt Asterisk, ta phải cài thêm gói libncurses-dev, libeditline, libnewt
## For generate configuration menu
$> apt-get install libncurses-dev libeditline0 libeditline-dev libedit-dev libnewt-dev
Ngoài ra, bạn cần có thêm các gói sau để có thêm lệnh SendFAX và ReceiveFAX:
## For FAX
$> apt-get install libspandsp-dev
Để có codec SpeeX, cài thêm 2 gói :
## For SpeeX
$> apt-get install libspeex-dev libspeexdsp-dev
Còn để có thể ghi âm hay đọc định dạng Ogg Vorbis – định dạng mở thay thế cho MP3, ta phải cài thêm gói libvorbis-dev nữa:
## For Ogg Vorbis Format
$> apt-get install libvorbis-dev
Cuối cùng là thực hiện biên dịch và cài đặt.
## Run the configure script
$> wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.1-current.tar.gz
$> tar xzvf asterisk-1.6.1-current.tar.gz
$> cd asterisk-1.6.1-xxx
$> ./configure
$> make menuselect
$> make install
$> make config
$> make samples
Cài đặt thêm gói Asterisk Addons để sử dụng kênh H.323, format MP3 và ghi CDR vào CSDL MySQL.
## Install asterisk addons
$> wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.0-current.tar.gz
$> tar xzvf asterisk-addons-1.6.0-current.tar.gz
$> cd asterisk-addons-1.6.0-xxx
$> apt-get install libmysqlclient16-dev
$> make
$> make menuselect
$> make install
$> make samples
Cuối cùng, cấu hình Asterisk chạy dưới tên người dùng asterisk và nhóm asterisk:
## Create the system group and user
$> groupadd -r asterisk
$> useradd -r -g asterisk asterisk
## Edit the init files
$> vim /etc/asterisk/asterisk.conf
Sửa lại dòng runuser và rungroup thành asterisk.
Đại loại là vậy!!!
leave a comment