Asterisk 是一个开放源代码的软件VoIP PBX系统,它是一个运行在Linux环境下的纯软件实施方案。Asterisk是一种功能非常齐全的应用程序,提供了许多电信功能,能够把你的x86机 器变成你自己的交换机,还能够当作一台企业级的商用交换机。Asterisk让人激动的事情是它在小企业预算可承受的范围内提供了商业交换机的功能和可伸 缩性。你可以使用一台老式的奔腾3计算机,让你的机构看起来就同世界上的大企业一样。
安装Debian 5.
refer to :
http://www.linuxidc.com/Linux/2011-03/33726.htm
安装Asterisk1.6
login is as root.
apt-get install ssh
然后可以通过SSH远程登录进行操作
apt-get install gcc g++ make libncurses5-dev
cd /usr/local/src
mkdir asterisk
下载Asterisk 1.6及相关软件,本文以asterisk-1.6.1.16 为例。
tar xzvf asterisk-1.6.1.16.tar.gz
cd asterisk-1.6.1.16
./configure
make
make install
至此Asterisk 1.6 被成功安装。
安装Sample
make samples
安装脚本以便机器重启时自动启动Asterisk
make config
which will choose the right init files for your distribution, and copy them in /etc/asterisk
For your information, those files are located in the contrib/init.d/ folder
启动asterisk
asterisk -vvvc
停止asterisk
stop now
all of the above, refer to
http://www.linuxidc.com/Linux/2011-03/33725p2.htm
安装Addons
tar xzvf asterisk-addons-1.6.1.2.tar.gz
cd asterisk-addons-1.6.1.2
./configure
make
make install
make samples
In order to successfully build Asterisk, the following dependencies need to be satisfied:
gcc
g++
make
libncurses5-dev
On Debian “Lenny“, running the following command, as root, will suffice:
apt-get install gcc g++ make libncurses5-dev
The other dependencies will be resolved automatically
Downloading and extracting Asterisk
Download Asterisk 1.6.0.6 from here or using wget:
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.6.0.6.tar.gz
Extract the archive with tar:
tar xzvf asterisk-1.6.0.6.tar.gz
a new folder named “asterisk-1.6.0.6″ will be created
Change the current working directory to that folder, with cd:
cd asterisk-1.6.0.6
Pre-building configuration
Stay in the “asterisk-1.6.0.6″ folder, which holds the source code of Asterisk and run the script:
./configure
which will check the usability of the system libraries and create a ’Makefile’, based on your system.
The ’Makefile’ will later on be used by ’make’ to build Asterisk
If the ’configure’ script ran fine, you should read on the screen something like:
configure: OS type : linux-gnu
configure: Host CPU : i686
Building
Stay in the “asterisk-1.6.0.6″ folder, which now holds also the ’Makefile’ and run make:
make
consider that on an 800MHz AMD Athlon CPU system, the building of Asterisk takes around 7 minutes
however, rebuilding Asterisk from the same source tree will take much less because only the files affected from changes to the ’Makefile’ with the ./configure script will be rebuilt.
If the building ran fine, you should read on the screen:
+——— Asterisk Build Complete ———
+ Asterisk has successfully been built, and
+ can be installed by running:
+
+ make install
+——————————————-
Installation
Always staying in the “asterisk-1.6.0.6″ folder, write the command:
make install
which will finally install Asterisk.
You should then read something like:
+—- Asterisk Installation Complete ——-+
…
…
…
Installing sample configuration files
The sample configuration files which comes with Asterisk, will provide a good basic running setup to start customizing.
To install them, run the command:
make samples
Init scripts for getting Asterisk to start at boot
Having Asterisk to start at boot is as simple as running, in the “asterisk-1.6.0.6″ folder, the command:
make config
which will choose the right init files for your distribution, and copy them in /etc/asterisk
For your information, those files are located in the contrib/init.d/ folder
First execution of Asterisk
As the superuser root, from whatever folder you are in, run:
asterisk -vvvc
Asterisk will load it’s modules and it’s configuration, you should then read:
Asterisk Ready.
*CLI>
this is the command line interface of Asterisk, to logout run the command:
stop now
Reboot and verify
Reboot the system with the command:
reboot
after the reboot process, you can verify that Asterisk is running with the command:
asterisk -r
and logout from the command line interface with the command:
exit