freepbx 安装和配置
首先参见 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 dbpear install db-1.7.14 |
Install and Configure Asterisk
Download Asterisk source files.
cd /usr/srcwget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gzwget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gzwget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gzgit clone https://github.com/akheron/jansson.gitwget 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/srctar xvfz dahdi-linux-complete-current.tar.gztar xvfz libpri-1.4-current.tar.gzrm -f dahdi-linux-complete-current.tar.gz libpri-1.4-current.tar.gzcd dahdi-linux-complete-*make allmake installmake configcd /usr/src/libpri-1.4.*makemake install |
Compile and install pjproject
cd /usr/srctar -xjvf pjproject-2.2.1.tar.bz2cd pjproject-2.2.1CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound\ --disable-resample --disable-video --disable-opencore-amrmake depmakemake install |
Compile and Install jansson
cd /usr/src/janssonautoreconf -i./configuremakemake install |
Compile and install Asterisk
cd /usr/srctar xvfz asterisk-13-current.tar.gzrm -f asterisk-13-current.tar.gzcd asterisk-*./configurecontrib/scripts/get_mp3_source.shmake 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
makemake installmake configldconfig |
Install Asterisk-Extra-Sounds
Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.
mkdir -p /var/lib/asterisk/soundscd /var/lib/asterisk/soundswget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gztar xfz asterisk-extra-sounds-en-wav-current.tar.gzrm -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.gztar xfz asterisk-extra-sounds-en-g722-current.tar.gzrm -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.tgztar vxfz freepbx-12-latest.tgz |
Now create the Asterisk user and set ownership permissions.
useradd -m asteriskchown asterisk. /var/run/asteriskchown -R asterisk. /etc/asteriskchown -R asterisk. /var/{lib,log,spool}/asteriskchown -R asterisk. /usr/lib/asteriskrm -rf /var/www/html |
A few small modifications to Apache.
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.inicp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_origsed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.confservice 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 asteriskmysqladmin -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 chownamportal a ma installallamportal a reloadamportal a ma refreshsignaturesamportal chown |
Finally, one last mod and start FreePBX.
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3amportal 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
freepbx 安装和配置的更多相关文章
- Asterisk 安装与配置
如果用来管理 1.4 版本的 Asterisk ,可能会存在未知的问题.通过集成 CentOS . Asterisk 和 FreePBX , Fonality 公司提供了一个完全傻瓜式的 Asteri ...
- JDK安装与配置
JDK安装与配置 一.下载 JDK是ORACLE提供免费下载使用的,官网地址:https://www.oracle.com/index.html 一般选择Java SE版本即可,企业版的选择Java ...
- Node.js 教程 01 - 简介、安装及配置
系列目录: Node.js 教程 01 - 简介.安装及配置 Node.js 教程 02 - 经典的Hello World Node.js 教程 03 - 创建HTTP服务器 Node.js 教程 0 ...
- 烂泥:redis3.2.3安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前一段时间写过一篇codis集群的文章,写那篇文章主要是因为当时的项目不支持redis自 ...
- mysql源码包手动安装、配置以及测试(亲测可行)
笔记编者:小波/qq463431476博客首页:http://www.cnblogs.com/xiaobo-Linux/ 记下这篇mysql笔记,望日后有用! redhat6采用centos yum源 ...
- 环境搭建系列-系统安装之centos 6.5安装与配置
按照国际惯例,系列目录先奉上: 系列一:系统安装之centos 6.5安装与配置 系列二:准备工作之Java环境安装 系列三:数据为先之MySQL读写集群搭建 系列四:谈分布式之RabbitMQ集群搭 ...
- ZooKeeper安装与配置
一. 单机安装.配置: 1. 下载zookeeper二进制安装包下载地址:http://apache.dataguru.cn/zookeeper/zookeeper-3.4.3/zookeeper-3 ...
- mac 下JDK 与 tomcat 的安装与配置
一.Mac下JDK的安装 1.先检测Mac是否已经安装过JDK,在终端中输入java 或者 javac 显示说明,表明已经安装过JDK,JDK版本查询终端键入java -version,终端会返回JD ...
- 烂泥:zabbix3.0安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 这个月又快过完了,最近也比较忙,没时间写文章,今天挤点时间把zabbix3.0安装与配置 ...
随机推荐
- 分享red hat linux 6上安装oracle11g时遇到的gcc: error trying to exec 'cc1': execvp: No such file or directory的问题处理过程
安装环境:Red Hat Linux 6.5_x64.oracle11g 64bit 报错详情: 安装到68%时弹窗报错: 调用makefile '/test/app/Administrators/p ...
- Jsoup解析HTML、加载文档等实例
一.引入jsoup的jar包:http://jsoup.org/download 补充:http://jsoup.org/apidocs/ Jsoup API 可以了解更详细的内容 二.Js ...
- OC多文件开发介绍
OC多文件开发介绍: 1.为什么要使用多文件? 在工作中,通常把不同的类放到不同的文件中,每个类的声明和实现分开,声明写在.h头文件中,实现写在相应的.m文件中去,类名是什么,文件名的前缀就是什么.假 ...
- jQuery分析(1) - 介绍
前言 web技术高速发展到现在已经出了现非常多的库或框架,库或框架实现方法也是五花八门.现在要实现一个web站点只需要根据自己的业务需求选择js框架即可快速完成.有些框架可以快速满足业务需求,但是有些 ...
- Java面向对象程序设计--接口和内部类
1.接口的定义: In the Java programming language, an interface is not a class but staff[0] = ...
- PHP过滤常用标签的正则表达式
$str=preg_replace("/\s+/", " ", $str); //过滤多余回车 $str=preg_replace("/<[ ] ...
- c、c++混编实现查询本地IP地址
一.思路 1.要想得到本地IP地址,可以通过本机名来查询,所以首先得得到本机名. 2.牵涉到IP地址,首先想到牵涉到网络协议,因此得加载套接字协议,所以先使用WSAStartup函数完成对Winsoc ...
- c++builder调用vc的dll
$bcb/bin目录中有个implib.exe 把你的vc.dll和implib.exe复制到c盘根目录下 运行cmd 进入c盘根目录执行 c:\implib -a cb.lib vc.dll 会生成 ...
- html中子div用了浮动怎样让父div的大小自动撑开(清除浮动)
浮动子div撑开父div的几种方法: (1)在父div中在添加一个清除浮动的子div<div style=" clear:both;"></div>,该di ...
- AS3.0面向对象的写法,类和实例
package /*package是包路径,例如AS文件在ActionScript文件夹下,此时路径应为package ActionScript.必须有的.package中只能有一个class,在一个 ...