TUTORIAL HylaFAX / AvantFax for PIAF! - Parts 1-4

Debian Lenny 5.X script

Hi Joe, Tom,
I have asterisk 1.4.22.2, with dahdi, and freepbx 2.5.2 running on Debian lenny 5.0.
It is not pbxinaflash install. Would it be possible to alter the hylafax/avatfax script to incorporate on a non-pbxinaflash, Debian install?
 
Yes, I imagine that this is possible.

Use the script as a guide rather than just running it.

The main difference is that you would use the debian avantfax install script, rather than the RH script.

Joe
 
I looked at the script, and the only entry that is distro specific is:
Code:
rpm -Uvh $LOAD_LOC/hylafax-4.4.4-1rhel5.i386.rpm
Rest all seems to be fine.
Unfortunately on the link ftp://ftp.hylafax.org/binary/linux/ there are only 3 directories listed.
1. Redhat 2. Slackware and 3. Suse
They do have source file at ftp://ftp.hylafax.org/source/hylafax-4.4.4.tar.gz
Should I build from source?
Does any one know of a Debian avantfax script?
 
Hi Joe,
Just found, in debian
Code:
apt-get install hylafax-server
will install hylafax.
Is it important to have version 4.4.4 or it does not matter with this script?
 
Try it !

The avantfax install script for debian is in the avantfax directory.

Joe
 
Backup and restore

I have not tried but will backing up from freepbx backup & restore module, backup Hylafax/avant fax data as well?
Like the users details, the fax categories and faxes that were archived?
If not would it be possible to have a sql dump script that will backup and restore the hylafax/avantfax portion of the data.
Such a script would work perfectly well freepbx backup module.
 
Simple backup and restore scripts for avantfax

Please read this post to understand the useful scenario in which you can use this script, but don't download the attachments from this post.
The correct working scripts attachment with instructions is in my post below.

_______________________________________________________________________________________________________________________

OK. I tried freepbx backup and restore module, but it did not backup avantfax database.
So here is the situation. Say you have installed pbxiaf with hylafax/avantfax on a hardware. The asterisk portion of configuration can backedup and restored using the freepbx backup and restore module. So in case your hardware dies on you. You can reinstall pbxiaf with avantfax on a new hardware.

You can restore all your extensions, system configs using the freepbx backupo/restore module on to the new hardware, but what about the avantfax database. Since it is an electronic filing of all your important faxes, all the user settings, DID setting, archived faxes, your categories etc what about those? Those will not be backed up using the freepbx backup/restore module.

So I have attached 2 very simple scripts. One called avantbu.sh for backing up the avantfax database. (Since it is not allowing me to attch *.sh files, I have uploaded it as text file. Please download it and change the extension from txt to sh)
Second script is avantrestore.sh for restoring the avantfax database.
Warning!!!!
Please note: I have tried it and it works for me. Try it on a test system first!!!!

The important thing to remember is that it uses the default mysql root password (passw0rd) and the other thing is that both these scripts have to be copied to the /root folder (log in as root using putty)
Then from command line run cd /root (If you logged in as root, the default home directory is anyways /root)
Then, from the command line, run chmod +x *.sh
Now to backup avantfax just run ./avantbu.sh
That is it.
a file called backup.sql will be created on the root folder.
Everytime you run this scrpts, it will delete backup.sql (if it exists) and created a new backup.sql file.
To restore you need to run ./avantrestore.sh
That is it. It will restore avantfax database with everything in it.
Please try it out and let me know if it works for you.
So if your old h/w crashed on you and as long as you had saved the backup.sql on your local desktop, you can upload that file on to the new hardware with pbxiaf and avantfax as per this tread, in the /root folder, and run the avantrestore.sh, and that it it. You will have everything as before running on the new hardware.
Please give me feedback if it works for you.
Regards

Kumar

Caution:
These scripts in the attachment do not work correctly. With these scripts the restored pdf files do not work.
The correct working scripts attachments, with instructions are in my post below.
 

Attachments

Kumar - nice little script. Do you think your could add the functions to backup the fax archive, zip or tar it and then do the opposite when you restore. I have tried to do that manually and I keep running into permission issues and the new setup never reads the old fax pdf files.
 
Thanks phinphan for pointing it out.
I tried opeinig the restored fax, but it does not open. I will recheck the permission issue and upload the file.
Yes, it is possible to tar into a tar.gz format and while restoring it, it will do the opposite.
I will try it tomorrow and if I succeed, I will upload it.
 
Finally the backup restore script for avantfax

