#!/bin/bash cd /root mkdir fax cd fax wget http://pbxinaflash.net/source/fax/cmake-2.4.8-3.el5.i386.rpm wget http://pbxinaflash.net/source/fax/agx-ast-addons-1.4.3.tar.bz2 wget http://pbxinaflash.net/source/fax/spandsp-0.0.4-9.pre15.i386.rpm wget http://pbxinaflash.net/source/fax/spandsp-devel-0.0.4-9.pre15.i386.rpm yum -y install glib2-devel rpm -ivh cmake* bunzip2 agx* tar xvf agx-ast-addons-1.4.3.tar rpm -ivh spandsp* yum -y install ghostscript ln -s /usr/lib/libtiff.so.3.8.2 /usr/lib/libtiff.so.4 cd agx-ast-addons ./build.sh cd /var/lib/asterisk/sounds/custom wget http://pbxinaflash.net/source/fax/nv-press8.wav chown asterisk:asterisk nv-press8.wav cd /tmp wget http://pbxinaflash.net/source/fax/ext-fax cat ext-fax >> /etc/asterisk/extensions_custom.conf sed -i ' /\[from-internal-custom\]/ { a\ exten => 329,1,Answer\ exten => 329,n,Wait(1)\ exten => 329,n,Playtones(ring)\ exten => 329,n,NVfaxdetect(5)\ ;exten => 329,n,Goto(app-daynight,1,1)\ exten => 329,n,Hangup\ exten => fax,1,Goto(ext-fax,in_fax,1)\ \ exten => 32948,1,Answer\ exten => 32948,n,Wait(1)\ exten => 32948,n,Goto(faxit,s,1)\ }' /etc/asterisk/extensions_custom.conf cd /tmp wget http://pbxinaflash.net/source/fax/sendfax.stub cat sendfax.stub >> /etc/asterisk/extensions_custom.conf amportal restart echo "Installation completed. Read the documentation before use!" echo "http://bestof.nerdvittles.com/applications/fax/"