HylaFAX.The world's most advanced open source fax server

I can set up your fax server in just few hours. See bottom of this page for more information.

Translation: English,Polski, Spanish

Download this page: FaxServer.pdf

Keywords: Installing Hylafax server on Debian Linux, multiple faxes, serial PCI card, Printing, fax server, fax from windows, fax from mac, fax from linux, email received fax, multiple modems, high performance, windows XP, high volume, setup fax server

I can set up your fax server in just few hours. See bottom of this page for more information.

Installation

Based on http://www.aboutdebian.com/fax.htm

aptitude update
aptitude install hylafax-server

Configure

faxsetup

        * Country code (1 for US)
        * Area code
        * Phone number of fax modem
        * Local identification string (this should be something like 'My Fax Server' as it is printed on the tag line of outgoing faxes)
        * Long distance dialing prefix (1 in US)
        * International dialing prefix (011 in US)
        * Dial string rules file (accept the default)
        * Tracing during normal server operation (accept the default)
        * Tracing during send and receive operations (accept the default)
        * Protection mode for received fax - enter 0644
        * Protection mode for session logs - enter 0644
        * Protection mode for ttySx - enter 0666
        * Rings to wait before answer
          Note: The default is 1 but setting it to 0 establishes your server as a "Send Only" fax system
        * Modem speaker volume (valid values are OFF QUIET LOW MEDIUM HIGH (you may want to set it to HIGH for testing purposes as you can change it to OFF later)
        * Command line arguments for getty (accept the default)
        * Pathname of TSI ACL file (accept the default)
        * Pathname of Caller-ID ACL file (accept the default)
        * Tag line font file (accept the default)
        * Tag line format string (accept the default)
        * Time before purging UUCP lock (accept the default)
        * Hold UUCP lockfile during data calls (accept the default)
        * Hold UUCP lockfile during voice calls (accept the default)
        * Percent good lines to accept (accept the default)
        * Max consecutive bad lines to accept (you may want to reduce the default 5 to 3)
        * Max number of pages to accept in a received fax (you may want to increase the default value of 25)
        * Syslog facility name for ServerTracing messages (the default is 'daemon' but you could change it to 'local7' if you're logging to a remote syslog server)
        * Set UID to 0 (accept default)
        * Use priority job scheduling (accept default)

vi /etc/hylafax/config.ttyS0

vi /etc/default/hylafax

Configure Incoming Settings

vi /etc/hylafax/hosts.hfaxd

192\.168\.10\.:::

172\.30\.:::

NOTE:  You will see the paths /var/spool/hylafax and /var/spool/hylafax/etc specified in HylaFAX documentation and utilities. Do NOT edit the files in these directories. The files are duplicated in the /etc/hylafax directory. If you ever want to manually edit the configuration files, only edit the files in the /etc/hylafax directory.

Fax Status

faxstat -s

Sending Fax

In general the list of all the software is here, but you can just go to the once we reference below. http://www.hylafax.org/content/Client_Software

Linux

You can use Gfax or Kde Print Fax. You install it Gfax by:

apt-get update
apt-get install gfax

Then Go to Application then Office then Gfax.

Now i can do fax from OpenOffice, TextEditor, etc..

1. Install GFax from apt-get install gfax
2. Configure GFax with your Fax Server (HylaFAX).. I hope you know how to do it..
   Ok, you can test your GFax configuration by test send a fax with Text Editor (Applications -
Accessories)
3. To make it work with openoffice, run /usr/lib/openoffice/program/spadmin  (with root access), you
 do sudo -i, or whatever.
4. You add fax / pdf converter from spadmin GUI, fill the command with: gfax (TMP)
5. That's it... you save the configuration
6. Try fax an openoffice document

1st time i try fax with Fax Printer, it hang..
then i tried fax with PDF Converter and set the PDF Folder, then after fax, i close the GFax and not
hang. 

Windows

Mac

PBX, Dial 9 before number

ModemDialCmd: ATDT9,%s

ModemDialCmd: ATDT9,W%s

ModemDialCmd: ATDT9,W%s

ModemDialCmd:     ATX3DT8,,,%s

AT - picks up the phone, X3- disables dial tone check, DT tells it to use tone, dial 8, then ",,," for wait, then the phone number.

Adding users

adduser dept1

cat /etc/group

faxadduser -p password -u 1001 username

cat /var/spool/hylafax/etc/hosts.hfaxd 

Hardware

Modem Model:

  1. US Robotics 56K External Fax modem; 5686E (Does not come with cable) (around $100)
  2. Amigo AME-CA95 RS232, External V.92 DATA/FAX/TAM Modem or External Conexant V.92 modem (around $25 or less)-(newegg.com)

Serial Card:

  1. Startech.com 4 Multi Port Serial PCI Card
  2. Startech.com 2 Port Serial PCI Card

Done with simple setup

Done. Everything beyond this point is for setting up multiple incoming/outgoing fax modems.

Multiple Incoming Fax Lines

Multi port Serial PCI card, ttyS

dmesg |grep tty

faxserver:~# dmesg |grep ttyS
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS14 at I/O 0xdf08 (irq = 209) is a 16550A
ttyS15 at I/O 0xdf10 (irq = 209) is a 16550A

lspci -v

This should list something like:

0000:02:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01) (prog-if 02 [16550])
        Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)
        Flags: medium devsel, IRQ 209
        I/O ports at df08 [size=8]
        I/O ports at df10 [size=8]
        I/O ports at df18 [size=8]
        I/O ports at df20 [size=8]
        I/O ports at df28 [size=8]
        I/O ports at df30 [size=16]

