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 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
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安装与配置 ...
随机推荐
- Oracle学习【索引及触发器】
索引B_Tree结构 请参照 响应图例 索引是一种允许直接访问数据表中某一数据行的树形结构,为了提高查询效率而引入,是独立于表的对象,可以存放在与表不同的表空间中.索引记录中存有索引关键字和指向表中数 ...
- java_设计模式_状态模式_State Pattern(2016-08-16)
定义: 当一个对象的内在状态改变时允许改变其行为,这个对象看起来像是改变了其类. 类图: 状态模式所涉及到的角色有: ● 环境(Context)角色,也成上下文:定义客户端所感兴趣的接口,同时维护一个 ...
- Bresenham画直线,任意斜率
function DrawLineBresenham(x1,y1,x2,y2) %sort by x,sure x1<x2. if x1>x2 tmp=x1; x1=x2; x2=tmp; ...
- Codeforces 553C Love Triangles(图论)
Solution: 比较好的图论的题. 要做这一题,首先要分析love关系和hate关系中,love关系具有传递性.更关键的一点,hate关系是不能成奇环的. 看到没有奇环很自然想到二分图的特性. 那 ...
- hdu 1573 A/B (扩展欧几里得)
Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973)= 1). Input 数据的第一行 ...
- [lua]协同式多任务,统筹运用
-- CPM:关键路径法(Critical Path Method) jobBase = { schedule = function ( self, job, task, ... ) --由具体job ...
- android入门到熟练(三)----UI界面
1.TextView 以下只是一部分属性,还有很多属性需要在用到时候再说 <TextView android:textSize="24sp"//文字大小 android:te ...
- jQuery动态添加的元素中处理字符串溢出后在指定字符数后添加省略号
"+[jsonData[i].questitle.lenth>40?jsonData[i].questitle.substring(0,40)+"...":json ...
- thinkphp3.2 namespace及use用法
PHP 5.3中的namespace其实是个不错的东西,可以简化编程,下面介绍三类在代码中 访问namespace中类的方法 1 引用namespace和类 假设namespace的程序为name ...
- [BZOJ - 2631] tree 【LCT】
题目链接:BZOJ - 2631 题目分析 LCT,像线段树区间乘,区间加那样打标记. 这道题我调了一下午. 提交之后TLE了,我一直以为是写错了导致了死循环. 于是一直在排查错误.直到.. 直到我看 ...