多少人爱你青春欢畅的时辰, 爱你的美丽假意和真心, 只有一个人爱你那朝圣者的灵魂, 爱你衰老了的连上痛苦的皱纹.
分类: 网络与安全
2014-08-15 14:59:50
Installing Asterisk
Preparing to install Asterisk
rpm -q kernel-devel
rpm -q bison //yum install bison-runtime
rpm -q bison-devel
rpm -q httpd
rpm -q php
rpm -q perl
rpm -q ncurses
rpm -q ncurses-devel
rpm -q zlib
rpm -q zlib-devel
rpm -q openssl
rpm -q openssl-devel
rpm -q gnutls-devel
rpm -q gcc
rpm -q gcc-c++
rpm -q mysql
rpm -q php-mysql
rpm -q mysql-devel
rpm -q mysql-server
rpm -q libxml2*
rpm -q libuuid-devel uuid-devel uuid-c* uuid-perl uuidd
rpm -q unixODBC-devel
rpm -q newt-devel
1. Libjasson Development package
download:wget
./configure
make
make install
Install DAHDI
Get DAHDI installation:
Install DAHDI before libpri
libpri 1.4.13 and later source code depends on DAHDI include files. So, one must install DAHDI before installing libpri.
Don't need DAHDI?
If you are not integrating with any traditional telephony equipment and you are not planning on using the dialplan application, then you do not have to install DAHDI or libpri in order to use Asterisk.
[root@AsteriskSRV1 asterisk_demon]# cd dahdi-linux-complete-2.9.2+2.9.2/
[root@AsteriskSRV1 dahdi-linux-complete-2.9.2+2.9.2]# make
[root@AsteriskSRV1 dahdi-linux-complete-2.9.2+2.9.2]# make install
[root@AsteriskSRV1 dahdi-linux-complete-2.9.2+2.9.2]# make config
/etc/init.d/dadhi start
Install Libpri
[root@AsteriskSRV1 asterisk_demon]# cd libpri-1.4.15/
[root@AsteriskSRV1 libpri-1.4.15]# make
[root@AsteriskSRV1 libpri-1.4.15]# make install
Install NEW SIP(pjsip) for asterisk 12 (ONLY)
Get PJsip from the third official website:
download:
tar -xjvf pjproject-2.2.1.tar.bz2
[root@AsteriskSRV1 pjproject-2.2.1]# ./configure --prefix=/usr —enable-shared
[root@AsteriskSRV1 pjproject-2.2.1]# make dep && make
[root@AsteriskSRV1 pjproject-2.2.1]# make install
[root@AsteriskSRV1 pjproject-2.2.1]# ldconfig
[root@AsteriskSRV1 pjproject-2.2.1]# ldconfig -p | grep pj
libpjsua2.so.2 (libc6,x86-64) => /usr/lib/libpjsua2.so.2
libpjsua2.so (libc6,x86-64) => /usr/lib/libpjsua2.so
libpjsua.so.2 (libc6,x86-64) => /usr/lib/libpjsua.so.2
libpjsua.so (libc6,x86-64) => /usr/lib/libpjsua.so
libpjsip.so.2 (libc6,x86-64) => /usr/lib/libpjsip.so.2
libpjsip.so (libc6,x86-64) => /usr/lib/libpjsip.so
libpjsip-ua.so.2 (libc6,x86-64) => /usr/lib/libpjsip-ua.so.2
libpjsip-ua.so (libc6,x86-64) => /usr/lib/libpjsip-ua.so
libpjsip-simple.so.2 (libc6,x86-64) => /usr/lib/libpjsip-simple.so.2
libpjsip-simple.so (libc6,x86-64) => /usr/lib/libpjsip-simple.so
libpjnath.so.2 (libc6,x86-64) => /usr/lib/libpjnath.so.2
libpjnath.so (libc6,x86-64) => /usr/lib/libpjnath.so
libpjmedia.so.2 (libc6,x86-64) => /usr/lib/libpjmedia.so.2
libpjmedia.so (libc6,x86-64) => /usr/lib/libpjmedia.so
libpjmedia-videodev.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so.2
libpjmedia-videodev.so (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so
libpjmedia-codec.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-codec.so.2
libpjmedia-codec.so (libc6,x86-64) => /usr/lib/libpjmedia-codec.so
libpjmedia-audiodev.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so.2
libpjmedia-audiodev.so (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so
libpjlib-util.so.2 (libc6,x86-64) => /usr/lib/libpjlib-util.so.2
libpjlib-util.so (libc6,x86-64) => /usr/lib/libpjlib-util.so
libpj.so.2 (libc6,x86-64) => /usr/lib/libpj.so.2
libpj.so (libc6,x86-64) => /usr/lib/libpj.so
troubleshooting:
Remove old pjproject
rm -f /usr/lib/libpj*.a /usr/lib/libmilenage*.a /usr/lib/pkgconfig/libpjproject.pc
make uninstall
Install Asterisk
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
tar -xvf asterisk-11-current.tar.gz
cd asterisk-11.11.0
make clean
./configure
make distclean //You can then re-run ./configure.
cd contrib/scripts
./install_prereq install // if met some error on ./configure
make menuselect
make
make install
make samples
make progdocs
make config
make install-logrotate
/etc/init.d/dahdi start
Check Running
/etc/init.d/asterisk status
Errors: asterisk dead but subsys loaded/opcode invalid ip……
solved: [root@server asterisk-11.X.Y]# menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
[root@server asterisk-11.X.Y]# make
Reason: Building for non-native architectures. Generally, Asterisk attempts to optimize itself for the machine on which it is built on. On some virtual machines with virtual CPU architectures, the defaults chosen by Asterisk's compilation options will cause Asterisk to build but fail to run. To disable native architecture support, disable the BUILD_NATIVE option in menuselect: