At this time we only support commercial modules in the distro. Yoy . Director of Software Engineering
yum -y install openssh-server systemctl enable sshd --now
yum -y install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum -y update
yum -y install wget tar nano bzip2 unzip curl net-tools make gcc gcc-c++ openssl openssl-devel mariadb-server mariadb-devel nginx tftp-server crontabs cronie cronie-anacron sendmail sendmail-cf
yum -y install php56w php56w-pdo php56w-mysql php56w-mbstring php56w-pear php56w-process php56w-xml php56w-opcache php56w-ldap php56w-intl php56w-soap php56w-fpm php56w-gd
systemctl enable mariadb.service systemctl start mariadb sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini systemctl enable nginx --now systemctl disable httpd
cd /usr/src/ wget https://github.com/cisco/libsrtp/archive/v1.5.4.tar.gz tar xvzf v1.5.4.tar.gz cd libsrtp-1.5.4 ./configure --libdir=/usr/lib64 --enable-openssl make shared_library make install
ls /usr/lib64 | grep srtp
ldconfig -p | grep srtp
wget -O /usr/share/dict/words https://github.com/cisco/libsrtp/blob/master/test/words.txt
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz tar xvfz asterisk-14-current.tar.gz cd asterisk-14*/
test
mode. ./contrib/scripts/install_prereq test
yum -y install patch ncurses-devel uuid-devel libuuid-devel jansson-devel lame lame-libs libxml2-devel sqlite-devel automake unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel spandsp-devel freetds-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libtool-ltdl-devel lua-devel libsqlite3x-devel radiusclient-ng-devel portaudio-devel neon-devel libical-devel openldap-devel sqlite2-devel bluez-libs-devel jack-audio-connection-kit-devel gsm-devel libedit-devel pjproject-devel gmime-devel subversion git libxslt-devel python-devel
./contrib/scripts/get_mp3_source.sh ./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-crypto --with-ssl=ssl --with-srtp
make menuselect
make && make install && make config && ldconfig
systemctl start asterisk systemctl status asterisk rasterisk Asterisk 14.7.5, 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.7.5 currently running on pbx4 (pid = 28020) pbx4*CLI>
pbx4*CLI> module show like srtp Module Description Use Count Status Support Level res_srtp.so Secure RTP (SRTP) 0 Running core 1 modules loaded
pbx4*CLI> module load res_srtp.so Loaded res_srtp.so
systemctl stop asterisk systemctl disable asterisk
adduser asterisk -m -c "Asterisk User" chown asterisk. /var/run/asterisk chown asterisk. /var/spool/mqueue/ chown -R asterisk. /etc/asterisk chown -R asterisk. /var/{lib,log,spool}/asterisk chown -R asterisk. /usr/lib64/asterisk chown -R asterisk. /var/www/ chown -R asterisk. /var/lib/nginx
curl -sL https://rpm.nodesource.com/setup_8.x | bash - yum install -y nodejs
nano /etc/nginx/conf.d/freepbx.conf
server { server_name 10.10.0.126; listen 80; index index.php; client_max_body_size 120m; root /var/www/html/; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SERVER_NAME $host; } }
nano /etc/php-fpm.d/freepbx.conf
[freepbx] listen = /var/run/php-fpm.sock listen.owner = asterisk listen.group = asterisk listen.mode = 0666 user = asterisk group = asterisk pm = dynamic pm.max_children = 30 pm.start_servers = 3 pm.min_spare_servers = 3 pm.max_spare_servers = 21 pm.max_requests = 1000 php_admin_value[memory_limit] = 512M
systemctl enable php-fpm systemctl restart nginx
cd /usr/src wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz tar xvfz freepbx-14.0-latest.tgz cd freepbx ./start_asterisk start ./install -n
nano /etc/systemd/system/freepbx.service [Unit] Description=FreePBX VoIP Server After=mariadb.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/fwconsole start -q ExecStop=/usr/sbin/fwconsole stop -q [Install] WantedBy=multi-user.target
fwconsole stop systemctl enable freepbx --now
- If there is an error on the web gui that cannot communicate with Asterisk: Check passwords. /etc/asterisk/manager.conf and /etc/amportal.conf password from manager.conf section [admin] must match the password from amportal.conf
- If any of the modules are marked as tampered: Run thefwconsole ma refreshsignatures
in thefwconsole ma refreshsignatures
, restart the freepbx service and try updating the module online
Source: https://habr.com/ru/post/347224/
All Articles