Asterisk 16 s FreePBX 15 na Ubuntu 18.04.

sudo apt update && sudo apt -y upgrade

Nainštaľujte Asterisk 16 PBX

sudo apt-get install git curl wget \
libnewt-dev libssl-dev libncurses5-dev \
subversion libsqlite3-dev build-essential \
libjansson-dev libxml2-dev  uuid-dev

Pridajte repozitáter

sudo add-apt-repository universe
sudo apt update
sudo apt install subversion

Stiahnite Asterisk 16 zdroje a naustaľujte závislosti

sudo apt policy asterisk

Stiahnite Asterisk 16

sudo su -
cd /usr/src/
curl -O http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz

Rozbaľte súbory

tar xvf asterisk-16-current.tar.gz

Choďte do priečinka

cd asterisk-16/*

V mojom prípade:

Teraz stiahnite MP3 dekodery

contrib/scripts/get_mp3_source.sh

Zaistite, aby boli vyriešené všetky závislosti:

contrib/scripts/install_prereq install

Napíšte kód 421, to je slovenská predvoľba

Postavte a naustaľujte Asterisk zo zdrojov

./configure
make menuselect

Zvoľte Save & Exit

Teraz urobené zmeny v konfigurácií uložte

make
make install
make samples
make config
ldconfig

Vytvorte užívateľa

groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk.asterisk /etc/asterisk
chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk.asterisk /usr/lib/asterisk

Nastavte Asterisk, ako defaultného užívateľa

vim /etc/default/asterisk
AST_USER="asterisk"
AST_GROUP="asterisk"
vim /etc/asterisk/asterisk.conf
runuser = asterisk ; The user to run as.
rungroup = asterisk ; The group to run as.

Reštartujte Asterisk

systemctl restart asterisk

Spustite Asterisk pri boote

systemctl enable asterisk
enable asterisk

Teraz nainštalujte freePBX

Ako prvé naištaľujte databázu

apt install mariadb-server

A teraz Apache

apt-get install apache2

Nastavte

cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf

Nainštalujte PHP

apt-get -y install wget libapache2-mod-php php php-{pear,cgi,common,curl,mbstring,gd,gettext,mysql,bcmath,zip,xml,imap,json,snmp,fpm}

Zmeňte PHP maximum file upload

sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.2/apache2/php.ini
sudo sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.2/cli/php.ini

Stiahnite FreePBX

cd /usr/src
sudo wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
sudo tar xfz freepbx-15.0-latest.tgz
sudo rm -f freepbx-15.0-latest.tgz
cd freepbx
sudo ./start_asterisk start
sudo apt install nodejs
sudo ./install -n

Ak by ste mali nejaký problém, vyskúšajte

Unable to read /etc/asterisk/asterisk.conf or it was missing a directories section

Teraz urobte úpravu

vim /etc/asterisk/asterisk.conf
[directories](!) na [directories]

Zapíšte úpravu Apache

systemctl restart apache2
a2enmod rewrite

Teraz otvotr webový prehliadač a zadajte IP adresu servera v tvare X.X.X.X/admin

Problémy:

sudo apt-get install nodejs-dev node-gyp libssl1.0-dev
sudo apt-get install npm
fwconsole reload --verbose 
fwconsole ma install pm2
sudo apt-get install sox
fwconsole ma downloadinstall framework --force
fwconsole reload