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

Installing AsterFax - Script

Starting with Version 1 rc 4b we are making an install script available to automate the install as far as possible. Inititally the script will support trixbox and CentOS/RedHat. Ultimately we plan to support more platforms including Debian based OS's.

If you are running trixbox or a CentOS/RedHat system you can just download the install script and run it. The script will do everything needed to get AsterFax up and running.

Download the script from to a convenient working directory and run it.

The install script is yum based and some of the AsterFax dependencies are available only from the trixbox yum repository. The install script will ensure that the trixbox repository is configured for yum before it starts installing the software.

A configure script is also been made available to make configuration less laborious. Download the configure.sh from and save it to the same location as the install script. When the installer is done it will prompt whether you want to configure the system. Answer 'y' and the confugre script is executed. Of course you can run the configure script directly. Beware that the script overwrites any existing configuration entries. We are working on a web based UI for configuration and general management of AsterFax.

Installing AsterFax - Debian

We are currently releasing asterfax as an RPM available at If you are installing to a Debian system then you'll need to convert and extract the RPM then install it manually according to the instructions below. We intend to have a dpkg available in the near future.

Download the RPM then run 'rpm2cpio filename | cpio -i --make-directories' to extract it.

Installing AsterFax - Manual

The following describes the installation procedure for AsterFax. At this point in time there are a few steps to go through to get AsterFax installed, don't be too daunted, as its easier than it looks. The procedures are quite simple and fairly well documented. If you run into a problem just post a question in the Help forum and someone will give you a hand.


AsterFax Dependencies

Before installing AsterFax you need to install and configure a number of systems which AsterFax is dependant on.

Note: AsterFax must be installed on the same computer as Asterisk.

Overview

