最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

Asterisk_Guide

来源:动视网 责编:小OO 时间:2025-10-03 20:01:21
文档

Asterisk_Guide

Fluxbox.co.ukAsterisk&FreePBXInstallationGuideDesignedandtestedonCentOS4.3AaronSmithNeededComponents•WebServer•MailServer(Notselectedbydefault)•MySQLDatabase(Notselectedbydefault)•DevelopmentTools(Notselectedbydefault)[root@dhcp1~]#yum-yupdateSettin
推荐度:
导读Fluxbox.co.ukAsterisk&FreePBXInstallationGuideDesignedandtestedonCentOS4.3AaronSmithNeededComponents•WebServer•MailServer(Notselectedbydefault)•MySQLDatabase(Notselectedbydefault)•DevelopmentTools(Notselectedbydefault)[root@dhcp1~]#yum-yupdateSettin


Fluxbox.co.uk

Asterisk & FreePBX Installation Guide

Designed and tested on CentOS 4.3

Aaron Smith

Needed Components

•Web Server

•Mail Server (Not selected by default)

•MySQL Database (Not selected by default)

•Development Tools (Not selected by default)

[root@dhcp1 ~]# yum -y update

Setting up Update Process

Setting up repositories

...etc....

...etc...

Update: gnupg.i386 0:1.2.6-3 python.i386 0:2.3.4-14.2 sendmail.i386 0:8.13.1-3.RHEL4.3 tzdata.noarch 0:2006a-2.EL4

Complete!

root[@dhcp1 ~]#

Additional Package Installation

The following packages need to be additionally installed with yum:

[root@dhcp1 ~]# yum install gcc libxml2-devel libtiff-devel mysql-server php-gd php-mysql kernel-devel kernel-smp-devel bison ncurses-devel audiofile-devel subversion libogg-devel openssl-devel mysql-devel

[root@dhcp1 ~]# rpm -ivh http://apt.sw.be/redhat/el4/en/i386/RPMS.dag/lame-3.96.1-2.2.el4.rf.i386.rpm

Downloading FreePBX Files

[root@dhcp1 ~]# cd /usr/src

[root@dhcp1 src]# wget http://easynews.dl.sourceforge.net/sourceforge/amportal/freepbx-2.1.1.tar.gz [root@dhcp1s src]# tar zxf freepbx-2.1.1.tar.gz

A pause while the files are extracted...

[root@dhcp1 src]#

Downloading Asterisk Files

[root@dhcp1 ~]# cd /usr/src

[root@dhcp1 src]# svn co http://svn.digium.com/svn/asterisk/branches/1.2 asterisk

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/asterisk-addons/branches/1.2 asterisk-addons ..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/zaptel/branches/1.2 zaptel

..Lots of files...

[root@dhcp1 src]# svn co http://svn.digium.com/svn/libpri/branches/1.2 libpri

..Lots of files...

Alternate Source Sound Files

[root@dhcp1 src]# wget http://ftp.digium.com/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz [root@dhcp1 src]# tar zxvf asterisk-sounds-1.2.1.tar.gz

Compile Asterisk

[root@dhcp1]# cd /usr/src/asterisk

[root@dhcp1 asterisk]# mkdir /var/run/asterisk

[root@dhcp1 asterisk]# make install

[root@dhcp1 asterisk]# make config

Create user & Setup Permissions

[root@dhcp1 ~l]# useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk

[root@dhcp1 ~]# chown asterisk /var/lib/php/session/

Using nano , change User apache and Group apache to User asterisk and Group asterisk.

[root@dhcp1 ~]# nano +227 /etc/httpd/conf/httpd.conf

Also change AllowOverride None to AllowOverride All

[root@dhcp1 ~]# nano +311 /etc/httpd/conf/httpd.conf

Setting Up MySQL Database

[root@dhcp1 ~]# /etc/init.d/mysqld start

Initializing MySQL database: [ OK ]

Starting MySQL: [ OK ]

[root@dhcp1 ~]#

Configuring the database for freePBX:

[root@dhcp1 ~]# cd /usr/src/freepbx-2.1.1

[root@dhcp1 freepbx-2.1.1]# mysqladmin create asterisk

[root@dhcp1 freepbx-2.1.1]# mysqladmin create asteriskcdrdb

[root@dhcp1 freepbx-2.1.1]# mysql asterisk < SQL/newinstall.sql

[root@dhcp1 freepbx-2.1.1]# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

Securing the Database

(Example username = asteriskuser, Example password = amp109)

[root@dhcp1 freepbx-2.1.1]# mysql

mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY

'amp109';

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109'; mysql> flush privileges;

mysql> \\q

Bye

Add an SQL Master Password

[root@dhcp1 freepbx-2.1.1]# mysqladmin -u root password 'password'

Build the cdr_mysql module for Asterisk

[root@dhcp1 freepbx-2.1.1]# cd /usr/src/asterisk-addons

[root@dhcp1 freepbx-2.1.1]# cp Makefile Makefile.orig

