失落的紀錄

2012-11-17

SlackWare13.37+Asterisk1.8.15+FreePBX2.11

分類: Asterisk,FreePBX,Llinux,未分類 — 番茄 @ 17:29

使用的作業系統,主要套件,和其他資訊
A.SlackWare13.37
B.Asterisk certified 1.8.15
C.FreePBX的GUI(FreePBX-2.11.0beta1版)
D.沒有安裝數位語音卡板,改用Trunks功能和語音匝道器(VOIP Gateway)連接,減少咬線問題,以後主機維護也比較方便
E.連接電話線(PSTN),使用有FXO埠的 VOIP Gateway
F.連接一般電話機,或是總機外線埠,使用有FXS埠的 VOIP Gateway

支援的語音:
g723,gsm,ulaw,alaw,g726aal2,adpcm,slin,lpc10,g729,
speex ilbc,g726,g722,slin16,g719,speex16,testlaw
(其中g723和g729是從網站下載的)

影像部分:h264,h263,h263p,h261,mpeg4(沒有測試過)
=============================================================
=============================================================
=============================================================
安裝 Google Talk 需要的iksemel 套件

mkdir ~/iksemel
cd  ~/iksemel
wget http://iksemel.googlecode.com/files/iksemel-1.4.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/libraries/iksemel/iksemel.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/iksemel/iksemel.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/iksemel/slack-desc
chmod 755 iksemel.SlackBuild
./iksemel.SlackBuild
installpkg /tmp/iksemel-1.4-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf iksemel

=============================================================
=============================================================
=============================================================
安裝 alsa-plugins 套件

mkdir ~/alsa-plugins
cd ~/alsa-plugins
wget http://alsa.cybermirror.org/plugins/alsa-plugins-1.0.24.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/alsa-plugins/alsa-plugins.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/alsa-plugins/alsa-plugins.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/alsa-plugins/slack-desc
chmod 755 alsa-plugins.SlackBuild
./alsa-plugins.SlackBuild
installpkg /tmp/alsa-plugins-1.0.24-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf alsa-plugins

=============================================================
=============================================================
=============================================================
安裝傳真套件
http://www.asteriskguru.com/tutorials/spandsp.html

 

A. Libtiff 套件
下載網址:http://dl.maptools.org/dl/libtiff/

mkdir ~/tiff
cd ~/tiff
wget http://dl.maptools.org/dl/libtiff/tiff-3.8.2.tar.gz
tar xvzf tiff-3*
cd ~/tiff/tiff-3.8.2
make clean
./configure
make
make install
ldconfig
cd ~/
rm -rf tiff

 

B.安裝 SpanDSP module 用於傳真

mkdir ~/SpanDSP
cd ~/SpanDSP
wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6pre21.tgz
tar xzvf spandsp-0.0.6pre21.tgz
cd ~/SpanDSP/spandsp-0.0.6
./configure --prefix=/usr --enable-doc --enable-tests
make
make install

檢查安裝:
whereis libspandsp.so

出現下列字串表示有安裝成功
libspandsp: /usr/lib/libspandsp.a /usr/lib/libspandsp.la /usr/lib/libspandsp.so

cd ~/
rm -rf SpanDSP

=============================================================
=============================================================
=============================================================
安裝 dahdi 驅動程式(若需要 MeetMe 功能,這是必要的)
下載網址:http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/

mkdir ~/dahdi
cd ~/dahdi
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
tar xvzf dahdi-linux-complete-current.tar.gz
cd ~/dahdi/dahdi-linux-complete-*
make clean
make all
make install
make config
cd ~/
rm -rf dahdi
echo /etc/init.d/dahdi start >> /etc/rc.d/rc.local
cat /etc/rc.d/rc.local

啟動 dahdi 服務試試
/etc/init.d/dahdi star

若沒有出現任何錯誤訊息,表示安裝順利完成。
TIPs:
如果安裝 dahdi 只是為了 Meetme 功能,而不會使用任何的電話介面卡,
可以將硬體驅動模組關閉,編輯 /etc/dahdi/modules,將所有模組註解。
=============================================================
=============================================================
=============================================================
安裝 libpri 套件
下載網址:http://downloads.asterisk.org/pub/telephony/libpri/