I finally tested it and is working!!!!!!
Please ignore my previous post.
ok. Download and rename the 2 attachements avantbu.txt and avantrestore.txt and rename it to avantbu.sh and avantrestore.sh respectively.
copy both of these file in the / directory of your pbxiaf server. Not the /root, but / directory (absolute root /).
run chmod +x *.sh
Then simply run ./avantbu.sh for backup.
It will create avantbu.tar.gz file in the / folder.
To restore simply run ./avantrestore.sh and it will restore everything on avantfax database + sent and received faxes.
If you want to restore it on another hardware, download avantbu.tar.gz on to your local desktop through webmin or winscp. Then upload them to the new hardware in the / folder, and run ./avantrestore.sh
That is all. Everything should work just fine.
Again. Try it on a test system first.
Please give me feedback if it works for you.
Regards
Kumar
 

Attachments

x-pdf error

Anyone ever got this error: "File type is unauthorized (application/x-pdf)" when trying to send. Its a new installation of the 1.6 version of piaf. Looks like xpdf needs to be installed but I can't find one that will install. I found that xpdf was being replaced by popper. I installed popper and utils but still not working. Is this maybe something that came about just in Centos 5.4 maybe? Any help?
 
x-pdf error

Just found that it is a problem with the workstation that is sending fax. Can send from another one without a problem. The one with the error is Windows 7 x64.
 
64 Bit

Vista and 64 bit has been wreaking havoc for us as well. We worked around Vista but not 64 bit yet. always a work in progress....
 
That is true, but I feel its worth the trouble to work through it. I wasn't having any problem with Vista 64. With 7 64 I get an error when opening a pdf in browser. Just thought that I might try Internet Explorer. I most always use Firefox, but seems that sometimes a quirk like this will work better in Explorer. I'll try that. On another note, does anyone have an answer to the print-to-fax problem with Windows 7 x64? I've looked some, to no avail.
 
I ran more test and I conclude that iaxmodem/hylafax does not work with DAHDI for fax-out with this tutorial.

I reverted back to an image snapshot before I ran update-source w/ DAHDI and everything works fine. I then ran update-source again but without DAHDI and it works fine.

I started from scratch and install a fresh piaf from the .iso and went with DAHDI before installing iaxmodem/hylafx and it doesn't work to fax-out. The error message is "no local dialtone" which means that the modem can't connect with asterisk.

The *CLI doesn't report anything, I don't see any attempt to connect to asterisk from the modems - but they show as connected when I list "iax2 show peers".

I really need DAHDI because of a bug it fixes... I wish you guys have a way to make it work - anyone's got this working with DAHDI?

Did you ever get this to work? I have the same problem. I get inbound to work great. Outbound acts like it does not talk to the asterisk system. No info in the CLI.

I am running version 1.4.27.1 with Dahdi 2.2.0.2+2.2.0


Fixed it with 2 settings in the IAX2 config file
maxcallnumbers=100
calltokenoptional=0.0.0.0/0.0.0.0
 
No Local Dialtone

Thanks for the update. I have been having this problem and this fixed it.
 
Hi

Fixed it with 2 settings in the IAX2 config file
maxcallnumbers=100
calltokenoptional=0.0.0.0/0.0.0.0

That code is a bit "sledgehammer'ish" You may consider requirecalltoken=no in the actual 4 IAX Fax contexts in extensions_custom.conf, or indeed, calltokenoptional=127.0.0.1/255.255.255.0 globally.

Joe
 
Is there a way to have Hylafax/AvantFax auto-delete faxes after emailing them out (on received faxes)? I really don't want/need to use the archive, and want all faxes to be removed from the PBX after they are sent to their destination. Ideas? THX!
 
I am trying to use the sendfax command from an extension.
I have:
exten => s,1,Flite("Test")
exten => s,n,sendfax -d 18005551212 /stupid.txt
exten => s,n,Flite("Success")

However it exits at stage 2.

When I look in the log, it shows me:
[2010-01-03 19:17:01] WARNING[4660] pbx.c: No application 'sendfax -d 18005551212 /stupid.txt' for extension (Fax1, s, 3)

However if I type "sendfax -d 18005551212 /stupid.txt" from the root, it works.

Thanks
 
I am trying to use the sendfax command from an extension.
I have:
exten => s,1,Flite("Test")
exten => s,n,sendfax -d 18005551212 /stupid.txt
exten => s,n,Flite("Success")

However it exits at stage 2.

When I look in the log, it shows me:
[2010-01-03 19:17:01] WARNING[4660] pbx.c: No application 'sendfax -d 18005551212 /stupid.txt' for extension (Fax1, s, 3)

However if I type "sendfax -d 18005551212 /stupid.txt" from the root, it works.

Thanks

should be

exten => s,1,Flite("Test")
exten => s,n,system(sendfax -d 18005551212 /stupid.txt)
exten => s,n,Flite("Success")
 

Members online

No members online now.

Forum statistics

Threads
26,696
Messages
174,453
Members
20,265
Latest member
irenelanda64
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top