apt-get update
apt-get install setserial

setserial -g /dev/ttyS*

ls /dev/ttyS*

MAKEDEV ttyS14
MAKEDEV ttyS15

faxaddmodem

Fax Dispatch

touch /etc/hylafax/FaxDispatch

##      $Id: FaxDispatch,v 1.2 2003/05/04 23:49:41 darren Exp $
##
## Default FaxDispatch file - routes all inbound faxes to FaxMaster as PDF
##
## Consult the faxrcvd(8C) man page for more information
##

#SENDTO=faxMaster;                               # by default email to FaxMaster
#FILETYPE=pdf;                                   # in PDF format


##
## This excerpt from the man page gives you an idea of what's possible here
##
## You can route by sender's TSI
#case "$SENDER" in
#       *1*510*526*1212*) SENDTO=sam;;          # Sam's test rig in Berkeley
#       *1*415*390*1212*) SENDTO=raster@asd;;   # 7L Xerox room, used for scanning
#       *5107811212)      SENDTO=peebles@mti;;  # stuff from home
#esac

## and/or by device
#case "$DEVICE" in
#       ttyS1)            SENDTO=john;;         # all faxes received on ttyS1
#       ttyLT0)           SENDTO=mary@home;;    # all faxes received on ttyLT0
#       ttyS2)            SENDTO=myemail@example.com,myotheremail@example3.com;;         # all faxes received on ttyS1
#esac

## and/or by device
FOLDER="/var/spool/hylafax/recvq/"
FULLPATH="${FOLDER}${FILENAME}.tif"
case "$DEVICE" in
ttyS14)   mv $FULLPATH /var/spool/hylafax/recvq/dept1/;;    # all faxes received on ttyS14
ttyS15)   mv $FULLPATH /var/spool/hylafax/recvq/dept2/;;    # all faxes received on ttyS15
esac

## and/or by caller id
#case "$CIDNUMBER" in
#       435*)        SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435
#       5059627777)  SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF
#esac

## and/or by device
FOLDER="/var/spool/hylafax/recvq/"
FULLPATH="${FOLDER}${FILENAME}.tif"
case "$DEVICE" in
ttyS14)   /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept1/;;    # all faxes received on ttyS14
ttyS15)   /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept2/;;    # all faxes received on ttyS15
esac

FaxNotify

RETURNFILETYPE=pdf;