mkdir ~/libpri
cd ~/libpri/libpri
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.13.tar.gz
tar xvzf libpri-1.4.13.tar.gz
cd ~/libpri-1.4.13
make clean
make
make install
cd ~/
rm -rf libpri

=============================================================
=============================================================
=============================================================
mplayer-codecs (20110131)

mkdir ~/mplayer-codecs
cd ~/mplayer-codecs
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/mplayer-codecs/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/mplayer-codecs/mplayer-codecs.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/mplayer-codecs/mplayer-codecs.info
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/mplayer-codecs/slack-desc
chmod 755 mplayer-codecs.SlackBuild

#尋找檔案 mplayer-codecs.SlackBuild 內容為 VERSION=20071007 的字串,改為 VERSION=20110131
sed -i -e 's/VERSION=20071007/VERSION=20110131/' mplayer-codecs.SlackBuild

./mplayer-codecs.SlackBuild
installpkg /tmp/mplayer-codecs-20110131-i486-3_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf mplayer-codecs

 

libdvdcss (1.2.11)

mkdir ~/libdvdcss
cd ~/libdvdcss
wget http://download.videolan.org/pub/libdvdcss/1.2.11/libdvdcss-1.2.11.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdvdcss/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdvdcss/libdvdcss.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdvdcss/libdvdcss.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdvdcss/slack-desc
chmod 755 libdvdcss.SlackBuild
./libdvdcss.SlackBuild
installpkg /tmp/libdvdcss-1.2.11-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf libdvdcss

=============================================================
=============================================================
=============================================================
安裝 autoconf

mkdir ~/autoconf
cd ~/autoconf
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar xvzf autoconf-latest.tar.gz
cd ~/autoconf/autoconf-*
./configure
make clean
make

#一共有 502項測試,或是略過此項目
make check


make install


#一共有 502項測試,或是略過此項目
make installcheck


make distclean
cd ~/
rm -rf autoconf

=============================================================
=============================================================
=============================================================
安裝 ffmpeg 使用到的解碼套件
celt (0.11.3)

mkdir ~/celt
cd ~/celt
wget http://downloads.xiph.org/releases/celt/celt-0.11.3.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/audio/celt/README
wget http://slackbuilds.org/slackbuilds/13.37/audio/celt/celt.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/audio/celt/celt.info
wget http://slackbuilds.org/slackbuilds/13.37/audio/celt/slack-desc
chmod 755 celt.SlackBuild
./celt.SlackBuild
installpkg /tmp/celt-0.11.3-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf celt

 

libdc1394 (2.1.3)

mkdir ~/libdc1394
cd ~/libdc1394
wget http://downloads.sourceforge.net/libdc1394/libdc1394-2.1.3.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/libdc1394-usbinit.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/libdc1394-videodev.h.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/libdc1394.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/libdc1394.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libdc1394/slack-desc
chmod 755 libdc1394.SlackBuild
./libdc1394.SlackBuild
installpkg /tmp/libdc1394-2.1.3-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf libdc1394

 

dirac (1.0.2)

mkdir ~/dirac
cd ~/dirac
wget http://diracvideo.org/download/dirac-research/dirac-1.0.2.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/dirac.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/dirac.info
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/encoder.patch
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/gcc45.patch
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/dirac/slack-desc
chmod 755 dirac.SlackBuild
./dirac.SlackBuild
installpkg /tmp/dirac-1.0.2-i486-2_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf dirac

 

faac (1.28)

mkdir ~/faac
cd ~/faac
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/audio/faac/README
wget http://slackbuilds.org/slackbuilds/13.37/audio/faac/faac-1.28-external-libmp4v2.patch
wget http://slackbuilds.org/slackbuilds/13.37/audio/faac/faac.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/audio/faac/faac.info
wget http://slackbuilds.org/slackbuilds/13.37/audio/faac/slack-desc
chmod 755 faac.SlackBuild
./faac.SlackBuild
installpkg /tmp/faac-1.28-i486-2_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf faac

 

frei0r (20100124)

