Send Fax Program

I have created a small program that will assist in sending faxes from your Asterisk box. If you have installed the Fax Script from NerdVittles/Ward Mundy/PIAF you should not have to make any changes to your system to use it. If you have a bare bones install the only real Asterisk changes you may need are to have TX_Fax installed on you Asterisk box. I think it comes pretty much standard with most installs so I will not go into that part of the configuration. As well if you did not use Ward’s scripts you will need to add one little context to extensions_custom.conf that can be found at the end of this post.

The attached program will allow you to send a fax from virtually any program you can print from. The following install instructions, if followed exactly should leave you with a complete send fax solution. This has been tested on 6 different XP workstations as well as over a dozen Vista workstations. The send success was 100% over 100 faxes.

First you need to be running windows XP or Vista. Second if you are running XP you need to download and install the .Net 2.0 redistributable found Here . Next you need to install ghostscript for windows. It is used for the conversion and can be found here The link is for version 8.63. Works Great!!

Vista users should only need to install the ghostscript as Vista ships with .Net 3.5.

Also, you should let ghostscript install to the default of c:\program files\gs . I have tried to make my install flexible but for now I think sticking with the standard will help work out bugs. (if any) .

Now you can install DandyFax, which can be downloaded from here . Once installed it asks for a reboot. You should do this.

It will install a program called DandyFax and place it in your startup folder. When you are done with the reboot DandyFax will start up and tell you that it needs to be configured. The Configuration options are fairly straighforward. However, I will go through them here.

Local User name - This is an identifier for the fax.
Host IP - your asterisk box ip address. (dont use the name, dosn’t work yet)
Port - this is your ssh port usually 22 if yours is different make the change here.
User Name - this is a user that can SSH to the server. For your testing you can use root. Once your testing is done I sugest you setup a fax_user as all the config settings are stored in an XML file and anyone who has DandyFax installed can look in there directory for this information.
Secret- password - secret for above user
Caller ID - This is your caller ID
Fax Context - this is the send fax context that would have been set when you installed Ward’s fax machine or copy from bottom of this post.
Fax Header - The stuff that is printed accross the top of each fax page.
Station Name - your fax number
Out Bound Fax Route - for most users this should be from-internal. See note below for more information
Path to GhostScript- this is the path to your ghostscript install directory.
Operating system- Self explanitory.

Now once you have made your configuration changes the program will re-start. You will get a box that pops up and here you set the scan interval. This is defaulted to 10. This means it will scan the printer every 10 seconds for a new fax to send. You can play with that number if you find the fax send screen does not appear quick enough or too quick. Once you click ok a small icon appears in the task tray. Looks like a green printer. If you right click on it you can go to the configuration settings or exit the program.

Once it is running you will have a new printer to choose from when you print a document. The new printer is called DandyFax. Select this if you want to fax the document. Once the document has been printed to the spooler a send fax box will pop up that will ask for the number to send to, your name, the person who the fax was for, the subject of the fax and a comments box. Fill out all the boxes or very minimum fill out the phone number and press send.

Once the fax has been sent to the server a balloon will show on the DandyFax printer Icon saying the fax has been sent to the printer. The fax will include a simple cover sheet with the information you entered above.

Thats it!!

If you have voip trunks or use dundi and you send a fax that may go out over one of these trunks most likely it will fail. My solution was to make sure all my faxes went out my zap trunk. To do this I created a new out bound route called Fax-out and placed it at the bottom of my route list. In it i added a local rule and a long distance rule. Since things get changed once you save them in FreePBX you will have to search through your extensions_additional.conf file to figure out what it is actually called. Or, when you have the DandyFax config screeen up you can click on the button beside outgoing route and it will search for your route that you have called Fax-out. So if you do it this way make sure you call the route Fax-out.

Let me know how you make out.

**** NOTE *****

  1. On a few installations there has been an error reported on the first startup. If this happens click the continue button on the error window then right click the printer icon in your sys tray and exit. Once you restart things will be fine.

  2. I take no responsibility if this program stops your system or computer from responding.

  3. If you do not have a context called sendfax in your extensions_custom.conf copy and past the following there it is all you need once/if you have tx_fax installed

exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,4,TxFAX(${NEWFILENAME}|caller)
exten => s,5,Hangup()


If you downloaded DandyFax prior to 9:33 am on December 1st, 2008 you may run into problems. This is more apparent when running under Vista.

A new version has been uploaded and the bugs appear to be worked out.