Product: CAPI4Linux, module: CAPI4HylaFAX
Operating system: Linux
Version: 01.02.02
Build: 03.01.17
This document contains information and hints about:
1 General Information about Fax G3 over the CAPI 2.0 Interface with AVM ISDN-Controllers
1.2 Important Information for the Installation of the HylaFAX Interface for CAPI 2.0
2 Installing the HylaFAX Interface for CAPI 2.0 in SuSE
3 Installing the HylaFAX Interface for CAPI 2.0 in Other Distributions
4 Instructions about the TIFF Format Used and Converting Existing Files
5 Instructions for Operation with Multiple AVM ISDN-Controllers
6 Instructions for Fax Polling
Analog Fax G3 service over the digital ISDN network requires both that the data transmitted be transformed from analog to digital or from digital to analog (A/D or D/A transformation), and that as signaling conform to the Fax G3 standard (such as ITU-T.30).
As part of the CAPI 2.0 standard, this protocol mechanism is subject to compulsory standardization (T.30 modem for Group 3 fax). The implementation of this protocol by the manufacturer of the ISDN-Controller is optional. If Fax G3 is implemented in CAPI 2.0 drivers, software developed for the CAPI 2.0 interface can access the ISDN-Controller directly and thus quite easily. All AVM ISDN-Controllers for ISDN basic rate interface currently supported by CAPI4Linux offer Fax G3 support over the CAPI 2.0 interface.
Note that when passive ISDN-Controllers like the AVM FRITZ!Card are used, all calculations for A/D or D/A transformation must be carried by the CPU of your computer system. This can result in a relatively high system load, especially when Fax G3 documents are received. Active controllers such as those from the AVM ISDN-Controller Family B1 all include their own chip, thus reducing the system's load.
The current version of HylaFAX unfortunately does not offer direct CAPI 2.0 binding; only a binding for analog modems is included. Until now only active ISDN-Controllers like the AVM ISDN-Controller B1 could be connected to HylaFAX by means of a separately installed patch.
The new "CAPI4Linux" now allows the use of practically any
ISDN-Controller equipped with a fax-capable CAPI 2.0 driver compliant with
the LINUX CAPI 2.0 specification. See also the CAPI 2.0 Specification at
http://www.capi.org
Thus it is possible for the first time to fax with the popular passive ISDN-Controllers even in Linux. Thanks to CAPI 2.0, multiple ISDN services can be used at the same time, such as Fax G3 reception and a connection to the Internet via pppd. The ISDN B channels are assigned automatically by the CAPI 2.0 driver.
Up to four active AVM ISDN-Controllers with CAPI4Linux drivers can be installed on each system. Even mixed configurations (one AVM ISDN-Controller B1 PCI, one ISDN-Controller B1 ISA plus two ISDN-Controllers C2, for example) are possible with as many as four active ISDN-Controllers. The CAPI4HylaFAX module then has to be modified for operation with multiple ISDN-Controllers. Please see the additional information in section 3.
In any system, only one passive ISDN-Controller (e.g. FRITZ!Card PCI) can be installed using a CAPI4Linux driver.
The latest version of HylaFAX and more information are available at http://www.hylafax.org
From the current HylaFAX version on (included with the SuSE 8.1), HylaFAX always transfers seven parameters to HylaFAX faxrcvd. SuSE Linux versions 8.0 or below or original HylaFAX versions expect less parameters. The difference to the original HylaFAX lies in the restricted analog model, which does not allow the important ISDN features MSN or DDI to be used for e-mail forwarding.
The new "CAPI4HylaFAX" installation script automatically adapts existing faxrcvd scripts such that older faxrcvd scripts can continue working with the current CAPI4HylaFAX version.
In line 33, for example, the script looks like this:
# faxrcvd file devID commID error-msg CIDNumber CIDName destination
#
if [ $# -lt 7 ]; then
echo "Usage: $0 file devID commID error-msg CIDNumber CIDName
destination"
fi
The following table specifies the faxrcvd parameters in brief:
Parameter | Meaning |
qfile | indicates the received TIFF or SFF fax file |
devid | relates to the virtual modem device required to send a fax (faxCAPI, for example) |
commid | continuous identification number for incoming calls (faxes) |
error-msg | includes an entry when problems occurred during fax reception |
cidnumber | fax number of the sender; if no number is transferred, the caller ID is shown here |
cidname | name of the sender's fax device; |
destination | extension number of the recipient (MSN or DDI) |
Further information about faxrcvd can be found in the corresponding manual page, displayed by entering the command "man faxrcvd" at a console.
ATTENTION: | If you want to use the current CAPI4HylaFAX version in one of the SuSE versions between 7.2 and 8.0 and if you want to forward faxes from a certain MSN or DDI, you have to adapt the the faxrcvd script manually, since the order of parameters varies depending on which HylaFAX and SuSE version is used. |
NOTE: | If you use "GlobalCall", please note the following: "GlobalCall", especially popular in Austria, does not transmit your main number, thus deactivating the parameter "IncomingMSN" in the "config.faxCAPI" file. Therefore all voice and fax calls that arrive at the main number are accepted. If you want to deactivate the automatic call acceptance, you have to set the parameter "AcceptGlobalCalls" on "0". In all other cases the pre-set value "1" is preferable. |
More information about HylaFAX and the usage of the "faxrcvd" script is available at http://www.hylafax.org.
Please note that the following prerequisites have to be met before starting installation of HylaFAX:
NOTE: | AVM supplies pre-compiled patches for SuSE which facilitate especially simple installation for these distributions. For more details about installation in other distributions, see section 3. |
(1) Copy the archive "CAPI4HylaFAX-[Version No].tar.gz" from the CAPI4Linux archive to your computer (e.g. from a diskette using the "mcopy" command from a console) and start the console (command prompt).
Extract the archive with the command:
tar -xzvf CAPI4HylaFAX-[Version No].tar.gz
A directory called "CAPI4HylaFAX-[Version No]" is created.
(2) Switch to this new "CAPI4HylaFAX-[Version No]" directory.
(3) Run "./install". With "./install -h" you get an overview of parameters with extended installation options. Next the system automatically checks for an installed HylaFAX. If the HylaFAX package is not found, a corresponding message is returned.
NOTE: | If the HylaFAX package is not found, you have to enter the "HylaFAX spool directory" manually as a parameter. Even then it is possible to send or receive a fax as described in step (4). In this case simply install stand-alone operation without automatic HylaFAX configuration by entering the parameter "-s". |
By means of a graphic menu system, you can now perform the initial configuration of the most important parameters for the fax operation of a previously installed AVM ISDN-Controller. All configurations are saved in the file "/var/spool/fax/etc/config.faxCAPI". This file is used by HylaFAX as well as by the applications "c2faxsend" and "c2faxrecv". Please see also step (4).
ATTENTION: | To configure more than one active AVM ISDN-Controller for fax
operation with HylaFAX, or to change the settings of the CAPI4HylaFAX
module after installation, you MUST (!) manually perform the relevant
settings in the file: /var/spool/fax/etc/config.faxCAPI (in SuSE Linux) /var/spool/fax/etc/config.faxCAPI (HylaFAX 4.1.x) |
The graphic menu system allows only the configuration of the basic functions of an ISDN-Controller during installation. All further settings can only be performed manually in the file "config.faxCAPI".
For configuration using the menu system, the following parameters are now available:
Parameter | Meaning |
OutgoingMSN | Defines the outgoing MSN to be used at the ISDN basic access. In this way you can define which MSN from the block of numbers is to be used for outgoing connections and thus allow MSN-specific accounting. For some PBXs with an internal So bus you must indicate the MSN of the extension used. |
IncomingMSNs | Defines the outgoing MSN to be used at the ISDN basic rate interface. If several ISDN devices with the same ISDN service indicator are used at the basic rate interface, each of these devices must be unambiguously addressed via a specific MSN. If this parameter is NOT (!) defined, all incoming calls with the service indicator "Group 2/3 Fax" and "Telephony (analog)" will be accepted. If several MSNs are to be used, they must be separated by commas. |
DDIParams | Defines parameters for operation at a PBX ISDN
point-to-point line with direct dial-in (DDI). indicates the number of
digits which precede the extension number. Example: 39976-0 => DDIOffset=39976 (number of digits which precede the extension number) "DDILength": indicates the number of digits of the extension number. Example: 4711 => DDILength=4 "IncomingDDIs": List of extension numbers which are to be accepted. |
FaxNumber | Defines the fax number which appears in the fax header
at the recipient. ATTENTION: HylaFAX cannot process blanks. Use the entry "." instead. This entry is automatically converted into a blank. |
FaxIdentifier | Defines the local name (station ID) shown in the fax header at the recipient. |
NumberPrefix | Defines the digit required to access an outside line when operating at a PBX (generally "0"). |
NOTE: | Further parameters for fax polling, for example, can be directly configured in the file "config.faxCAPI". These parameters are documented in the file itself. |
(4) Now a configuration file is generated automatically at "/var/spool/[hyla]fax/etc/config.faxCAPI". If for some reason the file does not exist (any more), the default settings will be used automatically.
Now it is possible to send or receive a fax immediately from the command line using the following applications No other components are required by HylaFAX for these operations. These applications thus offer the opportunity to perform a quick test in stand-alone operation of whether the software is properly installed.
Send | c2faxsend -f TIFF -d [TelNo] [TIFF file] c2faxsend -f SFF -d [TelNo] [SFF file] |
Receive | c2faxrecv -f TIFF c2faxrecv -f SFF |
The parameter -h provides a complete survey of the implemented options in both applications.
The applications "c2faxsend" and "c2faxrecv" search for the configuration file "config.faxCAPI" at "/var/spool/fax/etc/config.faxCAPI". It is possible to save the configuration file "config.faxCAPI" at another location in the system; in this case the location must be specified in "-C FILE" when the application is opened.
In stand-alone operation without HylaFAX, "c2faxrecv" cannot be running when a fax is to be sent(!). "c2faxsend" can use only the "TIFF" (class F, FAX G3, 1 dim. Huffmann coding) and "SFF" file formats. More information about the SFF format is documented in the CAPI 2.0 specification. For more information, see http://www.capi.org. More information about the TIFF format used is presented in section 4 of this document.
In order to send a document, it should be converted with a corresponding program first (e.g. with Ghostscript). AVM supplies the demonstration file "fritz_pic.tif" in the suitable TIFF format. The command for sending the AVM test fax to any Fax G3 remote site, specified with [TelNo], is thus
c2faxsend -vf TIFF -d [TelNo] fritz_pic.tif
(5) A number of preparatory steps for using HylaFAX were already automatically performed by the installation script in step (3).
If HylaFAX is to be used, note the following:
To send, just enter "sendfax -d [TelNo] file". The file can have almost any format. The programs "file" or "a2ps" must be able to read the format so that the file can be converted correctly first into PS format and then into TIFF format. Graphical frontends are also available to facilitate working with HylaFAX. For more information, see the documentation at
If faxes are to be sent directly from an application, the printer configuration must be adapted in the application. Usually a command for printing can be entered in the application, usually just "lpr". Replace this with "sendfax -d [TelNo]". These functions are program-dependent and should be documented in the application Help file.
Once a fax is received via HylaFAX, "root" receives a mail sent by the script "faxrcvd" announcing the reception of a fax.
When using the fax module "c2faxrecv" in stand-alone operation, you can obtain an analog fax receiving by using the supplied sample script "sample_faxrcvd".
Once a fax is received, the script specified in the configuration file (for HylaFAX "faxrcvd") is executed with the following parameters, separated for HylaFAX mode and stand-alone operation:
Stand-alone operation | [Result Code] [CAPI Disconnect Reason] [Sender ID] [Called Number or DDI] [Num of Pages] [File(s)] |
HylaFAX mode | [faxrcvd file] [devID] [commID] [error-msg] [CIDNumber] [CIDName] [destination] |
Additional details are available in the HylaFAX documentation.
If you use a distribution or a kernel version other than SuSE 6.3/6.4/7.0/7.3/8.0/8.1, you still can use CAPI4HylaFAX without problems. Only if the installation routine of CAPI4HylaFAX reports missing (program) libraries is it necessary to compile the sources supplied in the directory "/src". To simplify this process, AVM supplies complete "makefiles". For more details about compiling sources, see the file "README.src".
TIFF (Tagged Image File Format) files must correspond to the specification "Class F for facsimile (TIFF Class F)", based on the TIFF 6.0 specification. In addition, the file must contain one-dimensional Huffmann coding. This format was specified in "Group 3" by the CCITT (International Telegraph and Telephone Consultative Committee). For more information about TIFF format, see the "Developer" division of Adobe Systems Incorporated at http://www.adobe.com
To convert a postscript file into a TIFF file conform to the fax application, the following command can be used to activate Ghostscript:
gs -dBATCH -dNOPAUSE -sDEVICE=tiffg3 -sOutputFile=[Name of Tif file] [Name of postscript file]
Up to four active AVM ISDN-Controllers can be addressed via the CAPI 2.0 interface. It is also possible to install controllers for different bus systems such as PCI, ISA and PCMCIA. For details about the controller installation, please refer to the documentation of the driver module Linux CAPI 2.0.
The CAPI4HylaFAX module simultaneously supports the operation of multiple active AVM ISDN-Controllers sending and receiving in HylaFAX. After installing the module CAPI4HylaFAX, some modifications are necessary in the configuration file "/var/spool/fax/etc/config.faxCAPI". These changes are necessary because the graphically supported installation routine described above is designed for one controller only. Other parameters for the operation of several AVM ISDN-Controllers in the configuration file "config.faxCAPI" are documented in the file itself. After modifying the configuration file the module "c2faxrecv" must be stopped and restarted in order to activate the modification.
A pre-configured sample script is enclosed for operation with the AVM ISDN-Controller C4 or the AVM ISDN-Controller C4. The script is named "sample_AVMC4_config.faxCAPI".
This script simplifies the configuration of multiple-channel controllers for CAPI4HylaFAX: just modify the script according to your individual technical surroundings (MSNs etc.).
Fax polling is now supported with this version of HylaFAX. Operation in client mode is possible, i.e., CAPI4HylaFAX can be used to poll fax documents. It is not yet possible to provide callers with fax documents to poll (Server Mode).
Execute the following file to start fax polling in stand-alone mode:
c2faxsend -vf TIFF -d [TelNo] -P [mail address]
Execute the following file to start fax polling in HylaFAX mode:
sendfax -d [TelNo] -p
In either case, a script is started after the fax is received and the E-mail address and the corresponding fax document are provided. The script is defined in the configuration file "config.faxCAPI" under the following parameter:
PollRcvdCmd
The applications interface CAPI 2.0 can be downloaded free of charge from the following Internet site:
Additional questions about the CAPI 2.0 specification should be asked in the Usenet at the following URL:
Useful discussions of ISDN and Linux issues can be found at:
news:comp.os.linux.networking or news:comp.dcom.isdn
Information about an already existing CAPI 2.0-based program for receiving faxes (G3) and voice calls is provided at the URL:
http://capircvd.berlios.de/index_eng.php3
AVM offers support for this product. This support is limited to the actual installation and the ISDN functionality up to the successful completion of the test connection or the test fax over CAPI 2.0 drivers and the CAPI4HylaFAX module in combination with AVM ISDN-Controllers, using the provided installation programs. For questions about network configuration, integrated functions of the Linux operating system and applications from other manufacturers, please contact the relevant manufacturer or the support service of the distribution used. Please address any questions concerning configuration and operation of HylaFAX to:
The AVM web site offers detailed information and updates free of charge.
Visit the site at http://www.avm.de/en.
All programs and drivers available from the Internet site can also be obtained from the AVM Data Call Center (ADC).
Please use the information sources described above before contacting AVM Support. If these instructions and the various information sources have not helped to resolve your problem, contact AVM Support for additional technical assistance. AVM Support can be reached by E-mail. You may send your support requests to AVM by E-mail. Support inquiries can be sent to AVM using the E-mail form provided at the Internet address
Fill out the form and mail it to AVM Support by clicking the "Send" button.
EOF
SAS, SR, FS 01/2003