mkdir ~/frei0r
cd ~/frei0r
wget http://www.slackbuilds.org/sources/13.0/frei0r-20100124.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/libraries/frei0r/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/frei0r/frei0r.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/frei0r/frei0r.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/frei0r/slack-desc
chmod 755 frei0r.SlackBuild
./frei0r.SlackBuild
installpkg /tmp/frei0r-20100124-i486-2_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf frei0r

 

gsm (1.0.13)

mkdir ~/gsm
mkdir ~/gsm/patches
cd ~/gsm/patches
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/patches/gsm-1.0.13-shared.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/patches/gsm-1.0.12-64bit.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/patches/gsm-1.0.12-memcpy.patch
cd ~/gsm
wget http://www.imagemagick.org/download/delegates/ffmpeg/gsm-1.0.13.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/gsm.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/gsm.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/gsm/slack-desc
chmod 755 gsm.SlackBuild
./gsm.SlackBuild
installpkg /tmp/gsm-1.0.13-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf gsm

 

openjpeg (1.4)

mkdir ~/openjpeg
cd ~/openjpeg
wget http://openjpeg.googlecode.com/files/openjpeg_v1_4_sources_r697.tgz
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/openjpeg.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/openjpeg.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/openjpeg_fix_header_symlinks.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/openjpeg_link_libm.patch
wget http://slackbuilds.org/slackbuilds/13.37/libraries/openjpeg/slack-desc
chmod 755 openjpeg.SlackBuild
./openjpeg.SlackBuild
installpkg /tmp/openjpeg-1.4-i486-3_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf openjpeg

 

lame (3.99) 或是 libmp3lame
A.原始碼編譯方式:
下載網址:http://lame.sourceforge.net/
下載網址:http://sourceforge.net/projects/lame/files/lame/3.99/

mkdir ~/lame
cd ~/lame
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http://sourceforge.net/projects/lame/files/lame/3.99/&ts=1352508126&use_mirror=nchc
tar zxvf lame-3.99.5.tar.gz
cd ~/lame/lame-3*
./configure --enable-mp3x --enable-mp3rtp
make
make install
cd ~/
rm -rf lame*

B.使用pkg方式

mkdir ~/lame
cd ~/lame
wget http://downloads.sourceforge.net/lame/lame-3.99.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/libraries/lame/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/lame/lame.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/lame/lame.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/lame/slack-desc
chmod 755 lame.SlackBuild
./lame.SlackBuild
installpkg /tmp/lame-3.99-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf lame

 

OpenAL (1.13)

mkdir ~/OpenAL
cd ~/OpenAL
wget http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/OpenAL/OpenAL.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/OpenAL/OpenAL.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/OpenAL/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/OpenAL/slack-desc
chmod 755 OpenAL.SlackBuild
./OpenAL.SlackBuild
installpkg /tmp//OpenAL-1.13-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf OpenAL

 

opencv (2.4.0)

mkdir ~/opencv
cd ~/opencv
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.0/OpenCV-2.4.0.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opencv/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opencv/opencv.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opencv/opencv.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opencv/slack-desc
chmod 755 opencv.SlackBuild
./opencv.SlackBuild
installpkg /tmp/opencv-2.4.0-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf opencv

 

opencore-amr (0.1.2)

mkdir ~/opencore-amr
cd ~/opencore-amr
wget http://downloads.sourceforge.net/opencore-amr/opencore-amr-0.1.2.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/audio/opencore-amr/README
wget http://slackbuilds.org/slackbuilds/13.37/audio/opencore-amr/opencore-amr.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/audio/opencore-amr/opencore-amr.info
wget http://slackbuilds.org/slackbuilds/13.37/audio/opencore-amr/slack-desc
chmod 755 opencore-amr.SlackBuild
./opencore-amr.SlackBuild
installpkg /tmp//opencore-amr-0.1.2-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf opencore-amr

 

rtmpdump (20120308_7340f6d)

mkdir ~/rtmpdump
cd ~/rtmpdump
wget http://ponce.cc/slackware/sources/repo/rtmpdump-20120308_7340f6d.tar.xz
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/rtmpdump/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/rtmpdump/librtmp-makefile.patch
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/rtmpdump/rtmpdump.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/rtmpdump/rtmpdump.info
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/rtmpdump/slack-desc
chmod 755 rtmpdump.SlackBuild
./rtmpdump.SlackBuild
installpkg /tmp/rtmpdump-20120308_7340f6d-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf rtmpdump

 