Lets start with a high level overview of the install using the simplest path as a guide. While not critical (with the exception of Java 5) you should probably install the systems in the following order.
1. Install trixbox
2. Install Java 5
3. Install Ghostscript
e.g. yum -y install ghostscript
Note: we recommend at least ghostscript 8.x or later as earlier versions don't seem to render some PDF files correctly.
4. Install X11
e.g. yum -y install  Xvfb
5. Install OpenOffice 2.0
e.g. yum -y install openoffice.org
[as of the time of this writting the above yum command will install openoffice 1.1. This is however adequate for AsterFax's purposes]
6. Install AsterFax - Version 1 RC 1 RPM
run rpm -i asterfax-1.0-rc1.i386.rpm
The RPM installs the software to /usr/lib/asterfax by default.
AsterFax uses file system directories to queue and archive faxes.
While the system ships with a reasonable default configuration we do not presume that the default will suit every environment.
For this reason at this stage the installation procedure does not create the required working directories.
Default directories that should be created are /var/log/asterfax and /var/spool/asterfax unless you change the configuration to use other directories.
Ensure that AsterFax will have full privileges to these directories at runtime.
Future installs might prompt for correct configuration and adjust accordingly.
7. Install AsterFax - Non-RPM install
unzip AsterFax-1.x-xxxx.zip to /usr/lib/asterfax
edit config/AsterFax.xml, update the Username/Password used to connect to Asterisk
8. Copy AsterFax.xba into the OpenOffice /usr/lib/ooo-1.1/share/basic/Tools (or equivalent of OOo 2.0)
9. Edit the scripts.xba as documented here
10. Patch txfax by running /usr/lib/asterfax/modules/install.sh
11. Restart Asterisk
12. run ./asterfax.sh from /usr/lib/asterfax

AsterFax is now running using its own SMTP Server.

There are lots more configuration options if you are interested in using other AsterFax features then have a read of the configuring AsterFax page.

You can now send a fax by configuring your email client to use AsterFax as an alternate SMTP Server.
For details on configuring your email client look here.
Of course you can also read the page on configuring AsterFax to work with any existing mail server for a zero client configation option. This is our recommended configuration.

Installation Details

Asterisk

When installing Asterisk you have two options.

1. Trixbox (Recommended)

Install trixbox which has the spandsp fax capabilities built in.
Trixbox provides a complete and simple installation onto a clean machine or optionally onto a machine which already runs Linux.
Trixbox provides all of the functionallity of Asterisk as well as a reasonable Web Interface for managing Asterisk.
For details on installing and download trixbox visit the trixbox web site: http://www.trixbox.org

2. Asterisk with spandsp

If you are running trixbox then you don't need to worry about spandsp as it is included in trixbox, if you are running a straight Asterisk install then read on.

This is the more complicated option as it requires you to compile a custom version of Asterisk as Asterisk 1.2 does not include SpanDSP.

You can build a custom version of Asterisk which includes fax capabilities by undertaking the following instructions:

You can download Asterisk from here . We recommend Asterisk 1.2

Build and Installation instructions to include spandsp fax support can be found here:
http://www.voip-info.org/wiki/view/app_rxfax+and+app_txfax

Ghostscript

AsterFax relies on ghostscript to convert a number of file formats (such as PDF and postscript) into TiffG3 files which are the only type of files which can be faxed natively by Asterisk (or any fax machine for that matter).


If you only every want to fax Tiff files (unlikely) then you don't need to install Ghostscript. For everybody else you will need to install ostscript.

Note: ghostscript can be replaced by any other tool which is capable of converting a PDF file into a Tiff file. You will however have to modify the PDF Converter to utilize the alternate tool. For details look here.

The simplest way to get Ghostscript is to use  apt-get or yum (or what ever the appropriate installer is for your version of Linux) to automate the install.

apt-get update && apt-get install ghostscript
or
yum -y install ghostscript

Trixbox runs under Centos. Currently (as of Jan 2006) Centos only supports Ghostscript 7.70.
Some users have reported problems with ghostscript 7.70 not rendering PDF files correctly.
To over come this problem you can upgrade to the latest version of Ghostscript.
For details on how to do this read more here.

OpenOffice

AsterFax depends on OpenOffice to convert an extensive number of formats into a PDF. The PDF is then translated using Ghostscript into a Tiff file ready for transmission.
You can check out the list of supported file formats to see which formats require OpenOffice to be installed. Probably the most important file format MS-Word requires OpenOffice, so most installations will require OpenOffice as part of their installation.
AsterFax requires OpenOffice v1.1 or later, we however recommend v2.0.
You can download the latest version of OpenOffice from here .
For details on installing OpenOffice look here.

Logging

AsterFax uses Log4j to create log files. If required the file log4j.xml can be edited to modify the logging behaviour.
The log4j.xml file that ships with AsterFax contains configuration information pertaining to how and where AsterFax logs a variety of information. The default configuration will log messages to logs/asterfax.log and to the console. Unless you are having problems or want to tweak the way logging is performed you can generally ignore the log4j.xml file.

Security

Firstly the AsterFax SMTP Gateway is not secure!! I recommend that you use AsterFax's ability to integrate with sendmail/postfix/Exchange Server via procmail. If you still wish to uses AsterFax's SMTP Gateway then read on.

Currently (as of beta 5) AsterFax will accept an email message from anyone. Whilst AsterFax is not an open relay, as it will never forward an SMTP message, it will send a fax on anyone's behalf. As such it should not be exposed to the outside world. (Unless you are happy for people to rack up large phone bills by sending faxes via your AsterFax gateway).
Note: providing a security model is high on my priority list. If you have any thoughts on how this should be implemented I would be happy to hear.
If you are using procmail to pull messages destined for AsterFax out of the normal mail processing pipeline of products such as sendmail then you don't need to worry about MX records. If you are running multiple SMTP servers then life does get more interesting and you are likely to need an MX record. In which case read on.
Any MX record for your AsterFax gateway should only be visible on your internal network as AsterFax will send a fax no matter who asks it to.
Depending on your requirements you can either configure an MX record for the AsterFax domain (normally fax.local) or create a subdomain such as fax.mydomain.com.

If you can, configure your email client to connect directly to the AsterFax SMTP gateway, which is generally the recommend methods for application developers who want to send a fax directly from their application (and for testing an AsterFax configuration) then no MX record is required.

MX records 101

An MX record is an entry in your DNS server which tells the world where to send email destined for a particular domain. Basically its a mapping between a domain name and an IP address. The IP address (or FQDN) must be the IP address that AsterFax is configured to listen on. The domain name will typically be of the form 'fax.myinternaldomain.com', where 'fax' is a subdomain of your internal domain.

If this sounds too complicated then I strongly recommend that you consult a DNS expert, as stuffing up your DNS server can have all sorts of consequences!


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.