Guida su come Installare Asterisk 14 e Freepbx 14 su Debian 8.8 Jessie. Questa guida è stata fatta su una nuova installazione di Debian Stable e tutti i comandi sono stati eseguiti come utente ROOT.
Aggiornare il sistema:
# apt update; apt upgrade
se viene installato un nuovo kernel riavviare.
Scaricare le dipendenze ed i servizi necessari:
# apt 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 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 libjansson-dev libapache2-mod-php5 libmyodbc sudo
a metà installazione verrà chiesto per tre volte di settare una password per Mysql, LASCIARE IL CAMPO VUOTO. La password verrà generata in maniera automatica e sicura.
Scaricare l'occorrente: Pjproject, Jansson, Asterisk, Freepbx:
# cd /usr/src
# wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
# wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.10.tar.gz
# wget https://www.pjsip.org/release/2.6/pjproject-2.6.tar.bz2
# wget https://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz
Installare Pjproject:
# cd /usr/src
# tar -xjvf pjproject-2.6.tar.bz2
# cd pjproject-2.6
# CFLAGS='-DPJ_HAS_IPV6=1' ./configure --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr
# make dep
# make -j4
# make install
Installare Jansson:
# cd /usr/src
# tar vxfz jansson.tar.gz
# cd jansson-*
# autoreconf -i
# ./configure
# make -j4
# make install
Installare Asterisk 14:
# cd /usr/src
# tar xvfz asterisk-14-current.tar.gz
# cd asterisk-14.*
# contrib/scripts/get_mp3_source.sh
# ./contrib/scripts/install_prereq install
# ./configure
# make menuselect
a questo punto conviene dare un occhiata ed abilitare qualche modulo in più, come format_mp3:
# make -j4
# make install
# make config
# ldconfig
non fare caso all'errore sotto:
Asterisk 14 Freepbx 14 su Debian 8.8
adesso bisogna verificare che asterisk funzioni correttamente:
# /etc/init.d/asterisk start
# asterisk -rvvv
output:
root@debianbox:/home/edmond# asterisk -rvvv Asterisk 14.4.0, Copyright (C) 1999 - 2016, Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 14.4.0 currently running on debianbox (pid = 1461) debianbox*CLI>
Installazione e configurazione di Mysql ed Apache2 e relativi permessi:
# /etc/init.d/asterisk stop
# pear install Console_Getopt
# groupadd asterisk
# useradd -d /var/lib/asterisk -g asterisk asterisk
# chown -R asterisk:asterisk /var/spool/asterisk /var/run/asterisk /etc/asterisk /var/{lib,log,spool}/asterisk /usr/lib/asterisk /var/www
# sed -i 's/#AST_USER="asterisk"/AST_USER="asterisk"/g' /etc/default/asterisk
# sed -i 's/#AST_GROUP="asterisk"/AST_GROUP="asterisk"/g' /etc/default/asterisk
# mv /var/www/html /var/www/html.bak
# cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
# sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php5/apache2/php.ini
# sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
# sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
# service apache2 restart
# nano /etc/odbcinst.ini
ed incollare dentro:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
il percorso dei driver potrebbe essere diverso se non si è su una macchina x86_x64, per verificare il percorso:
# find / -name libmyodbc.so
poi ancora:
# nano /etc/odbc.ini
ed incollare dentro:
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
option=3
a questo punto riavviare:
# reboot
al riavvio:
# a2enmod rewrite
# service apache2 restart
Installazione di Freepbx 14:
# cd /usr/src
# tar vxfz freepbx-14.0-latest.tgz
# cd freepbx
# ./start_asterisk start
# ./install -n
se tutto è andato bene il server Asterisk è raggiungibile all'indirizzo https://ip_raspberry.
Asterisk 14 Freepbx 14 su Debian 8.8
- La prima cosa da fare è quella di scegliere nome utente, password e mail, per accedere al pannello di amministrazione.
- Andare nel menu Admin-Module Admin e scaricare ed aggiornare tutti i moduli
Errori
Error(s) have occured, the following is the retrieve_conf output:exit: 1
installare il modulo framework:
# fwconsole chown
# fwconsole reload
# fwconsole ma upgrade framework
# fwconsole restart
Can Not Connect to Asterisk
andare in Settings-Advanced Settings-Asterisk Manager e ricaricare la voce .
Asterisk 14 Freepbx 14 su Debian 8.8
enjoy 😉
Debian 8.8 does not have the sudo package installed by default
Your manual (very good) works fine until "Installazione di Freepbx 14".
Enter an adjustment.
Thanks for your comment. In fact I forgot to insert the sudo command. Now it should be all right.
Today I have tried my guide and everything works fine. It needs a Debian clean installation. No error reported now.
great guide edmond , i just want to add notice in case needed to check External codecs ( opus / silk / etc.. ) during asterisk at gui menue, you will not able and will see XXX instead of check box
to able to check these codecs you must install xmlstarlet before asterisk by bellow command:
apt-get install xmlstarlet
second thing i hope you make full guide of installing and config chan_dongle to works with this guide
please use last version:
https://github.com/wdoekes/asterisk-chan-dongle
To be able to upgrade freepbx you have to install also nodejs:
# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash –
# apt install -y nodejs
and libicu
apt-get install libicu52 libicu-dev
I have to report a bug installing jansson 2.10 (latest release available).
After launching ./configure you get:
I opened a issue in GitHub.
Found issue:
missing hostname in /etc/hosts
It works flawlessly.
Thanks
thanks for your feed