Hylafax, iaxmodem, fritzbox configuration: faxaddmodem fails at probing tty

I tried to configure hylafax with a sip account with iaxmodem and a fritzbox as phone service.

root@asteriskXantorix:~# /etc/init.d/iaxmodem status
● iaxmodem.service - LSB: Software modem with IAX2 connectivity
     Loaded: loaded (/etc/init.d/iaxmodem; generated)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Sat 2022-01-15 18:21:44 UTC; 21min ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 2 (limit: 8730)
     Memory: 1.7M
     CGroup: /system.slice/iaxmodem.service
             ├─515 /usr/bin/iaxmodem
             └─516 /usr/bin/iaxmodem

Jan 15 18:21:44 asteriskXantorix systemd[1]: This usually indicates unclean termination of a previ…ncies.
Jan 15 18:21:44 asteriskXantorix systemd[1]: iaxmodem.service: Found left-over process 248 (iaxmod…oring.
Jan 15 18:21:44 asteriskXantorix systemd[1]: This usually indicates unclean termination of a previ…ncies.
Jan 15 18:21:44 asteriskXantorix systemd[1]: Starting LSB: Software modem with IAX2 connectivity...
Jan 15 18:21:44 asteriskXantorix iaxmodem[510]: Starting iaxmodem: iaxmodem.
Jan 15 18:21:44 asteriskXantorix systemd[1]: Started LSB: Software modem with IAX2 connectivity.
Hint: Some lines were ellipsized, use -l to show in full.
root@asteriskXantorix:~# /etc/init.d/hylafax status
● hylafax.service - HylaFAX
     Loaded: loaded (/lib/systemd/system/hylafax.service; disabled; vendor preset: enabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (exited) since Sat 2022-01-15 18:42:37 UTC; 48s ago
       Docs: man:hylafax
    Process: 924 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 924 (code=exited, status=0/SUCCESS)

Jan 15 18:42:37 asteriskXantorix systemd[1]: Starting HylaFAX...
Jan 15 18:42:37 asteriskXantorix systemd[1]: Finished HylaFAX.

extensions.conf

[general]
autofallthrough=no

[fritz_in]
 exten => 620,1,Goto(siptrunk,${SIP_HEADER(To):11:7},1)                          ;620 is the sip from my fritzbox

[siptrunk]
 exten => _X.,1,Dial(IAX2/iaxmodem)
 exten => _X.,n,Hangup

[fax_out]

; Festnetz Deutschland im eigenen Vorwahlbereich
exten => _Z.,1,Dial(SIP/*9739127#${EXTEN}@620,180)                                  ;*9739127 is the phone number
                                                                                ;       
; Festnetz Deutschland außer Vorwahlbereich "01" (Sonderrufnummern und Handy)
exten => _0N.,1,Dial(SIP/*9739127#${EXTEN}@620,180)
exten => _0049N.,1,Dial(SIP/*9739127#${EXTEN}@620,180)

; International außer Deutschland
exten => _00X[1-8]Z.,1,Dial(SIP/*1214#${EXTEN}@620,120)                         ;*1214# ist ein Anbieter>

; Premium Rate-Dienste verweigern
exten => _0900.,1,Hangup
exten => _0049900.,1,Hangup

[unauthenticated]

Sip.conf (I changed the password here to passwd)

[general]
 context=unauthenticated
 bindport=5070
 bindaddr=0.0.0.0
 localnet=fritz.box/255.255.255.0               ; Netzwerk und Maske Fritzbox
 nat=force_rport,comedia instead
 allowguest=no
 alwaysauthreject=yes
 qualify=no

language=de                                         ; Default language setting for all users/peers
                                                    ; This may also be set for individual users/peers
tonezone=de                                         ; Default tonezone for all users/peers
                                                    ; This may also be set for individual users/peers

register => asterisk:passwd@fritz.box/620

[620]
 type=peer
 qualify=no
 host=fritz.box                                 ; IP der Fritzbox
 fromdomain=fritz.box
 fromuser=asterisk
 defaultuser=asterisk
 secret=passwd                                    ; changed it here
 insecure=port,invite
 directmedia=no
 disallow=all
 allow=alaw
 allow=ulaw
 context=fritz_in

iax.conf:

[general]
 bindport=4569
 bindaddr=0.0.0.0
 calltokenoptional=127.0.0.1/255.255.255.0

[iaxmodem]
 port=4570
 type=friend
 host=dynamic
 qualify=yes
 secret=passwd                                  ;Mein Passwort für asterisk
 requirecalltoken=no
 disallow=all
  allow=ulaw
 jitterbuffer=no
 trunk=no
 context=fax_out

This is how I setup hylafax via faxaddmodem:

root@asteriskXantorix:~# faxaddmodem
Serial port that modem is connected to [ttyS0]? ttyIAX0

Ok, time to setup a configuration file for the modem.  The manual
page config(5) may be useful during this process.  Also be aware
that at any time you can safely interrupt this procedure.

Reading scheduler config file /var/spool/hylafax/etc/config.

No existing configuration, let's do this from scratch.


Are these ok [yes]? no
Country code [49]?
Area code [9227]?
Phone number of fax modem [+49.9227.9739127]?
Local identification string (for TSI/CIG) ["NothingSetup"]?
Long distance dialing prefix [0]?
International dialing prefix [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 ttyIAX0 [0600]?
Rings to wait before answering [1]?
Modem speaker volume [off]?
Command line arguments to getty program [-h %l dx_%s]?
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 [Von %%l|%c|Seite %%P von %%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 [""]?

Now we are going to probe the tty port to figure out the type
of modem that is attached.  This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).

Probing for best speed to talk to modem: 38400

And then it does not go on. Is there any chance to test what the problem is?

so what is your problem & witch part is not working ?
on asterisk what do iax show peers / sip show peers show
what happens when a call is made ?
what version of asterisk are you using ?

Thank you for the hints.

I see the following error in the asterisk CLI:
[Jan 15 21:21:08] NOTICE[445]: chan_sip.c:16040 sip_reg_timeout: -- Registration for 'asterisk@fritz.box' timed out, trying again (Attempt #341)

I checked the password and even renewed the password in the fritzbox, its correct.

This is not related with IAXmodem and Hylafax

Regards

It’s also not symptomatic of a bad password, but rather of a network or addressing problem.

Can you please give me any hints how to check this?
Which ports should I p.ex. check? I can ping the fritzbox from the server (container) via
ping fritz.box sucessfully.

Typically port 5060/UDP, towards the Fritz Box and whatever you set as your SIP port (default 5060/UDP) towards the Asterisk box. If you are also inside NAT for some purposes, you must ensure that the Fritz Box network is listed in your local networks.

Note that chan_sip will be completely removed from Asterisk, I believe next year.

Linux ping does not use any ports, so will work with no ports open.

NB I’m assuming the fritzbox supports SIP on the LAN side. I’ve not used them and a search suggests that there are many variants and that the intended use is with analogue or DECT phones on the local side.

Network works now.

asteriskXantorix*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
620/asterisk              192.168.103.1                               Yes        No             5060     Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]

But hylafax ist not running and the probing test as shown in the first post is not succesfull.

root@asteriskXantorix:~# /etc/init.d/iaxmodem status
● iaxmodem.service - LSB: Software modem with IAX2 connectivity
     Loaded: loaded (/etc/init.d/iaxmodem; generated)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Sun 2022-01-16 10:30:11 UTC; 29min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 182 ExecStart=/etc/init.d/iaxmodem start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 8730)
     Memory: 1.1M
     CGroup: /system.slice/iaxmodem.service
             ├─212 /usr/bin/iaxmodem
             └─213 /usr/bin/iaxmodem

Jan 16 10:30:10 asteriskXantorix systemd[1]: Starting LSB: Software modem with IAX2 c…y...
Jan 16 10:30:11 asteriskXantorix iaxmodem[182]: Starting iaxmodem: iaxmodem.
Jan 16 10:30:11 asteriskXantorix systemd[1]: Started LSB: Software modem with IAX2 co…ity.
Hint: Some lines were ellipsized, use -l to show in full.
root@asteriskXantorix:~# /etc/init.d/hylafax status
● hylafax.service - HylaFAX
     Loaded: loaded (/lib/systemd/system/hylafax.service; disabled; vendor preset: enabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (exited) since Sun 2022-01-16 10:33:05 UTC; 27min ago
       Docs: man:hylafax
    Process: 496 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 496 (code=exited, status=0/SUCCESS)

Jan 16 10:33:05 asteriskXantorix systemd[1]: Starting HylaFAX...
Jan 16 10:33:05 asteriskXantorix systemd[1]: Finished HylaFAX.
root@asteriskXantorix:~#

I believe to troubleshoot hylafax itself you need to go on there mailing list
we can help with asterisk issues, but it is limited how many here can help with hylafax spicifik errors

Many thanks! Is there a chance to check if my configuration (besides hylafax) works?
Could I try to start a call and check if it works? I read about it, but do not know how to adapt it to my configuration.

Please stop to write in this list and go to Hylafax mailing list.

in asterisk you can do these 2 commands to check the peers and also look at what happens when you try to call the fax number

iax2 show peers
pjsip show endpoints

This gives me:

asteriskXantorix*CLI> iax2 show peers
Name/Username    Host                                           Mask                                      Port           Status      Description
iaxmodem         127.0.0.1                                (D)  (null)                                    4570           OK (3 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]
asteriskXantorix*CLI> pjsip show endpoints
No objects found.

I have not configured incoming calls in asterisk, so I also do not see any reaction in asterisk CLI. If you can tell me how to configure incoming calls, I am glad to to so.

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