相続、親が弱ってきたら銀行の預金は親の面倒を見ているものが全て解約して管理すべきである、銀行は解約させない!!

asterisk13 freepbx13 opus debian-8.7.1 install for intel-nuc

Asterisk

apt-get 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 unixodbc-dev uuid uuid-dev\ libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\ libspandsp-dev sudo libmyodbc subversion

reboot

pear install Console_Getopt

cd /usr/src

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-13-current.tar.gz

wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz

wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2

cd /usr/src
tar xvfz dahdi-linux-complete-current.tar.gz
rm -f dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-*
make all
make install 
make config
cd /usr/src
tar xvfz libpri-current.tar.gz
rm -f libpri-current.tar.gz
cd libpri-*
make
make install

cd /usr/src

tar -xjvf pjproject-2.4.tar.bz2

rm -f pjproject-2.4.tar.bz2

cd pjproject-2.4

CFLAGS=’-DPJ_HAS_IPV6=1′ ./configure –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr

make dep

make

make install

cd /usr/src

tar vxfz jansson.tar.gz

rm -f jansson.tar.gz

autoreconf -i

cd jansson-*

./configure

make

make install

opusに必要

apt-get install xmlstarlet

cd /usr/src
tar zxvf asterisk-13-current.tar.gz
cd asterisk-13.15.0
./contrib/scripts/get_mp3_source.sh
./contrib/scripts/install_prereq install 
./configure
make menuselect ここでopusとsoundを選択する
make
make install
make config
ldconfig
update-rc.d -f asterisk remove

useradd -m asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk

sed -i ‘s/\(^upload_max_filesize = \).*/\120M/’ /etc/php5/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

service apache2 restart

cat >> /etc/odbcinst.ini << EOF
[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
 
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

freepbxのインストール

cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
tar vxfz freepbx-13.0-latest.tgz
rm -f freepbx-13.0-latest.tgz
cd freepbx
./start_asterisk start
./install

途中パスワード以外はエンターでOK 成功すれば

You have successfully installed FreePBX が表示される

a2enmod rewrite

vi /etc/apache2/mods-enabled/dir.conf

<IfModule mod_dir.c>

#DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

service apache2 restart 再起動で

 

Can not connect to asteriskが出る

./start_asterisk start
 asteriskをソースからコンパイルするとasteriskの起動ファイルが作られない
そのためにこのエラーが出る
freepbxを起動するとasteriskを自動で起動してくれる
今回、freepbxを自動起動するファイルができていないためにこのエラーが起こる

vi /etc/init.d/freepbx

#!/bin/bash
### BEGIN INIT INFO
# Provides: freepbx
# Required-Start: mysql
# Required-Stop: mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start FreePBX
# Description: Start FreePBX
### END INIT INFO

AMPORTAL_BIN=/usr/sbin/amportal
AMPORTAL_DELAYED_START=/usr/sbin/amportal_delayed
MIN_START_TIME=1346787921

if [ ! -x ${AMPORTAL_BIN} ]; then
 echo "error : amportal binary can not be found (${AMPORTAL_BIN})"
 exit 0
fi


start() {
 echo "Starting FreePBX ..."
 if [ `date +%s` -lt $MIN_START_TIME ]
 then
 echo Not starting Asterisk with incorrect system time. Trying again in 10 seconds...
 sleep 10
 fi
 if [ `date +%s` -lt $MIN_START_TIME ]
 then
 echo Further delaying Asterisk start until correct system time has been obtained.
 ${AMPORTAL_DELAYED_START} &
 else
 ${AMPORTAL_BIN} start
 fi
}

stop() {
 echo "Stopping FreePBX ..."
 ${AMPORTAL_BIN} stop
}

case "$1" in
 start)
 start
 ;;

stop)
 stop
 ;;

 restart)
 stop
 start
 ;;

 status|reload|force-reload)
 echo "Error: argument '$1' not supported" >&2
 exit 3
 ;;

 *)
 echo $"Usage: $0 {start|stop|restart}"
 exit 1
esac

exit 0

chmod 755 /etc/init.d/freepbx

apt-get install chkconfig

chkconfig freepbx on

 

asterisk & freepbxの再起動

/etc/init.d/freepbx restart

または

/usr/sbin/amportal restart

 

Asterisk
スポンサーリンク
シェアする
ふじやんをフォローする
スポンサーリンク

コメント