Faxen mit asterisk (hylafax, iaxmodem) und fritzbox

humanlike

Neuer User
Mitglied seit
20 Mrz 2009
Beiträge
75
Punkte für Reaktionen
0
Punkte
6
I habe versucht hylafax und iaxmodem aufzusetzen und faxe über die fritzbox zu schicken. Klappt leider nciht ganz.



Bash:
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
Bash:
[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 (Password geändert zu passwd)


Bash:
```
[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:[EMAIL][email protected][/EMAIL]/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:

1642276024357.png
Bash:
[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



Setup von hylafax via faxaddmodem (area code habe ich geändert zu XXXX):

Bash:
```
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 [XXXX]?
Phone number of fax modem [+49.XXXX.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
Und dann hängt es. Kann mir jemand sagen, wie ich mich dem Problem nähern kann?
 
Ich bekomme folgenden Fehler in der asterisk CLI:

Code:
[Jan 15 21:21:08] NOTICE[445]: chan_sip.c:16040 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #341)

Passwort habe ich grade nochmal in der Fritzbox geändert, ist soweit also korrekt.
 
Wenn das Passwort soweit also korrekt ist, ist es der Benutzername dann wohl nicht. 620 ist auf jeden Fall nicht korrekt. Der muss nämlich mindestens 8 Stellen lang sein.
 
Und wo habe ich fälschlicherweise 620 verwendet?
Ich habe versucht mich hieran zu orientieren und auch andere Anleitungen gelesen.

Die Fritzbox sagt übrigens:
"Anmeldung für IP-Telefoniegerät "asterisk" von IP-Adresse 192.168.103.44 nicht erfolgreich. [100 Meldungen seit 16.01.22 08:42:03]"

-- Zusammenführung Doppelpost gemäß Boardregeln by stoney

Jetzt klappt es. Habe IP Adressen statt host (fritz.box) eingetragen.

Hylafax will aber nicht starten und der Probing test bei der Einrichtung über faxaddmodem will auch nicht.



Code:
Probing for best speed to talk to modem: 38400

Code:
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:~#
 
Zuletzt bearbeitet von einem Moderator:
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.