AsterFax the Email to Fax Gateway for Asterisk.
---------------   We have moved -----------------


AsterFax and Asterisk IT have both been renamed.

Asterfax is now known as Noojee Fax

Asterisk IT is now known as Noojee Telephony Solutions.

Noojee Fax documentation and support can now be obtained via:
http://www.noojee.com.au/Page/NoojeeFax
https://wiki.noojee.com.au/Noojee_Fax
http://forums.noojee.com.au

---------------   We have moved -----------------


Asterisk IT is the primary developer and sponsor of AsterFax the Open Source Email to Fax Gateway for Asterisk.
Asterisk I.T. offer a range of support options for AsterFax as well as general Asterisk consulting services.  Contact sales@asteriskit.com.au for more information.
You can also receive support from the Asterfax and Asterisk communities by by posting at the relevant forum.
Asterisk
trixbox

AsterFax - Asterisk Fax

SourceForge.net Logo

Testing

Once AsterFax is up and running you will want to do a few basic tests to ensure that it is operating correctly.

Firstly check the AsterFax logs for any errors.

The AsterFax installation includes a testing jar (test/AsterTest.jar) which contains a simple test application which is designed to connect to an SMTP Gateway and send a test message.
I recommend that you run AsterFax from a console during the initial phase of testing as it makes it easier to observe any errors as they happen Once you have completed a round of testing with AsterFax running from the console you can then retest it with AsterFax running as a daemon.
Alternatively you can just run AsterFax as a daemon and use the *nix 'tail' command to view the log file (logs/asterfax.log) under the asterfax install directory.

The test application can be found in the 'test' subdirectory where you installed AsterFax to (usually '/usr/lib/asterfax/test').
The test directory is designed to allow you to run tests from the local machine but to also copy the test directory to another machine in order do remote testing. In either case you must run the test with the working directory set to the test directory.

Test setup
During testing it can help if you monitor the Asterisk logs files as this can sometimes provide some insite into what is occuring.
To monitor the logs run the following command from the command prompt:

tail -f /var/log/asterisk/full

Your run the tests by using the supplied script test/test.sh.

Test 1
Start by running a test on the same machine as the AsterFax gateway.

cd /usr/lib/asterfax/test
./test.sh  <Your email address> <fax no@fax.local>

e.g.
./test.sh fred@somedomain.com.au 5551234@fax.local

The test application takes two mandatory and two optional parameters:

<From Address> - mandatory - the email address to send error messages to.
<Fax Number> -  mandatory - the phone number @faxlocal to send the fax to.
<Host> - optional - default localhost
<port> - optional - default 25

Running the test should tell you whether the AsterFax Gateway is responding correctly.
Check the AsterFax logs (logs/asterfax.log) for any errors.

Test 2
Next copy the entire test directory to another machine and repeat the test. In this case you will need to supply the phone number and host.
Check the AsterFax logs (logs/asterfax.log) for any errors.

Test 3
If that works then perform a test using a standard  mail client.
Depending on how you have configured AsterFax to run you may or may not need to change the email clients configuration.
Refer here for details.
You can now use your mail client to send a fax directly to AsterFax. Simply compose a standard email message and set the To address as described above.
Check the AsterFax logs (logs/asterfax.log) for any errors.

Test 4

If that works its time to try sending a PDF. Once again compose an email using your standard email client and this time attach a PDF file.
Note: the body of your message will be ignored.
Check the AsterFax logs  (logs/asterfax.log) for any errors.

If the PDF fails to send then you probably have a problem with ghost script.
Check the AsterFax logs  (logs/asterfax.log) for any errors.

Test 5 Using your standard email client again send another email message this time attaching one of the supported file attachment types such as MS-Word or OpenOffice Write. You should repeat this test for each of the file types you want to use within your organization.
Check the AsterFax logs (logs/asterfax.log) for any errors. If you need more instructions refer to the Installation instructions .

