Вы находитесь на странице: 1из 7

Orange Pi Zero Asterisk

Publicado en 26 de febrero de 2017 por


Hoy, considere instalar el sistema Asterisk en la mini PC Orange Pi Zero.
Lo que tenemos:
- 1 tablero Orange Pi Zero;
- Imagen grabada recientemente
Armbian_5.25_Orangepizero_Ubuntu_xenial_default_3.4.113
# Actualizar el sistema
apt-get update && apt-get -y actualizar
reinicio
# set webmin
apt-get install perl libnet-perl openssl-ssleay libauthen-pam-perl-libpam tiempo de
ejecucin Libio-pty-perl apt-show-versions -y pitn
http://prdownloads.sourceforge.net/webadmin/webmin_1.831_all.deb wget
dpkg-instalar webmin_1.831_all.deb
# asterisco depende
acumulacin apta instalar esenciales -y-linux-headers-`uname -r` openssh-server
apache2 mysql -server \
mysql-cliente bisontes libncurses5 flex sox-dev-dev libssl libmysqlclient libxml2-
dev-dev mpg123 \
libnewt libsqlite3-dev sqlite3-dev pkg-config autoconf automake libtool subversin
git unixodbc-dev \
UUID UUID-dev-dev libasound2 libogg libvorbis-dev-dev libcurl4-openssl-dev
libical-dev-dev libneon27 \
libsrtp0-dev-dev libspandsp libopus opus-dev-herramientas-dev libiksemel
libiksemel-utils libiksemel3 xmlstarlet
#install 5.6 php
sudo locale-gen en_US.UTF-8
localedef -i en_US -f UTF-8 en_US.UTF-8
reinicio
-y instalar software apt-propiedades comunes python-software-properties
LC_ALL = C.UTF-8-apt-ppa aadir repositorio: ondrej / php
apta actualizacin -y
apta instalar php5.6 -y php5.6-rizo php5.6 php5.6-mysql -cli php5.6-db-ODBC
php5.6 php5.6-gd-xml php5.6 rizo libapache2-mod-php5.6
-y apta instalar php-pear
a2dismod php7.0 a2enmod php5.6
alternativas -config-actualizacin php
a2enmod reescribir
servicio apache2 restart
Console_Getopt pera instalar
#
cd / usr / src
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz &&
wget && http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-
linux-complete-current.tar.gz
http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz && wget
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.
&& GZ
git clone https://github.com/akheron/jansson.git &&
wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.tar.bz2 &&
echo " \ _ () _ / "
cd / usr / src &&
tar zxvf lame-3.98.4.tar.gz &&
cd lame-3.98.4 &&
./configure &&
make &&
make install &&
echo " \ _ () _ / "
cd / usr / src &&
tar xvfz dahdi-linux-complete-current.tar.gz &&
tar xvfz libpri-current.tar.gz &&
rm -f dahdi-linux-complete-current.tar.gz libpri-current.tar. && GZ
cd dahdi-linux-COMPLETE- * &&
make && todo
make install &&
make && config
cd / usr / src / libpri- * &&
make &&
make install &&
echo " \ _ () _ / "
cd / usr / src &&
tar -xjvf pjproject-2 * * && tar.bz2...
cd pjproject- * &&
CFLAGS = '- 1 = DPJ_HAS_IPV6' ./configure -prefix = / usr -enable- -sonido -disable
compartida \
-disable-video--disable volver a muestrear - desactivar la OpenCore-AMR &&
make dep &&
make &&
make install &&
echo " \ _ () _ / "
cd / usr / src / Jansson &&
autoreconf -i &&
./configure &&
make &&
make install &&
echo " \ _ () _ / "
cd / usr / src &&
tar xvfz asterisco-current.tar.gz && 14-
rm -f asterisco-current.tar.gz && 14-
asterisk- cd * &&
./configure &&
contrib / scripts / get_mp3_source.sh &&
hacer menuselect
# 'format_mp3'
make &&
make install &&
make config &&
ldconfig
# / etc / default / asterisk
AST_USER = "asterisco"
AST_GROUP = "asterisco"
useradd -m asterisco &&
chown asterisco. / var / run / asterisk &&
chown -R asterisco. / etc / asterisk &&
chown -R asterisco. / var / {lib, log, spool} / asterisk &&
chown -R asterisco. / usr / lib / asterisk
#freepbx 13
sed -i 's / \ (^ upload_max_filesize = \) * / \ 120M /.' /etc/php/5.6/apache2/php.ini
&&
sed -es decir, 's / \; fecha \ .timezone \ \ = / da \ .timezone \ \ = \ "Europa \ /
Mosc" / g '/etc/php/5.6/apache2/php.ini &&
cp && /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
'/ ^ \ (s -i sed de usuario \ | Grupo \). * / \ 1 asterisco /' /etc/apache2/apache2.conf
&&
sed -i 's / AllowOverride None / AllowOverride All /' / etc / apache2 / apache2.conf
&&
systemctl restart apache2
cat >> << EOF /etc/odbcinst.ini [MySQL] Descripcin = ODBC para MySQL Driver
= Configuracin /usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so = / usr / lib /
brazo-linux-gnueabihf /odbc/libtdsodbc.so FileUsage = 1 EOF cat >> << EOF
/etc/odbc.ini [MySQL-asteriskcdrdb] Descripcin = conexin a MySQL
'asteriskcdrdb' controlador de base de datos MySQL server = = localhost base de
datos = asteriskcdrdb puerto = 3306 = Socket /var/run/mysqld/mysqld.sock
opcin = 3 EOF cd / usr / src && wget
http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
alquitrn vxfz freepbx-13.0- latest.tgz && cd / usr / src / freepbx && ./install -n