[root@dhcp1 freepbx-2.1.1]# sed -i 's/SOURCE/SOURCE -DMYSQL_LOGUNIQUEID/' Makefile [root@dhcp1 freepbx-2.1.1]# make && make install

Install freePBX

[root@dhcp1 ~]# cd /usr/src/freepbx-2.1-beta1

[root@dhcp1 freepbx-2.1-beta1]# ./install_amp

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking for libasteriskperl (perl bindings for asterisk)...Checking user..OK

Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default

Creating new /etc/amportal.conf

Enter your USERNAME to connect to the 'asterisk' database: [asteriskuser]

Enter your PASSWORD to connect to the 'asterisk' database: [amp109]

Enter the hostname of the 'asterisk' database: [localhost]

Enter a USERNAME to connect to the Asterisk Manager interface: [admin]

Enter a PASSWORD to connect to the Asterisk Manager interface:[amp111]

Enter the path to use for your AMP web root:[/var/www/html]

Enter the path to use for your FOP web root:[/var/www/html/panel]

Created /var/www/html/panel

Enter the path to your Apache cgi-bin:[/var/www/cgi-bin]

Enter the IP ADDRESS or hostname used to access the AMP web-admin:[xx.xx.xx.xx] The IP Address of your Asterisk Machine

Enter a PASSWORD to perform call transfers with the Flash Operator Panel: [passw0rd]

Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]? extensions Enter directory in which to store AMP executable scripts: [/var/lib/asterisk/bin]

Created /var/lib/asterisk/bin

Enter directory in which to store super-user scripts: [/usr/sbin]

/etc/amportal.conf writtenOK

Reading /etc/amportal.conf..OK

Checking for /etc/asterisk/asterisk.conf../etc/asterisk/asterisk.conf does not exist, copying default

OK

Reading /etc/asterisk/asterisk.conf..OK

Connecting to database..OK

Checking current version of AMP..1.10.010beta1

Installing new AMP files..OK

Configuring install for your environment..OK

Setting permissions on files..OK

Checking for upgrades..5 found

Upgrading to 1.10.010..

Upgrading to 1.10.010..OK

Upgrading to 2.0beta1..

-> Running PHP script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta1/emergencycid.php

-> Running SQL script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta1/tables.sql

PHP Notice: Undefined variable: data in /usr/src/freepbx-2.0-beta4/install_amp on line 305

Upgrading to 2.0beta1..OK

Upgrading to 2.0beta2..

Upgrading to 2.0beta2..OKUpgrading to 2.0beta3..

-> Running PHP script /usr/src/freepbx-2.0-beta4/upgrades/2.0beta3/fixgotovm.php

Updating existing voicemail destinations..

..OK

Upgrading to 2.0beta3..OK

Upgrading to 2.0beta4..

Upgrading to 2.0beta4..OK

Generating AMP configs..

Generating Configurations.conf..

Checking for PEAR DB..OK

Checking for PEAR Console::Getopt..OK

Checking for /etc/amportal.conf..OK

Reading /etc/amportal.conf..OK

Connecting to database..OK

Please Reload Asterisk by visiting http://XXX.XXX.XXX.XX/admin

Generating AMP configs..OK

Restarting Flash Operator Panel..-bash: /var/www/html/admin/bounce_op.sh: Permission denied OK

Please Reload Asterisk by visiting http://XXX.XXX.XXX.XX/admin

amportal control script

[root@dhcp1 ~]# $amportal

----------AMP Control Script-----------

Usage: amportal start|stop|kill|chown

start: Starts Asterisk and Flash Operator Panel server

stop: Gracefully stops Asterisk and the FOP server

restart: Stop and Starts

kill: Kills Asterisk and the FOP server

chown: Sets appropriate permissions on files

$ /usr/sbin/amportal stop

$ /usr/sbin/amportal start

Auto Start

[root@dhcp1 ~]# echo /usr/sbin/amportal start >> /etc/rc.local

Ensure services are starting at boot time and reboot

[root@dhcp1 freepbx-2.1.1]# chkconfig --list httpd

httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[root@dhcp1 freepbx-2.1.1]# chkconfig --list mysqld

mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[root@dhcp1 freepbx-2.1.1]# chkconfig httpd on

[root@dhcp1 freepbx-2.1.1]# chkconfig mysqld on

REBOOT

Upgrading to FreePBX 2.2.3

[root@dhcp1 ~]# cd /usr/src/

[root@dhcp1 src]# wget http://mirror.freepbx.org/freepbx-2.2.3.tar.gz

[root@dhcp1 src]# tar zxvf freepbx-2.2.3.tar.gz[root@dhcp1 src]# cd freepbx-2.2.3

[root@dhcp1 freepbx-2.2.3]#./install_amp --my-svn-is-correct

文档

Asterisk_Guide

Fluxbox.co.ukAsterisk&FreePBXInstallationGuideDesignedandtestedonCentOS4.3AaronSmithNeededComponents•WebServer•MailServer(Notselectedbydefault)•MySQLDatabase(Notselectedbydefault)•DevelopmentTools(Notselectedbydefault)[root@dhcp1~]#yum-yupdateSettin
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top