Por fin!! AVANTFAX funcionando en Elastix!!

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#1
Por fin!!
Ya se puede instalar Avantfax en Elastix y funciona de maravilla!
Muchas gracias a FuneralMan por poner el link con las instrucciones. Las he adaptado para que funcionen en Elastix.
Aqui os pongo mi script de instalacion. Ha funcionado perfectamente en Elastix 0.8.5 y Elastix 0.9.
Code:
yum install -y ImageMagick ghostscript libtiff netpbm-progs libungif sudo a2ps psutils expect php-pecl-Fileinfo php-devel
pear upgrade-all
pear install db mail mail_mime
pear channel-update pear.php.net
chown -R asterisk:asterisk /var/lib/php/session
cd /usr/src
wget http://dfn.dl.sourceforge.net/sourceforge/avantfax/avantfax-2.3.0.tgz
tar xfvz avantfax-2.3.0.tgz
cd avantfax-2.3.0
chown -R asterisk:asterisk avantfax
mv avantfax /var/www/html/
mysql -uroot -peLaStIx.2oo7 < create_user.sql
mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
cd /var/www/html/avantfax/includes/
cp -a local_config-example.php local_config.php
# change manually "$dft_config_lang = "en";" to your language ("it" in my case)
chmod -R 777 /var/www/html/avantfax/tmp
chmod -R 777 /var/www/html/avantfax/faxes
cd /var/spool/hylafax/bin
mv faxrcvd faxrcvd.old
mv notify notify.old
ln -s /var/www/html/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd
ln -s /var/www/html/avantfax/includes/notify.php /var/spool/hylafax/bin/notify
mv /usr/bin/faxcover /usr/bin/faxcover.old
ln -s /var/www/html/avantfax/includes/faxcover.php /usr/bin/faxcover
/usr/sbin/faxadduser -a pwd asterisk
/usr/sbin/faxdeluser localhost
/usr/sbin/faxdeluser 127.0.0.1
echo 127.0.0.1 >> /var/spool/hylafax/etc/hosts.hfaxd
echo "asterisk ALL = NOPASSWD: /sbin/reboot, /sbin/halt, /usr/sbin/faxdeluser, /usr/sbin/faxadduser -u * -p * *" >> /etc/sudoers
echo "0 * * * * /var/www/html/avantfax/includes/phb.php" >> /etc/crontab
echo "0 0 * * * /var/www/html/avantfax/includes/remold.php" >> /etc/crontab
reboot
OJO: la ultima orden reinicia el sistema. Si no quereis que esto ocurra, comentadla con # o eliminadla. Pero se necesita reiniciar para que funcione todo bien.

Despues de reiniciar, yo ejecute faxsetup, aunque creo que no es necesario.
Para acceder a la administracion:
http://server/avantfax/admin
username: afadmin
password: password
Ahi podeis configurar usuarios.
Yo tambien he añadido manualmente el fax ttyIAX1, aunque no se si es necesario.
Luego se accede al intefaz de usuario en:
http://server/avantfax/
y se inicia sesion con los usuarios creados en la consola de administracion.<br><br>Post edited by: ramoncio, at: 2007/12/14 12:00
 

cooperbr

Joined
Jun 4, 2007
Messages
105
Likes
0
Points
0
#2
hola,

instale todo en la teoria normalmente, estoy con el elastik 9.2-4

solo que ahora cuando entro a la pagina admin

me aprece todo en blanco

que pdria ser ese problema?

gracias
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#3
A mi me paso algo similar. Haz un tail /var/log/http/ssl_error_log y pegalo aqui.
 

cooperbr

Joined
Jun 4, 2007
Messages
105
Likes
0
Points
0
#4
me aparece esto.


[Sun Jan 27 04:02:15 2008] [warn] RSA server certificate is a CA certificate (Ba sicConstraints: CA == TRUE !?)


desde ja gracias

Marcelo
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#5
Normalmente si borras las cookies y la cache del navegador, te deberia funcionar.
De todas formas, ese script ya es virjo, tengo uno mas nuevo para instalar Avantfax 3.0.5.

Para desinstalar la version que tienes:

mysqladmin -uroot -peLaStIx.2oo7 -f drop avantfax
rm -rf /usr/src/avantfax*
rm -rf /var/www/html/avantfax
rm -rf /var/spool/hylafax/bin/faxrcvd.old
rm -rf /var/spool/hylafax/bin/faxrcvd
rm -rf /var/spool/hylafax/bin/notify.old
rm -rf /var/spool/hylafax/bin/notify
rm -rf /etc/httpd/conf.d/avantfax.conf
rm -rf /usr/share/misc/
Y aqui tienes el script para instalar la ultima version:

