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安装与配置 ...
随机推荐
- ACM Sdut 2158 Hello World!(数学题,排序) (山东省ACM第一届省赛C题)
题目描述 We know thatIvan gives Saya three problems to solve (Problem F), and this is the firstproblem. ...
- 转 C#开发微信门户及应用(1)--开始使用微信接口
微信应用如火如荼,很多公司都希望搭上信息快车,这个是一个商机,也是一个技术的方向,因此,有空研究下.学习下微信的相关开发,也就成为日常计划的重要事情之一了.本系列文章希望从一个循序渐进的角度上,全面介 ...
- iOS: plist实例
// // main.m // OSXDemo0601_plist // // Created by yao_yu on 14-6-3. // Copyright (c) 2014年 yao_yu. ...
- Sql Server2000,2005,2008各版本主要区别
Emerson回来之后,在过程中遇到的一些问题,再次做一些整理,包括本篇的Sql Server各版本之间的区别和另一篇数据库函数. (博文内容来自网络) 数据类型 SQL Server 2008 数据 ...
- 浅谈Exchange 2013开发-如何操作邮件的附件
因为项目中客户有一个的要求,所以这个Exchange前段时间搞的我很是头疼,没接触过这个东西,但是现在看来,纸老虎一个.希望我的经验可以帮助初次接触它的人少走一些弯路! 简单介绍一下:客户要求在自己的 ...
- 《C和指针》章节后编程练习解答参考——6.6
<C和指针>——6.6 题目: 在指定的下限.上限之间使用数组方法查找质数,并将质数提取出来. 要求: 略 解答代码: #include <stdio.h> #define U ...
- sql update from 修改一个表的值来自另一个表
假设有桌子表名 icate_table_set(table_id,table_name,table_state_id,store_id), 桌子状态表名icate_table_state(state_ ...
- windows下NGINX和PHP配合(FASTCGI)
昨天测试了TOMCAT,今天考查了NGINX. 按网上说的作,比较简单. http://www.cnblogs.com/huayangmeng/archive/2011/06/15/2081337.h ...
- Cxf soap协议改成1.2
在和.net做联调的时候,报错: A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint. 看来是soap协议不匹配 ...
- LeetCode解题报告:Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary t ...