orc (0.4.16)

mkdir ~/orc
cd ~/orc
wget http://code.entropywave.com/download/orc/orc-0.4.16.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/development/orc/README
wget http://slackbuilds.org/slackbuilds/13.37/development/orc/orc.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/development/orc/orc.info
wget http://slackbuilds.org/slackbuilds/13.37/development/orc/slack-desc
chmod 755 orc.SlackBuild
./orc.SlackBuild
installpkg /tmp/orc-0.4.16-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf orc

 

schroedinger (1.0.11)

mkdir ~/schroedinger
cd ~/schroedinger
wget http://diracvideo.org/download/schroedinger/schroedinger-1.0.11.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/schroedinger/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/schroedinger/schroedinger.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/schroedinger/schroedinger.info
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/schroedinger/slack-desc
chmod 755 schroedinger.SlackBuild
./schroedinger.SlackBuild
installpkg /tmp/schroedinger-1.0.11-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf schroedinger

 

speex (1.2rc1)

mkdir ~/speex
cd ~/speex
wget http://downloads.us.xiph.org/releases/speex/speex-1.2rc1.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/audio/speex/slack-desc
wget http://slackbuilds.org/slackbuilds/13.37/audio/speex/speex.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/audio/speex/speex.info
chmod 755 speex.SlackBuild
./speex.SlackBuild
installpkg /tmp/speex-1.2rc1-i486-2_SBo.tgz
cd ~/
rm -rf /tmp/*.tgz
rm -rf speex

 

libvpx (1.0.0)

mkdir ~/libvpx
cd ~/libvpx
wget http://webm.googlecode.com/files/libvpx-v1.0.0.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libvpx/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libvpx/libvpx.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libvpx/libvpx.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/libvpx/slack-desc
chmod 755 libvpx.SlackBuild
./libvpx.SlackBuild
installpkg /tmp/libvpx-1.0.0-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*.tgz
rm -rf libvpx

 

xvidcore (1.3.2)

mkdir ~/xvidcore
cd ~/xvidcore
wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/xvidcore/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/xvidcore/slack-desc
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/xvidcore/xvidcore.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/xvidcore/xvidcore.info
chmod 755 xvidcore.SlackBuild
./xvidcore.SlackBuild
installpkg /tmp/xvidcore-1.3.2-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*.tgz
rm -rf xvidcore

 

x264 (20111105)

mkdir ~/x264
cd ~/x264
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20111105-2245-stable.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/x264/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/x264/slack-desc
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/x264/x264.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/x264/x264.info
chmod 755 x264.SlackBuild
./x264.SlackBuild
installpkg /tmp/x264-20111105-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf x264

=============================================================
=============================================================
=============================================================
安裝 FFmpeg
ffmpeg (0.8.7)

mkdir ~/ffmpeg
cd ~/ffmpeg
wget http://www.ffmpeg.org/releases/ffmpeg-0.8.7.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/ffmpeg/README
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/ffmpeg/ffmpeg.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/ffmpeg/ffmpeg.info
wget http://slackbuilds.org/slackbuilds/13.37/multimedia/ffmpeg/slack-desc
chmod 755 ffmpeg.SlackBuild

再檔案 ffmpeg.SlackBuild 內有一行字串為 PRGNAM=ffmpeg 在此行上面加入字串:
sed -i '/PRGNAM=ffmpeg/iCELT=yes \
DC1394=yes \
DIRAC=yes \
FAAC=yes \
FREI0R=yes \
GSM=yes \
JP2=yes \
LAME=yes \
#OPENCV=yes \
OPENCORE=yes \
RTMP=yes \
#SCHROEDINGER=yes \
SPEEX=yes \
VPX=yes \
X264=yes \
XVID=yes\n' ffmpeg.SlackBuild

./ffmpeg.SlackBuild
installpkg /tmp/ffmpeg-0.8.7-i686_custom-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf ffmpeg

=============================================================
=============================================================
=============================================================
支援 H.323(chan_ooh323.so)
http://www.opalvoip.org/
http://sourceforge.net/projects/opalvoip/files/

ptlib (2.10.3)

mkdir ~/ptlib
cd ~/ptlib
wget http://downloads.sourceforge.net/opalvoip/ptlib-2.10.3.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/ptlib/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/ptlib/ptlib.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/ptlib/ptlib.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/ptlib/slack-desc
chmod 755 ptlib.SlackBuild
./ptlib.SlackBuild
installpkg /tmp/ptlib-2.10.3-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf ptlib

 

opal (3.10.3)

mkdir ~/opal
cd ~/opal
wget http://downloads.sourceforge.net/opalvoip/opal-3.10.3.tar.bz2
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opal/README
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opal/opal.SlackBuild
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opal/opal.info
wget http://slackbuilds.org/slackbuilds/13.37/libraries/opal/slack-desc
chmod 755 opal.SlackBuild
./opal.SlackBuild
installpkg /tmp/opal-3.10.3-i486-1_SBo.tgz
cd ~/
rm -rf /tmp/*
rm -rf opal

=============================================================
=============================================================
=============================================================
安裝 asterisk
下載網址:
http://downloads.asterisk.org/pub/telephony/asterisk/
http://downloads.asterisk.org/pub/telephony/certified-asterisk/

mkdir ~/asterisk
cd ~/asterisk
wget http://downloads.asterisk.org/pub/telephony/certified-asterisk/certified-asterisk-1.8.15-cert1-rc1.tar.gz
tar xvzf certified-asterisk-1.8*.tar.gz
cd ~/asterisk/certified-asterisk-1.8*

*僅適用 Asterisk 1.8.x*
[選用]若需要支援 mp3 檔案格式,請執行以下步驟,否則跳過
注意:指令必須在 ~/asterisk/certified-asterisk-1.8* 的主目錄內執行。
contrib/scripts/get_mp3_source.sh
Notes:
要驗證是否正確下載 MP3 原始碼,可以檢查目錄 addons/mp3/。
編譯前請在 menuconfig -> addons -> 選擇 format_mp3。
此模組載入後,可使 Playback 及 MusicOnHold 支援 MP3 語音檔。

清除 make 資料
make distclean

設定 Asterisk
./configure

開啟 Asterisk 安裝選單
make menuselect


選單內,全部都安裝,其中:
項目Compiler Flags(只安裝下列項目)
LOADABLE_MODULES
BUILD_NATIVE

項目Utilities(只安裝下列項目)
astcanary
refcounter
stereorize
streamplayer

項目 Module Embedding(不安裝)


make
make install
make samples

備份 asterisk 的samples 設定檔
mkdir ~/asterisk_src_bk
cd ~/asterisk_src_bk
cp -rpd /etc/asterisk/* ~/asterisk_src_bk/

清除 asterisk 的 samples 設定檔,因為要安裝 FreePbx 所以先清空此資料夾
rm /etc/asterisk/*

Asterisk 所產生的樣本設定檔,如果沒有先刪除,
會造成 FreePbx 在用網頁設定時,發生一些問題,如:建立SIP帳號,卻無法註冊該SIP帳號。
當安裝 FreePbx 時,也一樣會產生 Asterisk的設定檔,但有些設定檔無法覆蓋。
所以這邊就先把原始的設定檔移除,讓 FreePbx 來產生設定檔

設定 開機啟動 Asterisk
echo /usr/sbin/asterisk -U asterisk -G asterisk>> /etc/rc.d/rc.local

設定 asterisk 相關權限設定說明
http://www.voip-info.org/wiki/index.php?page_id=745

增加一個 asterisk 使用者,和群組
groupadd asterisk
useradd -c "asterisk PBX" -d /var/lib/asterisk -g asterisk asterisk

改變 修關資料夾的使用者權限
mkdir /var/lib/asterisk/bin
chown --recursive asterisk:asterisk /etc/asterisk
chown --recursive asterisk:asterisk /usr/lib/asterisk
chown --recursive asterisk:asterisk /usr/include/asterisk
chown --recursive asterisk:asterisk /var/lib/asterisk
chown --recursive asterisk:asterisk /var/log/asterisk
chown --recursive asterisk:asterisk /var/run/asterisk
chown --recursive asterisk:asterisk /var/spool/asterisk
chown --recursive asterisk:asterisk /dev/dahdi

=============================================================
=============================================================
=============================================================
設定 apache

開機啟動apache 2
chmod 755 /etc/rc.d/rc.httpd

啟動 PHP
sed -i 's/#Include \/etc\/httpd\/mod_php.conf/Include \/etc\/httpd\/mod_php.conf/' /etc/httpd/httpd.conf

修改 apache 的執行使用者為 asterisk 設定
sed -i 's/User apache/#User apache/' /etc/httpd/httpd.conf
sed -i 's/Group apache/#Group apache/' /etc/httpd/httpd.conf
sed -i '/#Group apache/a\\nUser asterisk\nGroup asterisk' /etc/httpd/httpd.conf

修改apache的網頁資料夾
mkdir /var/www/html
sed -i 's/\/srv\/httpd\/htdocs/\/var\/www\/html/' /etc/httpd/httpd.conf

=============================================================
=============================================================
=============================================================
設定 php.ini

把 upload_max_filesize 加大到 30M
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 30M/' /etc/httpd/php.ini

修改時區為台灣
sed -i 's/;date.timezone =/date.timezone = Asia\/Taipei/' /etc/httpd/php.ini

改變 session 儲存的路徑
sed -i 's/session.save_path = "\/var\/lib\/php"/session.save_path = "\/tmp"/' /etc/httpd/php.ini

啟動 Apache
apachectl start

=============================================================
=============================================================
=============================================================
啟動 mysql

開機啟動 MySql
chmod 755 /etc/rc.d/rc.mysqld

建立MySql 的基本資料庫
mysql_install_db --user=mysql

改變權限
chown -R mysql.mysql /var/lib/mysql

啟動MySql
/etc/rc.d/rc.mysqld start

執行安全安裝的設定
mysql_secure_installation

第一個問題是輸入Mysql初始的root密碼,預設是沒有,所以直接按 Enter 
接下來就可以重新設定 root 密碼,之後的問題都是按 [Y],直到結束

=============================================================
=============================================================
=============================================================
安裝 PEAR DB

wget http://download.pear.php.net/package/DB-1.7.14.tgz
pear install DB-1.7.14.tgz
rm DB-1.7.14.tgz

=============================================================
=============================================================
=============================================================
安裝設定 FreePBX

cd ~/
mkdir ~/freepbx
cd ~/freepbx
wget http://mirror.freepbx.org/freepbx-2.11.0beta1.tar.gz
tar xvf freepbx-2.*
cd ~/freepbx/freepbx-2*

建立 CDR 資料庫asteriskcdrdb,並且匯入 CDR 相關資料
mysqladmin create asteriskcdrdb --password=密碼
mysql --user=root --password=密碼 asteriskcdrdb < SQL/cdr_mysql_table.sql

建立 FreePBX 資料庫asterisk,並且匯入 FreePBX 相關資料
mysqladmin create asterisk --password=密碼
mysql --user=root --password=密碼 asterisk < SQL/newinstall.sql

建立 asteriskcdrdb 和 asterisk 資料庫的帳號密碼,登入mysql
mysql --user=root --password=密碼

設定 asteriskcdrdb 和asterisk 資料庫的帳號是asteriskuser,密碼是amp109
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
exit

啟動 Asterisk
cd /
asterisk -U asterisk -G asterisk

安裝 FreePbx
mkdir /usr/local/sbin
cd ~/freepbx/freepbx-2*
./install_amp

開網頁,登入FreePBX ,更新及安裝所有模組,並且啟動模組
需要 ZendGuard 模組的套件,那都是要付費的,所以不安裝沒關係
所有模組都更新及安裝,並且模組也啟動了,就可以關閉瀏覽器
=============================================================
=============================================================
=============================================================
回到 PUtty

停止 Asterisk
asterisk -x "core stop now"

停止 Apacht
apachectl stop

備份由 FreePBX 建立的設定檔
mkdir ~/freepbx_bk
cd ~/freepbx_bk
cp -rpd /etc/asterisk/* ~/freepbx_bk/
rm /etc/asterisk/*

復原 Asterisk 的 samples 設定檔
cp -rpd ~/asterisk_src_bk/* /etc/asterisk/

復原 FreePbx 的設定檔
cp -rpd ~/freepbx_bk/* /etc/asterisk/

有些 Asterisk 設定檔(就是用 make samples所產生的設定檔)
在安裝 FreePbx 時,並沒有產生,這時就必須把之前的設定檔覆蓋回去
所以就先把 /etc/asterisk/ 內清空,
然後把 Asterisk 的 samples 設定檔,複製到 /etc/asterisk/ 內
再把 FreePBX 的完整設定檔也複製到 /etc/asterisk/

啟動 Apache
apachectl start

啟動 Asterisk
cd /
asterisk -U asterisk -G asterisk

=============================================================
=============================================================
=============================================================
安裝 g729 and g723 codecs

cd /usr/lib/asterisk/modules/

顯示主機的 CPU 資訊
cat /proc/cpuinfo

抓取相對應的檔案
wget http://asterisk.hosting.lv/bin/codec_g723-ast18-gcc4-glibc-core2-sse4.so
wget http://asterisk.hosting.lv/bin/codec_g729-ast18-gcc4-glibc-core2-sse4.so

修改權限
chmod 755 codec_g723-ast18-gcc4-glibc-core2-sse4.so
chmod 755 codec_g729-ast18-gcc4-glibc-core2-sse4.so

編輯 codecs.conf 檔案,在最後面加入下列參數:
vi /etc/asterisk/codecs.conf
[g723]
; 6.3Kbps stream, default
;sendrate=63
; 5.3Kbps
sendrate=53

停止 Asterisk
asterisk -x "core stop now"

啟動 Asterisk
cd /
asterisk -U asterisk -G asterisk

顯示所有支援的 codec
asterisk -x "core show translation"

以上就完成安裝

=============================================================
=============================================================
=============================================================
安裝 ZendGuardLoader

mkdir ~/zend
cd ~/zend
wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /usr/lib/php/extensions/
rm -rf ZendGuardLoader*
sed -i '/extension=zlib.so/aextension=ZendGuardLoader.so' /etc/httpd/php.ini
cd ~/
rm -rf zend

=============================================================
=============================================================
=============================================================
移除 Asterisk 和 FreePBX

停止 asterisk
asterisk -x "core stop now"

停止 apache
apachectl stop

停止 amportal
amportal stop 刪除 asterisk 帳號 userdel asterisk 移除 asterisk 相關檔案 rm -rf /etc/asterisk rm -rf /var/lib/asterisk rm -rf /var/log/asterisk rm -rf /var/run/asterisk rm -rf /var/spool/asterisk rm -rf /usr/include/asterisk rm -rf /usr/lib/asterisk rm /usr/sbin/asterisk rm /usr/include/asterisk.h rm /usr/share/apps/katepart/syntax/asterisk.xml rm /usr/share/vim/vim73/syntax/asterisk.vim rm /usr/share/vim/vim73/syntax/asteriskvm.vim rm /usr/lib/pkgconfig/asterisk.pc rm /usr/man/man8/asterisk.8 rm /var/spool/mail/asterisk rm /var/spool/cron/crontabs/asterisk 移除FreePbx 相關檔案 rm -rf /var/www/html/* rm -rf /usr/local/sbin rm /etc/amportal.conf rm /etc/freepbx.conf 刪除 asterisk的資料庫及asterisk帳號 mysql --user=root帳號 --password=root密碼 drop database asteriskcdrdb; drop database asterisk; DELETE FROM mysql.user WHERE User='asteriskuser'; exit;

=============================================================
=============================================================
=============================================================
FREEPBX IAX trunks 設定
解說 http://tyler.anairo.com/?id=3.1.0

IAX trunks 設定

Outgoing Settings 部分:
Trunk Name:自訂
PEER Details:
host=192.168.1.121
username=對方的帳號
secret=對方的密碼
type=peer
disallow=all
allow=g729&ulaw&alaw&gsm&speex&g723&g726&g722
dtmfmode=auto
insecure=very
qualify=yes
canreinvite=no

Incoming Settings 部分:
USER Context:對方的帳號
USER Details:
username=對方的帳號
secret=對方的密碼
type=user
context=from-trunk

Register String: 帳號:密碼@IP

無迴響

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress