博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
freepbx 安装和配置
阅读量:6956 次
发布时间:2019-06-27

本文共 5891 字,大约阅读时间需要 19 分钟。

首先参见   asterisk manager api 的配置,然后根据freepbx的官方文档:

http://wiki.freepbx.org/display/HTGS/Installing+FreePBX+12+on+Ubuntu+Server+14.10

http://wiki.freepbx.org/display/L1/amportal+commands#amportalcommands-Chown

 

 

Initial System Setup

When installing the machine, at package selection make sure you pick - at least - OpenSSH Server, and LAMP Server. You may install others, if wanted.

Configure your root password.

sudo
passwd
root

Switch to the Root User

sudo
-i

Update Your System

apt-get update &&
sudo
apt-get upgrade -y 

Install Required Dependencies

apt-get
install
-y build-essential linux-headers-`
uname
-r` openssh-server apache2 mysql-server\
  
mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox\
  
libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3\
  
libsqlite3-dev pkg-config automake libtool autoconf git subversion unixodbc-dev uuid uuid-dev\
  
libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\
  
libspandsp-dev libiksemel-dev libiksemel-utils libiksemel3
 

Reboot server

This is to ensure you're running the kernel version that you're going to be building your kernel modules against. You may skip this step if you're sure your running kernel is the latest.

reboot

Install PearDB

pear uninstall db
pear
install
db-1.7.14

Install and Configure Asterisk

Download Asterisk source files.

cd
/usr/src
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-13-current
.
tar
.gz
git clone https:
//github
.com
/akheron/jansson
.git
wget http:
//www
.pjsip.org
/release/2
.2.1
/pjproject-2
.2.1.
tar
.bz2

Compile and install DAHDI and LibPRI

If you don't have any physical hardware you don't need to run these commands, however, it is still suggested to compile the modules, to allow you to add hardware later.

cd
/usr/src
tar
xvfz dahdi-linux-complete-current.
tar
.gz
tar
xvfz libpri-1.4-current.
tar
.gz
rm
-f dahdi-linux-complete-current.
tar
.gz libpri-1.4-current.
tar
.gz
cd
dahdi-linux-complete-*
make
all
make
install
make
config
cd
/usr/src/libpri-1
.4.*
make
make
install

Compile and install pjproject

cd
/usr/src
tar
-xjvf pjproject-2.2.1.
tar
.bz2
cd
pjproject-2.2.1
CFLAGS=
'-DPJ_HAS_IPV6=1'
.
/configure
--prefix=
/usr
--
enable
-shared --disable-sound\
  
--disable-resample --disable-video --disable-opencore-amr
make
dep
make
make
install

Compile and Install jansson

cd
/usr/src/jansson
autoreconf -i
.
/configure
make
make
install

Compile and install Asterisk

cd
/usr/src
tar
xvfz asterisk-13-current.
tar
.gz
rm
-f asterisk-13-current.
tar
.gz
cd
asterisk-*
.
/configure
contrib
/scripts/get_mp3_source
.sh
make
menuselect

You will be prompted at the point to pick which modules to build. Most of them will be enabled, but if you want to have MP3 support, you need to manually turn on 'format_mp3' on the first page.

After selecting 'Save & Exit' you can then continue

make
make
install
make
config
ldconfig

Install Asterisk-Extra-Sounds

Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.

mkdir
-p
/var/lib/asterisk/sounds
cd
/var/lib/asterisk/sounds
wget http:
//downloads
.asterisk.org
/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current
.
tar
.gz
tar
xfz asterisk-extra-sounds-en-wav-current.
tar
.gz
rm
-f asterisk-extra-sounds-en-wav-current.
tar
.gz
# Wideband Audio download
wget http:
//downloads
.asterisk.org
/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current
.
tar
.gz
tar
xfz asterisk-extra-sounds-en-g722-current.
tar
.gz
rm
-f asterisk-extra-sounds-en-g722-current.
tar
.gz

Install and Configure FreePBX

Download and extract FreePBX.

wget http:
//mirror
.freepbx.org
/modules/packages/freepbx/freepbx-12
.0-latest.tgz
tar
vxfz freepbx-12-latest.tgz

Now create the Asterisk user and set ownership permissions.

useradd
-m asterisk
chown
asterisk.
/var/run/asterisk
chown
-R asterisk.
/etc/asterisk
chown
-R asterisk.
/var/
{lib,log,spool}
/asterisk
chown
-R asterisk.
/usr/lib/asterisk
rm
-rf
/var/www/html

A few small modifications to Apache.

sed
-i
's/\(^upload_max_filesize = \).*/\120M/'
/etc/php5/apache2/php
.ini
cp
/etc/apache2/apache2
.conf
/etc/apache2/apache2
.conf_orig
sed
-i
's/^\(User\|Group\).*/\1 asterisk/'
/etc/apache2/apache2
.conf
service apache2 restart

Prepare MySQL

You now need to generate a secure password for FreePBX to use to talk to MySQL.

export
ASTERISK_DB_PW=`
dd
if
=
/dev/urandom
bs=1 count=32 2>
/dev/null
| base64 - |
cut
-c2-18`

That will generate a quasi-random 16 character long password, which should be secure enough for most things.  If you had set the MySQL 'root' password to be something when you were installing the machine, you will need to add a -pyourpassword flag to the following lines

Configure Asterisk database in MYSQL. 

mysqladmin -u root create asterisk
mysqladmin -u root create asteriskcdrdb

Set permissions on MYSQL database.

mysql -u root -e
"GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e
"GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e
"flush privileges;"

Restart Asterisk and install FreePBX.

.
/start_asterisk
start
.
/install_amp
--installdb --username=asteriskuser --password=${ASTERISK_DB_PW}
amportal
chown
amportal a ma installall
amportal a reload
amportal a ma refreshsignatures
amportal
chown

Finally, one last mod and start FreePBX.

ln
-s
/var/lib/asterisk/moh
/var/lib/asterisk/mohmp3
amportal restart

Start FreePBX

Navigate: 

Now FreePBX is installed, it will be available via Apache. Open up your web browser and visit:

    http://Address.Of.FreePBX.Server/admin

转载地址:http://simil.baihongyu.com/

你可能感兴趣的文章
python之扩展
查看>>
Redis有序集合数据类型操作命令
查看>>
nginx+tomcat 动静分离 的配置文件
查看>>
SaltStck无Master和多Master架构
查看>>
ajax asynx:false
查看>>
online游戏服务器架构--网络架构
查看>>
tomcat启动比较慢的解决办法
查看>>
对待实时进程(RT)抢占的问题
查看>>
一个关于组播的网络问题--暂没有时间确定真实原因
查看>>
mac下安装多个版本PHP及切换
查看>>
VIM常用操作和使用方法
查看>>
CentOS环境使用python脚本备份文件
查看>>
WebCruiser Web Security Scanner
查看>>
如何将js的object对象传到后台--->JavaScript之对象序列化
查看>>
北京8分钟告诉你,阿里巴巴要打造的人工智能奥运真的要来!
查看>>
3G产品肢解“狂魔”剖析业内名品特色
查看>>
linux中的变量赋值及改变、显示
查看>>
鸟哥的linux私房菜-文件压缩于打包-1
查看>>
Java数据库连接--JDBC基础知识(操作数据库:增删改查)
查看>>
如何修改新建帐套中自定义对象的序列
查看>>