Asterisk and hylafax

I tried to configure fax function in asterisk and followed the instructions here.

At step 6, I get the following error message:

root@asterisk:~# faxaddmodem ttyIAX0
/dev/ttyIAX0 is not a terminal device.
Serial port that modem is connected to [ttyIAX0]?
/dev/ttyS0 is not a terminal device.

I have only installed hylafax before, but do not know what to configure here. I followed these instructions, but I did not know what to configure:

root@asterisk:~# faxmodem
Missing modem device.
usage: /usr/lib/hylafax/bin/faxmodem [-c fax-capabilities] [-p] [-P] [-u priority] [-q queue-dir] modem
root@asterisk:~# faxsetup

Setup program for HylaFAX (tm) 6.0.7.

Created for x86_64-pc-linux-gnu on Wed, 13 Jan 2021 13:00:13 +0000.

Reading cached parameters from /var/spool/hylafax/etc/setup.cache.

Found base64 encoder: /usr/bin/base64
Found Quoted-Printable encoder: qp-encode
Found mimencode for compatibilty: mimencode
Checking system for proper server configuration.


Warning: /etc/hylafax/getty-link does not exist or is not an executable program!

The file:

    /etc/hylafax/getty-link

does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/getty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.


Warning: /etc/hylafax/vgetty-link does not exist or is not an executable program!

The file:

    /etc/hylafax/vgetty-link

does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/vgetty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.


Warning: /etc/hylafax/egetty-link does not exist or is not an executable program!

The file:

    /etc/hylafax/egetty-link

does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/egetty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.

Make /var/spool/hylafax/bin/ps2fax a link to /var/spool/hylafax/bin/ps2fax.gs.


Make /var/spool/hylafax/bin/pdf2fax a link to /var/spool/hylafax/bin/pdf2fax.gs.

Update /var/spool/hylafax/status/any.info.

        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]?

Modem support functions written to /var/spool/hylafax/etc/setup.modem.
Configuration parameters written to /var/spool/hylafax/etc/setup.cache.

Restarting HylaFAX server processes.
Should I restart the HylaFAX server processes [yes]?

/etc/init.d/hylafax start
Starting hylafax (via systemctl): hylafax.service.

You do not appear to have any modems configured for use.  Modems are
configured for use with HylaFAX with the faxaddmodem(8) command.
Do you want to run faxaddmodem to configure a modem [yes]?
Serial port that modem is connected to [ttyS0]?
/dev/ttyS0 is not a terminal device.

Neither hylafax nor iaxmodem are parts of Asterisk.

@david551:Thank you for the clarification. Is there any fax solution working with fritzbox, which you can recommend?

What david551 tried to say, is, that you are on the wrong forum here :slight_smile: with your question.

But I can say, that hylafax works pretty fine with asterisk if it is configured correctly. Hylafax related questions should go to a hylafax group and iaxmodem questions to a iaxmodem group.

From an architectural view:
outgoing fax:
hylafax uses one iaxmodem to give the fax via iax / G711 e.g. to asterisk (iaxmodem is just an iax extension for asterisk like a phone e.g.)

inbound fax:
The inbound fax is routed by asterisk to another iaxmodem extension, which is bound to hylafax via faxgetty.

The configuration and implementation of this architecture isn’t trivial but it’s working fine if done correctly. There are a sites on the internet which describe how to do it (ok, often you need more as one of them and you have to take care of the age of the descriptions).

Is there any other fax solution for asterisk? What about fax-for-asterisk? Can someone help me to configure it together with a fritzbox?

Hello @simon2020

maybe this old Spanish Asterisk 11 HowTo can help you:

Regards

@annusfictus Many thanks, but also here I fail at configuring the hylafax.

Before you can start faxaddmodem, the modem itself must be configured and up. The modem is the iaxmodem. It must be configured like this:
file /etc/iaxmodem/ttyIAX0:

device          /dev/ttyIAX0
owner           uucp:uucp
mode            660
port            4570
refresh         120
server          127.0.0.1
peername        98
secret          secret
;codec           slinear
nojitterbuffer
codec           alaw
; Debug options
; record creates /tmp/$peername-dsp.raw and /tmp/$peername-iax.raw
; convert to playable wav with:
; sox -e signed-integer -b 16 -r 8000 -c 1 $peername-iax.raw $peername-iax.wav
; sox -e signed-integer -b 16 -r 8000 -c 1 $peername-dsp.raw $peername-dsp.wav
;record
;dspdebug
;iax2debug

It can be started on base of a systemd config file like this:

# systemd cat iaxmodem@ttyIAX0.service
# /usr/lib/systemd/system/iaxmodem@.service
[Unit]
Description=Software Modem for Hylafax and IAX2 %I

[Service]
Restart=always
RestartSec=30
Type=simple
PIDFile=/var/run/iaxmodem.pid
ExecStart=/usr/sbin/iaxmodem %I

[Install]
WantedBy=multi-user.target

You always have to add your own parameters - you can’t just copy paste the above config files.

If it’s running, you will get an output like this:

# systemd status iaxmodem@ttyIAX0.service
● iaxmodem@ttyIAX0.service - Software Modem for Hylafax and IAX2 ttyIAX0
   Loaded: loaded (/usr/lib/systemd/system/iaxmodem@.service; enabled; vendor preset: disabled)
   Active: active (running) since Fr 2021-02-19 22:30:45 CET; 2 months 23 days ago
 Main PID: 707 (iaxmodem)
   CGroup: /system.slice/system-iaxmodem.slice/iaxmodem@ttyIAX0.service
           └─707 /usr/sbin/iaxmodem ttyIAX0

If you have a running iaxmodem, you can do the addfaxmodem procedure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.