HylaFAX setup

From Univention Wiki

Jump to: navigation, search
Produktlogo UCS Version 3.0

This Wiki-Page describes how to setup HylaFAX, an open source fax solution, on UCS 3.0, with a Dialogic Diva ISDN Fax Card.

Install Hylafax-Software and Kernel Headers (needed for Divas ISDN driver)

univention-install linux-headers-$(uname -r) hylafax-client hylafax-server

Installation of Divas ISDN driver

download driver from:


Install with:

  • accept the Dialogic License Agreement -> Yes
  • Install newer Dialogic DSI SS7 instead of Diva softSS7 -> Yes
cd /usr/lib/opendiva/divas/src
./Build -deb

an info screen will be displayed for 15 seconds.

After this the script builds and installs Diva isdn driver packages for debian.

You will need to repeat this step everytime you want to update the kernel or the isdn driver.

Configuartion of the Divas TTY

The Divas TTY Device is a emulation of a serial device which is used by HylaFAX. HylaFAX handles the device like a old serial modem.


cd /usr/lib/opendiva/divas

A menu will be shown on console (no X11 needed). Do the following highlighted settings:

  • System interfaces:
    • TTY Interface
    • fax/voice support for TTY
    • CAPI 2.0 interface
  • TTY Init String: <empty>
  • Fax CLASS 2 options: select all
  • Boad Selection:Dialogic Diva BRI-2 PCIe v2 SN...
  • User interface configuration: Use Diva Console
  • Terminal Equipment (TE) mode, default
  • ETSI - Europe/other countries, Euro-ISDN (ETSI-DSS1)
  • NT-2 (Direct Dial In, Direct Inward Dialing) No (for BRI Standard/S-Mode/Mehrgeräteanschluss) or Yes (for T-mode/Anlagenanschluß/PRI)
  • Direct Inward Dialing Collect Timeout: Wait 2 seconds for more digits before presenting
  • Direct Inward Dialing number length: Forward call to application as is
  • Direct Inward Dialing Special Number: Not used (default)
  • ETSI Call Transfer mode: Default
  • Deflection Type : Deflection (default)
  • ECT Link Balance: off (default)
  • ETSI/QSIG RDN mode: Take first RDN (default)
  • ETSI Message Waiting mode: Default (uses REGISTER Message)
  • Redirecting Number Emulation: Disabled (default)
  • D-channel layer 2 activation policy: Deactivation only by other side (default)
  • Voice companding options: Protocol default
  • trunk operation mode: Point to Multipoint (default) (for BRI Standard/S-Mode/Mehrgeräteanschluss) or Point to Point (for T-mode/Anlagenanschluß/PRI)
  • amount of TEI's : one TEI (default)
  • maximal fax speed limit: No fax speed limit (default)
  • minimal fax speed limit: No fax speed limit (default)
  • non productive fax session time limit: Off (default)
  • global fax options - T.30 protocol: select none
  • Part 68 voice signal limite: National default
  • DTMF clamping: Off (default)
  • Audio Recording AGC : Automatic Gain Control Off (default)
  • Echo Canceller Tail Length: 128 ms (default)
  • Diva Board selection: Save configuration and exit
  • Diva M-Board configuration: Preserve existing configuration
  • DO NOT Activate ECT emulation for M-Board 1
  • DO NOT Activate Hunt Group Mode for M-Board 1
  • CAPI call distribution: off
  • Call Rate Limiter:off
  • Card startup options:
    • Verify Board serial number before microcode load,
    • Start driver on system boot

Start the driver



A green LED indicates an ISDN Signal.

If you reboot the machine the driver will be started automaticly.

Installation of HylaFAX

Faxsetup (initial configuration)

Basic configuration of HylaFAX is done by the faxsetup command.

Call it in a shell terminal:


A menu will be shown:

      HylaFAX configuration parameters are:

       [1] Init script starts faxq:            yes
       [2] Init script starts hfaxd            yes
       [3] Start paging protocol:              no

  • Are these ok [yes]?
  • Can I terminate this faxq process (15788) [yes]?
  • Should I restart the HylaFAX server processes [yes]?
  • Do you want to run faxaddmodem to configure a modem [yes]?

Faxaddmodem (configuration of a fax device)