View faxes through internet browser

apt-get update
apt-get install apache2

cd /var/www
ln -s /var/spool/hylafax/recvq fax

Errors

Failure to receive silence

Class1SwitchingCmd: "<delay:7>"

T.30 T2 timeout, expected signal not received

Unspecified Phase C error, including too much delay between TCF and +FDR command

No Dial Tone

No carrier Detected

cat /var/spool/hylafax/log/xferfaxlog

Modem Wedged

After a month of good work (11,000 faxes) suddenly the modem become wedged. Because USR modem doesn't have the un-wedged option as the Mainpine modem, you have to tell hylafax to try to set it up more then (default)2 times. Add this to your config.tty#

MaxSetupAttempts:    10

4 ports serial card, more then 4 modem support

dmesg |grep Serial

 Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled

serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
 00:08: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
 0000:05:04.0: ttyS0 at I/O 0x1010 (irq = 201) is a 16550A
 0000:05:04.0: ttyS1 at I/O 0x1018 (irq = 201) is a 16550A
 0000:05:04.0: ttyS3 at I/O 0x1020 (irq = 201) is a 16550A

Couldn't register serial port 0000:05:04.0: -28

shows that ttyS2 is on the motherboard.  ttyS0, S1, and S3 are
on the 9845 card.  The driver found the fourth port on the 9845 card,
but couldn't use it because all four ports (ttyS0-ttyS3) were already
in use (that's what the "-28" error means).

lspci -v

 2 port:
 02:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O
 Controller (rev 01) (prog-if 02 [16550])
         Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)
         Flags: medium devsel, IRQ 209
         I/O ports at df08 [size=8]
         I/O ports at df10 [size=8]
         I/O ports at df18 [size=8]
         I/O ports at df20 [size=8]
         I/O ports at df28 [size=8]
         I/O ports at df30 [size=16]


 4 port:
 02:02.0 Serial controller: Unknown device 9310:9845 (rev 01) (prog-if 02
 [16550])
         Subsystem: LSI Logic / Symbios Logic Unknown device 0004
         Flags: medium devsel, IRQ 201
         I/O ports at 1000 [size=8]
         I/O ports at 1008 [size=8]
         I/O ports at 1010 [size=8]
         I/O ports at 1018 [size=8]
         I/O ports at 1020 [size=8]
         I/O ports at 1030 [size=16]

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro 8250.nr_uarts=16

update-grub

setserial -g /dev/ttyS*

faxserver:/home/lucas# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x1010, IRQ: 201
/dev/ttyS10, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS11, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS12, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS13, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS14, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS15, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS2, UART: 16550A, Port: 0x1018, IRQ: 201
/dev/ttyS3, UART: 16550A, Port: 0x1020, IRQ: 201
/dev/ttyS4, UART: 16550A, Port: 0x1010, IRQ: 201
/dev/ttyS5, UART: 16550A, Port: 0x1018, IRQ: 201
/dev/ttyS6, UART: 16550A, Port: 0x1020, IRQ: 201
/dev/ttyS7, UART: 16550A, Port: 0x1028, IRQ: 201
/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0

Tools

Archive Faxes

crontab -e

1 0 * * * python /usr/local/bin/archive.py /var/spool/hylafax/recvq tif

python /usr/local/bin/archive.py /var/spool/hylafax/recvq tif

Send batch faxes

17731231234
13121231234

:%s/^/1/g

sendfax -z batchfaxnumbers.csv FILE2007NEWS.pdf

sendfax -h ttyS0@localhost -n -k 'now + 24 hours' -z batchfaxnumbers.csv FILE2007NEWS.pdf

Maintenance

Restart Hylafax

/etc/init.d/hylafax restart

Hylafax status

faxstat

faxserver:~# faxstat
Password:
HylaFAX scheduler on localhost.localdomain: Running
Modem ttyS15 (1.773.123.1234): Running and idle
Modem ttyS14 (1.773.123.1234): Running and idle

Remove fax job

