Jump to navigation
Asterisk FreeSwitch guides
Main menu
Contact Us
Home
Asterisk & Freeswitch Hosting
search
Secondary menu
Other Guides
Freeswitch guides
Asterisk Guides
You are here
Home
Asterisk Freepbx on Debian (Debian v9, Asterisk v14, Freepbx v14)
Submitted by
powerpbx
on Wed, 09/27/2017 - 13:25
This guide covers the installation of
Asterisk
v13 or v14 and Freepbx v14 GUI from source on Debian v9.
Tested on
Debian
v9 (Stretch) x64
Asterisk v13 and v14
Freepbx v14
Assumptions
Console text mode (multi-user.target)
Installation done as root user (#)
Prerequisites
apt -y update && apt -y upgrade && apt install lsb-release
PHP
apt -y purge php*
apt -y install curl apt-transport-https
curl
https://packages.sury.org/php/
apt.gpg | apt-key add -
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/deb.sury.org.list
apt -y update && apt -y install php5.6 php5.6-curl php5.6-cli php5.6-mysql php5.6-mbstring php5.6-gd php5.6-xml
Other initial dependencies
apt -y install build-essential aptitude openssh-server apache2 mariadb-server mariadb-client bison doxygen flex php-pear curl sox libncurses5-dev libssl-dev libmariadbclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool-bin autoconf git subversion uuid uuid-dev libiksemel-dev libjansson-dev tftpd postfix mailutils nano ntp libspandsp-dev libcurl4-openssl-dev libical-dev libneon27-dev libasound2-dev libogg-dev libvorbis-dev libicu-dev libsrtp0-dev unixodbc unixodbc-dev python-dev xinetd e2fsprogs dbus sudo xmlstarlet mongodb lame ffmpeg dirmngr linux-headers*
Node.js
curl -sL
https://deb.nodesource.com/
setup_8.x | sudo -E bash -
apt -y install nodejs
ODBC
Install ODBC Connector
cd /usr/src
wget
https://downloads.mariadb.com/Connectors/odbc/
connector-odbc-2.0.15/\
mariadb-connector-odbc-2.0.15-ga-debian-x86_64.tar.gz
tar -zxvf mariadb-connector-odbc-2.0.15*.tar.gz
cp mariadb-connector-odbc-2.0.15*/lib/libmaodbc.so /usr/lib/x86_64-linux-gnu/odbc/
Create /etc/odbcinst.ini
cat >> /etc/odbcinst.ini << EOF
[MySQL]
Description = ODBC for MariaDB
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
EOF
Create /etc/odbc.ini
cat >> /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb]
Description = MariaDB connection to 'asteriskcdrdb' database
driver = MySQL
server = localhost
database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
option = 3
EOF
Set Timezone
## FIND YOUR TIMEZONE
tzselect
## SET TIMEZONE EXAMPLE
timedatectl set-timezone America/Vancouver
timedatectl status
Install
DAHDI
Only required if using a physical server and installing telecom hardware. At this time, versions newer than
2.10.2
2.11.0
and
2.11.1
) do not install correctly.
cd /usr/src
wget
http://downloads.asterisk.org/pub/telephony/
dahdi-linux-complete/dahdi-linux-complete-2.10.2+2.10.2.tar.gz
tar zxvf dahdi-linux-complete-2.10*
cd /usr/src/dahdi-linux-complete-2.10*/
make all && make install && make config
systemctl restart dahdi
If
make all
fails try reboot and run
apt install linux-headers*
Asterisk
To install Asterisk v14, set
VERSION=14
. To switch versions, it is best to run
rm -rf /usr/lib/asterisk/modules
first.
# Select Asterisk
VERSION=14
or
VERSION=13
cd /usr/src
wget
http://downloads.asterisk.org/pub/telephony/asterisk/
asterisk-${VERSION}-current.tar.gz
tar zxvf asterisk-${VERSION}-current.tar.gz
cd /usr/src/asterisk-${VERSION}*/
make distclean
Install additional dependencies
cd /usr/src/asterisk-${VERSION}*/
./contrib/scripts/install_prereq install
ConfigureAsterisk Freepbx on Debian (Debian v9, Asterisk v14, Freepbx v14) | Asterisk FreeSwitch guides
Материал перенесён из старой базы знаний ATC-IP и оформлен в едином стиле нового сайта.