The Faxaddmodem Command can be started by faxsetup (see above) or by


  • Serial port that modem is connected to [ttyds00]? ttyds01
  • Country code [1]? 49
  • Area code [415]? 40
  • Phone number of fax modem [+1.999.555.1212]? +49.40.23776.200
  • Local identification string (for TSI/CIG) ["NothingSetup"]? DIGITEC GmbH
  • Long distance dialing prefix [1]? 0
  • International dialing prefix [011]? 00
  • Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
  • Tracing during normal server operation [1]?
  • Tracing during send and receive sessions [11]?
  • Protection mode for received facsimile [0600]?
  • Protection mode for session logs [0600]?
  • Protection mode for ttyds01 [0600]?
  • Rings to wait before answering [1]? 2
  • Modem speaker volume [off]?
  • Command line arguments to getty program ["-h %l dx_%s"]? "-b -r -s %s %l"
  • Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
  • Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
  • Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
  • Tag line format string ["From %%l|%c|Page %%P of %%T"]?
  • Time before purging a stale UUCP lock file (secs) [30]?
  • Hold UUCP lockfile during inbound data calls [Yes]?
  • Hold UUCP lockfile during inbound voice calls [Yes]?
  • Percent good lines to accept during copy quality checking [95]?
  • Max consecutive bad lines to accept during copy quality checking [5]?
  • Max number of pages to accept in a received facsimile [25]?
  • Syslog facility name for ServerTracing messages [daemon]?
  • Set UID to 0 to manipulate CLOCAL [""]?
  • Use available priority job scheduling mechanism [""]?

Afterwards have a look at /etc/hylafax/config.ttyds01 and make sure that the settings are like this example:

CountryCode:            49
AreaCode:               40
FAXNumber:              +49.40.23776.200
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules
ServerTracing:          1
SessionTracing:         11
RecvFileMode:           0600
LogFileMode:            0600
DeviceMode:             0600
RingsBeforeAnswer:      2
SpeakerVolume:          off
GettyArgs:              "-b -r -s %s %l"
LocalIdentifier:        "DIGITEC GmbH"
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"
MaxRecvPages:           25

ModemType:              Class2
ModemRate:              57600

ModemFlowControl:       rtscts
ModemNoFlowCmd:         AT&K0
ModemSoftFlowCmd:       AT&K4
ModemHardFlowCmd:       AT&K3

ModemResetCmds:         AT#CID=14+iQ=a1+iA21+iO21

# These should match the modem responses for DID and Caller*ID.
CallIDPattern:          "DAD: "
CallIDPattern:          "CID: "

Class2APQueryCmd:       none
Class2SPLCmd:           none
Class2TBCCmd:           none
Class2PHCTOCmd:         none

Class2ECMType:          2.0     # follows Class 2.0 spec, not Class 2
Class2UseHex:           true

Description for: AT#CID=14+iQ=a1+iA21+iO21

  • +iQ=a1 use the first channel of the first diva device.
  • +iA21 Incomming MSN is 21 (if you don't put this into the string every msn will be receiving faxes)
  • +iO21 Outgoing MSN is 21 (ask your operator/tk vendor about this setting)

If you want to receive more than one fax at a time, you need to add an other modem with the faxaddmodem (see above) command. Change the Device to ttyds02 and the ModemResetCmds from +iQ=a1 to +iQ=a2.

What to do with incoming faxes?

To send every fax to user@example.com in PDF format, with the german (de) template, create a file /etc/hylafax/FaxDispatch


To print out every fax on the "kyocera" printer, create a file /etc/hylafax/FaxDispatch

/usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -P kyocera

To send to a different user depending on the MSN, create a file /etc/hylafax/FaxDispatch

case "$CALLID2" in
  2)          SENDTO=user1@example.com;;
  3)          SENDTO=user2@example.com;;

Please always change the permission to:

chmod 755 /etc/hylafax/FaxDispatch


If a user connect to a HylaFAX server, the server can ask for a username and passwort.

You can add users or a hostname to the HylaFAX user databse /etc/hylafax/host.hfaxd with thefaxadduser and remove with the faxdeluser command (see man pages).

Or use PAM and the file /etc/pam.d/hylafax (see pam manage).


sendfax -n -d 1234567 /etc/issue

Sends a fax with the contens of /etc/issue to the telephone number 1234567.

Desktop usage

If you want to fax from your application, print it to a postscript file.

Afterwards call

sendfax -n -d <number> <filename>

More comfortable solutions are:

See also:



Personal tools