faxrm  jobid

faxrm 1011 1012 1013

Printer not printing

Extra

usb fax modem

Link that sells the USB modem (sorry it's in greek, I couldn't find any other site for it):
http://www.e-shop.gr/show_per.phtml?id=PER.533709

lsusb recognizes it as:
Bus 001 Device 002: ID 0483:7554 SGS Thomson Microelectronics 56k SoftModem
  idVendor           0x0483 SGS Thomson Microelectronics
  idProduct          0x7554 56k SoftModem

The driver I used is the 'slusb' SmartLink driver (google for slmodem-2.9.11-20070813.tar.gz)

The modem is installed under /dev/ttySL0. I didn't have to reconfigure hylafax for it, I used the same config file as before for the PCI softmodem (basically configured as a generic Class1 modem, as in /var/spool/hylafax/config/class1).

Managing Faxes

High Volume Incoming Faxes

If you are receiving a high volume of faxes, that need to be "processed" then this workflow might work for you.

What do you need:

  1. [Queues] Manage the files in that queue.In reality the fax needs to be looked at. If this fax is xyz then send it here. The the problem is not in moving stuff, but allowing a user to look at pdf, mark it as something and forward it to some queue where somebody else can do the same.

  2. [Notes] Would be nice of it allow for lables (to do, need more information, etc)

  3. [Fast Routing] Incoming faxes as pdf (500 a day) that need to be delivered to each department. (30+, per minute)

  4. [Ticket System] Initial stuff coming in would be 'new'. After looking at something, you could assign it to the right group, who could then look at it, and process/reassign it as necessary. It is kinda the same workflow as typical ticket systems.

  5. [Document Management] I I think a simple document management software would do but google doesn't turn up any results. I was looking at some workflow software but they seem to target some advanced workflows. I kind of need a combination of (move command, tag, mail client status (to do), forward, reply, with some minimal permissions, as to who can access what queue)

  6. [Simple Process] This would not be a knowledge base system but more of a get a file,process it, archive it.

  7. [Indexing] Adding custom fields where we can put account id, etc.

  8. [Final Solution] Actually, taking the example of using ticket tracker and your 'account' example, you wouldn't assign the ticket to the account, you would assign the ticket (with the fax attached) to the group which is going to process the incoming fax. The 'account id' would be used as a requestor. Ticket Tracker has a way to filtering all tickets which have the same requestor.

Additionally, using a ticket system would cause the following side effects (which you described as things needed here or earlier):
- Maintain status: New, Open, In Progress, etc.  I imagine you could create status types as necessary.
- Maintain information of who does what.
- Maintain comments by people processing the request (if necessary).
- Maintain group information, sending to groups, processing of the same request by many people in a group.
- Maintain access restrictions between different data from different users.
- Maintain very lengthy history without serious defects.

The only issues I have had unprivileged users complain about is either too much or too little email interaction. Email interaction is adjustable, but the same user that complains about to few notifications will complain about too many a month later.

With my heavier users, I showed them how to use the web interface for unprivileged users and they seemed to appreciate that. They could now seen on one page what requests we were still working on, and what had been completed or rejected, and why.

As far as privileged users,(technicians, basically) the biggest complaint were probably training related. My boss did appreciate the reporting features, after I showed him how they could affect billing.

Configuration

  1. [Reported By] requestor is usually an email address of a person who requested it.

  2. [Milestone] A category of the document. Change request, new account , cancellation, etc...

  3. [Version] What state, which business unit, Could also be a data, etc.

  4. [Component] Something specific to the category, time dated materials, state required tracking

Country Specifc

France

Support

please sent me an email. webmaster@lucasmanual.com Basic setup over ssh can be done in around $130 if you have supported hardware, and this will include basic support on configuration and running hylafax. Other options also exists. If you work for a company I can show your IT department how to setup hylafax in few steps and bring them up to speed in a day so they can install and run the software.

MyWiki: FaxServer (last edited 2011-10-16 19:26:29 by LukaszSzybalski)