And finally:
Check the AsterFax logs (logs/asterfax.log) for any errors. Yes I know I'm repeating myself but some things just need to be repeated :)
Check the AsterFax logs (logs/asterfax.log) for any errors.

AsterFax won't send a fax
If you have tried all of the above testing I'm not certain that your problem is an AsterFax problem as opposed to an Asterisk problem. So I would like you to try a couple of things to isolate the issue. 
In case you aren't aware Asterisk supports what are referred to call files (sorry if I'm teaching to suck eggs but I prefer not to make assumptions about peoples knowledge levels). 
A call file is a simple text file which can be used to instruct Asterisk to dial a number. 
The call file (once created) is copied into the asterisk outgoing spool (usually /var/spool/asterisk/spool). Note don't create the file in this directory, you must used the supplied script test/call files/call.sh.
The script copies the files and sets the permissions on the files so that asterisk has access to them. 
The script assumes that asterisk has been installed under an account call asterisk. 
The test script take a single argument which is the name of the call file. 
You will also need to set the execute permission on the script file by executing: 
chmod a+x call.sh 


Test setup Start by making the call script executable by running:
cd /usr/lib/asterfax/test/call files
chmod a+x call.sh

Test 1 Make a simple call from a SIP phone to your land line.
You will need to start by editing the call file test/call files/sip-to-external.call.
The sample call file looks like this:
Channel: Zap/1/5551234
MaxRetries: 3
RetryTime: 40
WaitTime: 25
Context: from-internal
Extension: 2000
Priority: 1

Line 1 contains the Asterisk channel to use Zap/1 and the phone number to dial 5551234. You need to change both of these values to suit you configuration. I would recommend changing the phone number to you desk phone so that you can here it ring. If you pick it up you should here a standard Asterisk message telling that the person at extension xxx is busy.
Line 6 contains the extension number of the SIP phone you need to change this to a valid extension number.

run the script by typing the following at the command prompt:
cd /usr/lib/asterfax/test/call files
./call.sh sip-to-external.call

Test 2
The second call file fax-to-external.call.

Channel:Zap/1/5551234
MaxRetries: 0
WaitTime: 20
Priority: 1
Application:txfax
Data:/usr/lib/asterfax/test/attachments/testpage.tif|caller
Context: from-internal

Again you will need to change the Channel and phone number to suite your configuration. Obviously the phone number you select should have a fax attached. Note: it is some times useful to set the phone number to your desk phone and answer the call. You can then hear if the fax tones are being played. In this sample there is no extension instead we are going to run the Application txfax to send an actual fax.

run the script by typing the following at the command prompt:
cd /usr/lib/asterfax/test/call files
./call.sh fax-to-external.call

If all of that fails they please make a copy of config/AsterFax.xml, logs/asterfax.log, and the Asterisk log files and post them to the AsterFax forums along with any other relevant details and either myself or one of the other experienced AsterFax users will assist you in getting AsterFax working.

Home
Downloads
Support
Licensing
News
FAQ
RoadMap
AsterFax UserGuide
Configuring Email Clients
Supported File Formats
Installing AsterFax
Configuring AsterFax
Testing AsterFax
Trouble Shooting AsterFax
Running AsterFax
Configuring SendMail
Configuring GhostScript
Configuring OpenOffice
SpanDSP
Add your own File format
Web2Fax

AsterFax is Sponsored by Asterisk I.T.
©2006  Asterisk I.T. all rights reserved. Some parts of this site may be the copyright of other authors. If you want to copy parts of this page you may do so provided you have gained permission from Asterisk I.T. first. Email asterfax@asteriskit.com.au
AsterFax™ is a trade mark of Asterisk I.T..
I'm not a great believer in Trade Marking Open Source software but unfortunately someone has been running a scam to redirect traffic to a bogus AsterFax web site. As such I've trade marked AsterFax's name to provide protection from such people.