:
1 Orange Pi Zero;
-
Armbian_5.25_Orangepizero_Ubuntu_xenial_default_3.4.113
#
apt-get update && apt-get upgrade -y
reboot
# webmin
apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime
libio-pty-perl apt-show-versions python -y
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.831_all.deb
dpkg install webmin_1.831_all.deb
# Asterisk depends
apt install -y build-essential linux-headers-`uname -r` openssh-server apache2
mysql-server\
mysql-client bison flex 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 libopus-dev opus-tools libiksemel-dev libiksemel-utils
libiksemel3 xmlstarlet
#install php 5.6
sudo locale-gen en_US.UTF-8
localedef -i en_US -f UTF-8 en_US.UTF-8
reboot
apt install -y software-properties-common python-software-properties
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt update -y
apt install -y php5.6 php5.6-curl php5.6-cli php5.6-mysql php5.6-odbc php5.6-db
php5.6-gd php5.6-xml curl libapache2-mod-php5.6
apt install -y php-pear
a2dismod php7.0 a2enmod php5.6
update-alternatives config php
a2enmod rewrite
service apache2 restart
pear install Console_Getopt
#
cd /usr/src
wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz &&
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-current.tar.gz &&
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-
current.tar.gz &&
git clone https://github.com/akheron/jansson.git &&
wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.tar.bz2 &&
echo \_()_/
cd /usr/src &&
tar zxvf lame-3.98.4.tar.gz &&
cd lame-3.98.4 &&
./configure &&
make &&
make install &&
echo \_()_/
cd /usr/src &&
tar xvfz dahdi-linux-complete-current.tar.gz &&
tar xvfz libpri-current.tar.gz &&
rm -f dahdi-linux-complete-current.tar.gz libpri-current.tar.gz &&
cd dahdi-linux-complete-* &&
make all &&
make install &&
make config &&
cd /usr/src/libpri-* &&
make &&
make install &&
echo \_()_/
cd /usr/src &&
tar -xjvf pjproject-2.*.*.tar.bz2 &&
cd pjproject-* &&
CFLAGS=-DPJ_HAS_IPV6=1 ./configure prefix=/usr enable-shared disable-
sound\
disable-resample disable-video disable-opencore-amr &&
make dep &&
make &&
make install &&
echo \_()_/
cd /usr/src/jansson &&
autoreconf -i &&
./configure &&
make &&
make install &&
echo \_()_/
cd /usr/src &&
tar xvfz asterisk-14-current.tar.gz &&
rm -f asterisk-14-current.tar.gz &&
cd asterisk-* &&
./configure &&
contrib/scripts/get_mp3_source.sh &&
make menuselect
#format_mp3
make &&
make install &&
make config &&
ldconfig
#/etc/default/asterisk
AST_USER=asterisk
AST_GROUP=asterisk
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
#freepbx 13
sed -i s/\(^upload_max_filesize = \).*/\120M/ /etc/php/5.6/apache2/php.ini &&
sed -ie s/\;date\.timezone\ \=/date\.timezone\ \=\ Europe\/Moscow/g
/etc/php/5.6/apache2/php.ini &&
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 &&
systemctl restart apache2
cat >> /etc/odbcinst.ini << EOF [MySQL] Description = ODBC for MySQL Driver
= /usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so Setup = /usr/lib/arm-linux-
gnueabihf/odbc/libtdsodbc.so FileUsage = 1 EOF cat >> /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb] Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL server=localhost database=asteriskcdrdb Port=3306
Socket=/var/run/mysqld/mysqld.sock option=3 EOF cd /usr/src && wget
http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz tar
vxfz freepbx-13.0-latest.tgz && cd /usr/src/freepbx && ./install -n