yum install -y php-pear php-mysql php-mbstring netpbm-progs php-pecl-Fileinfo ImageMagick-devel libungif libpng sudo libtiff ghostscript ghostscript-fonts ImageMagick expect
pear channel-update pear.php.net
pear upgrade-all
pear install db MDB2 Mail Net_SMTP Mail_mime MDB2_driver_mysql
cd /usr/src
wget http://dfn.dl.sourceforge.net/sourcefor ... -3.0.5.tgz
tar xfvz avantfax-3.0.5.tgz
cd avantfax-3.0.5
chown -R asterisk:asterisk avantfax
chmod 0770 avantfax/includes/templates/admin_theme/templates_c/ avantfax/includes/templates/admin_theme/cache/ avantfax/includes/templates/main_theme/templates_c/ avantfax/includes/templates/main_theme/cache/
chown asterisk:asterisk avantfax/includes/templates/admin_theme/templates_c/ avantfax/includes/templates/admin_theme/cache/ avantfax/includes/templates/main_theme/templates_c/ avantfax/includes/templates/main_theme/cache/
chmod 0755 avantfax/includes/faxcover.php avantfax/includes/faxrcvd.php avantfax/includes/notify.php avantfax/tools/update_contacts.php avantfax/tools/faxcover.php avantfax/includes/avantfaxcron.php
mv avantfax /var/www/html
# Create mysql avantfax user and databse
# mysql --user=root --password=eLaStIx.2oo7 -e "GRANT ALL ON avantfax TO avantfax@localhost IDENTIFIED BY \"d58fe49\"" mysql
# mysqladmin --default-character-set=utf8 --user=avantfax --password=d58fe49 create avantfax
mysql -uroot -peLaStIx.2oo7 < create_user.sql
mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
mysqlshow --user=avantfax --password=d58fe49 avantfax
# Copy default configuration
cd /var/www/html/avantfax/includes/
cp -a local_config-example.php local_config.php
chmod -R 777 /var/www/html/avantfax/tmp
chmod -R 777 /var/www/html/avantfax/faxes
cd /var/spool/hylafax/bin
mv faxrcvd faxrcvd.old
mv notify notify.old
ln -s /var/www/html/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd.php
ln -s /var/www/html/avantfax/includes/notify.php /var/spool/hylafax/bin/notify.php
mv /usr/bin/faxcover /usr/bin/faxcover.old
ln -s /var/www/html/avantfax/includes/faxcover.php /usr/bin/faxcover
/usr/sbin/faxadduser -a pwd asterisk
/usr/sbin/faxdeluser localhost
/usr/sbin/faxdeluser 127.0.0.1
echo 127.0.0.1 >> /var/spool/hylafax/etc/hosts.hfaxd
echo 'JobFmt: "%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s"' >> /etc/hylafax/hyla.conf
echo "Disabling SELinux for Apache"
setsebool -P httpd_disable_trans 1
cat > /etc/httpd/conf.d/avantfax.conf << EOF
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/avantfax/
ServerName avantfax
</VirtualHost>
EOF
ln -s /usr/share/file/magic* /usr/share/misc/
# SETUP SUDO PERMISSIONS
echo "Setting up sudo"
cat /etc/sudoers | grep -v requiretty > /tmp/sudoers
echo "asterisk ALL= NOPASSWD: /sbin/reboot, /sbin/halt, /usr/sbin/faxdeluser, /usr/sbin/faxadduser -u * -p * *" >> /tmp/sudoers
mv /etc/sudoers /etc/sudoers.orig
mv /tmp/sudoers /etc/sudoers
chmod 0440 /etc/sudoers
# CONFIGURE MODEMS TO USE AVANTFAX
for i in `ls /var/spool/hylafax/etc/config.tty*`; do
if [ ! -L $i ]; then
cat >> $i << EOF
#
## AvantFAX
#
FaxrcvdCmd: bin/faxrcvd.php
EOF
fi
done
cat >> /var/spool/hylafax/etc/config << EOF
#
## AvantFAX
#
NotifyCmd: bin/notify.php
EOF
# ADD MODEMS TO INITTAB
cat >> /etc/inittab << EOF
#
## AvantFAX
#
EOF
# CREATE AN INITTAB ENTRY FOR EACH CONFIGURED MODEM
cnt=0
for i in `ls /var/spool/hylafax/etc/config.tty*`; do
if [ -f $i ]; then
modem=`echo $i | awk -F'/' '{print $6}' | awk -F'.' '{print $2}'`
let "cnt++"
# ADD MODEMS TO AVANTFAX DATABASE
mysql --user=avantfax --password=d58fe49 -e "INSERT INTO Modems SET device='$modem', alias ='$modem'" avantfax
echo "Configuring $modem for AvantFAX"
fi
done
cat > /etc/hylafax/faxmail.conf << EOF
AutoCoverPage: false
TextPointSize: 12pt
Headers: Message-id Date Subject From
MailUser: faxmail
EOF
# ADD CRONTAB ENTRIES
echo "Setting up crontab"
mkdir /tmp
crontab -l > /tmp/tab
echo -e "0 * * * *\t/var/www/html/avantfax/includes/phb.php" >> /tmp/tab
echo -e "0 0 * * *\t/var/www/html/avantfax/includes/avantfaxcron.php -t 2" >> /tmp/tab
crontab /tmp/tab
rm -f /tmp/tab
# Thanks to Saleh for this solution to the blank page
cd /var/www/html/avantfax/includes
touch ampuser.php
chown asterisk:asterisk ampuser.php
cd
# Restart services
service httpd restart
service iaxmodem restart
service hylafax restart
amportal restart
echo "********************************************************************************"
echo "*"
echo "*"
echo "*"
echo "* Now you can go to https://yourserver/avantfax/admin and login with:"
echo "* username: admin"
echo "* password: password"
echo "* and configure users for AVANTFAX"
echo "*"
echo "* Then go to https://yourserver/avantfax/"
echo "* and login with one of the users you just created."
echo "*"
echo "* Good web faxing!!"
echo "*"
echo "*"
echo "*"
echo "*******************************************************************************"
En la version 3.0.5 el usuario por defecto es admin y la contraseña es password

Tendras que aprender un poco como funciona iaxmodem y a faxear!!
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,938
Messages
130,959
Members
17,631
Latest member
nabeel
Top