Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.


Vorhergehende Überarbeitung
centos:hylafax_c6 [02.01.2014 22:56. ] – Fax-Server mit HylaFAX+ unter CentOS 6.x überarbeitet und aktualisiert django
Zeile 1: Zeile 1:
-====== Fax-Server mit HylaFAX+ unter CentOS 6.x ====== 
-{{:voip:hylafax-plus.png?nolink&600|Bild: HylaFax Schriftzug}} 
- 
-**HylaFAX+** ist eine OpenSource Fax-Serverlösung mit dem klingenden Slogan:\\ 
-\\ **//HylaFAX™ is an enterprise-class open-source system for sending and receiving facsimiles as well as for sending alpha-numeric pages. The "+" means that it is better.The world's most advanced open source fax server//**. 
- 
-Da es für **HylaFAX+** ein bereits vorgefertigtes **RPM** aus dem [[http://fedoraproject.org/wiki/EPEL|EPEL-Repository]] gibt, brauchen wir nicht mehr selber Hand anlegen und HylaFAX aus den Quellen selbst übersetzen und installieren. 
- 
-Ein ausführliches [[http://hylafax.sourceforge.net/howto/index.php|How-To]] findet man ebenso wie die [[http://hylafax.sourceforge.net/man/index.php|Manpage-List]] auf der [[http://hylafax.sourceforge.net/|sourceforge.net Project Page]]. 
- 
- 
-===== Installation ===== 
-Die Installation geht wie gewohnt sehr einfach von statten.  
-   # yum install hylafax+ hylafax+-client -y 
- 
-Nach der erfolgreichen Installation können wir uns mittels **rpm -qil hylafax+** einen Überblick verschaffen, welche Dateien installiert und wohin diese gespeichert worden sind.  
-   # rpm -qil hylafax+ 
-<code>Name        : hylafax+                     Relocations: (not relocatable) 
-Version     : 5.5.4                             Vendor: Fedora Project 
-Release     : 1.el6                         Build Date: Wed 07 Aug 2013 06:55:00 AM CEST 
-Install Date: Fri 13 Dec 2013 01:27:57 PM CET      Build Host: buildvm-13.phx2.fedoraproject.org 
-Group       : Applications/Communications   Source RPM: hylafax+-5.5.4-1.el6.src.rpm 
-Size        : 2196979                          License: libtiff and BSD with advertising 
-Signature   : RSA/8, Wed 07 Aug 2013 06:00:52 PM CEST, Key ID 3b49df2a0608b895 
-Packager    : Fedora Project 
-URL         : http://hylafax.sourceforge.net 
-Summary     : An enterprise-strength fax server 
-Description : 
-HylaFAX(tm) is a enterprise-strength fax server supporting 
-Class 1 and 2 fax modems on UNIX systems. It provides spooling 
-services and numerous supporting fax management tools. 
-The fax clients may reside on machines different from the server 
-and client implementations exist for a number of platforms including 
-windows. 
-/etc/cron.daily/hylafax+ 
-/etc/cron.hourly/hylafax+ 
-/etc/hylafax 
-/etc/hylafax/hfaxd.conf 
-/etc/rc.d/init.d/hylafax+ 
-/etc/sysconfig/hylafax+ 
-/usr/lib64/libfaxserver.so.5.5.4 
-/usr/sbin/choptest 
-/usr/sbin/cqtest 
-/usr/sbin/faxabort 
-/usr/sbin/faxaddmodem 
-/usr/sbin/faxadduser 
-/usr/sbin/faxanswer 
-/usr/sbin/faxconfig 
-/usr/sbin/faxcron 
-/usr/sbin/faxdeluser 
-/usr/sbin/faxgetty 
-/usr/sbin/faxlock 
-/usr/sbin/faxmodem 
-/usr/sbin/faxmsg 
-/usr/sbin/faxq 
-/usr/sbin/faxqclean 
-/usr/sbin/faxquit 
-/usr/sbin/faxsend 
-/usr/sbin/faxstate 
-/usr/sbin/hfaxd 
-/usr/sbin/hylafax 
-/usr/sbin/lockname 
-/usr/sbin/ondelay 
-/usr/sbin/pagesend 
-/usr/sbin/probemodem 
-/usr/sbin/recvstats 
-/usr/sbin/tagtest 
-/usr/sbin/tsitest 
-/usr/sbin/xferfaxstats 
-/usr/share/doc/hylafax+-5.5.4 
-/usr/share/doc/hylafax+-5.5.4/CHANGES 
-/usr/share/doc/hylafax+-5.5.4/CONTRIBUTORS 
-/usr/share/doc/hylafax+-5.5.4/COPYRIGHT 
-/usr/share/doc/hylafax+-5.5.4/README 
-/usr/share/doc/hylafax+-5.5.4/TODO 
-/usr/share/doc/hylafax+-5.5.4/VERSION 
-/usr/share/man/man5/doneq.5f.gz 
-/usr/share/man/man5/hosts.hfaxd.5f.gz 
-/usr/share/man/man5/hylafax-config.5f.gz 
-/usr/share/man/man5/hylafax-info.5f.gz 
-/usr/share/man/man5/hylafax-log.5f.gz 
-/usr/share/man/man5/hylafax-server.5f.gz 
-/usr/share/man/man5/hylafax-shutdown.5f.gz 
-/usr/share/man/man5/pagermap.5f.gz 
-/usr/share/man/man5/recvq.5f.gz 
-/usr/share/man/man5/sendq.5f.gz 
-/usr/share/man/man5/status.5f.gz 
-/usr/share/man/man5/tsi.5f.gz 
-/usr/share/man/man5/xferfaxlog.5f.gz 
-/usr/share/man/man8/choptest.8c.gz 
-/usr/share/man/man8/cqtest.8c.gz 
-/usr/share/man/man8/faxabort.8c.gz 
-/usr/share/man/man8/faxaddmodem.8c.gz 
-/usr/share/man/man8/faxadduser.8c.gz 
-/usr/share/man/man8/faxanswer.8c.gz 
-/usr/share/man/man8/faxconfig.8c.gz 
-/usr/share/man/man8/faxcron.8c.gz 
-/usr/share/man/man8/faxdeluser.8c.gz 
-/usr/share/man/man8/faxgetty.8c.gz 
-/usr/share/man/man8/faxlock.8c.gz 
-/usr/share/man/man8/faxmodem.8c.gz 
-/usr/share/man/man8/faxmsg.8c.gz 
-/usr/share/man/man8/faxq.8c.gz 
-/usr/share/man/man8/faxqclean.8c.gz 
-/usr/share/man/man8/faxquit.8c.gz 
-/usr/share/man/man8/faxrcvd.8c.gz 
-/usr/share/man/man8/faxsend.8c.gz 
-/usr/share/man/man8/faxstate.8c.gz 
-/usr/share/man/man8/hfaxd.8c.gz 
-/usr/share/man/man8/hylafax.8c.gz 
-/usr/share/man/man8/jobcontrol.8c.gz 
-/usr/share/man/man8/lockname.8c.gz 
-/usr/share/man/man8/mkcover.8c.gz 
-/usr/share/man/man8/notify.8c.gz 
-/usr/share/man/man8/ondelay.8c.gz 
-/usr/share/man/man8/pagesend.8c.gz 
-/usr/share/man/man8/pollrcvd.8c.gz 
-/usr/share/man/man8/probemodem.8c.gz 
-/usr/share/man/man8/ps2fax.8c.gz 
-/usr/share/man/man8/recvstats.8c.gz 
-/usr/share/man/man8/tagtest.8c.gz 
-/usr/share/man/man8/tsitest.8c.gz 
-/usr/share/man/man8/wedged.8c.gz 
-/usr/share/man/man8/xferfaxstats.8c.gz 
-/var/spool/hylafax 
-/var/spool/hylafax/archive 
-/var/spool/hylafax/bin/archive 
-/var/spool/hylafax/bin/auto-rotate.ps 
-/var/spool/hylafax/bin/dict/de 
-/var/spool/hylafax/bin/dict/en 
-/var/spool/hylafax/bin/dict/es 
-/var/spool/hylafax/bin/dict/fr 
-/var/spool/hylafax/bin/dict/it 
-/var/spool/hylafax/bin/dict/nl_BE 
-/var/spool/hylafax/bin/dict/pl 
-/var/spool/hylafax/bin/dict/pt 
-/var/spool/hylafax/bin/dict/pt_BR 
-/var/spool/hylafax/bin/dict/ro 
-/var/spool/hylafax/bin/dict/ru 
-/var/spool/hylafax/bin/dict/sr 
-/var/spool/hylafax/bin/dict/tr 
-/var/spool/hylafax/bin/dict/uk 
-/var/spool/hylafax/bin/dict/zh 
-/var/spool/hylafax/bin/dictionary 
-/var/spool/hylafax/bin/faxrcvd 
-/var/spool/hylafax/bin/mkcover 
-/var/spool/hylafax/bin/notify 
-/var/spool/hylafax/bin/pollrcvd 
-/var/spool/hylafax/bin/qp-encode.awk 
-/var/spool/hylafax/bin/rfc2047-encode.awk 
-/var/spool/hylafax/bin/wedged 
-/var/spool/hylafax/client 
-/var/spool/hylafax/config 
-/var/spool/hylafax/config/att-dataport 
-/var/spool/hylafax/config/att-dataport-2 
-/var/spool/hylafax/config/att-dataport-2.0 
-/var/spool/hylafax/config/att-dpexpress-2 
-/var/spool/hylafax/config/cirrus 
-/var/spool/hylafax/config/class1 
-/var/spool/hylafax/config/class1.0 
-/var/spool/hylafax/config/class2 
-/var/spool/hylafax/config/class2.0 
-/var/spool/hylafax/config/class2.1 
-/var/spool/hylafax/config/conexant-1.0 
-/var/spool/hylafax/config/davicom-2 
-/var/spool/hylafax/config/digi 
-/var/spool/hylafax/config/digi-2 
-/var/spool/hylafax/config/digi-20 
-/var/spool/hylafax/config/dsi-scout+ 
-/var/spool/hylafax/config/e-tech 
-/var/spool/hylafax/config/eicon 
-/var/spool/hylafax/config/eicon-2 
-/var/spool/hylafax/config/elsa-microlink-56k-basic-2.0 
-/var/spool/hylafax/config/everex-2496d 
-/var/spool/hylafax/config/exar 
-/var/spool/hylafax/config/gvc-288 
-/var/spool/hylafax/config/gvc-288-2 
-/var/spool/hylafax/config/hayes 
-/var/spool/hylafax/config/i537ep 
-/var/spool/hylafax/config/iaxmodem 
-/var/spool/hylafax/config/intel-400e 
-/var/spool/hylafax/config/ip568x 
-/var/spool/hylafax/config/linux-isdn-2 
-/var/spool/hylafax/config/lucent 
-/var/spool/hylafax/config/lucent-isa 
-/var/spool/hylafax/config/lucent-mt-10 
-/var/spool/hylafax/config/lucent-mt-2 
-/var/spool/hylafax/config/lucent-mt-20 
-/var/spool/hylafax/config/lucent-mt-21 
-/var/spool/hylafax/config/mainpine-10 
-/var/spool/hylafax/config/mainpine-2 
-/var/spool/hylafax/config/mainpine-20 
-/var/spool/hylafax/config/mainpine-21 
-/var/spool/hylafax/config/moto-288 
-/var/spool/hylafax/config/mt-1432 
-/var/spool/hylafax/config/nuvo-voyager 
-/var/spool/hylafax/config/ppi-pm14400fxmt 
-/var/spool/hylafax/config/ppi-pm14400fxsa 
-/var/spool/hylafax/config/prometheus 
-/var/spool/hylafax/config/rc144ac 
-/var/spool/hylafax/config/rc144ac-1 
-/var/spool/hylafax/config/rc288dpi 
-/var/spool/hylafax/config/rc288dpi-1 
-/var/spool/hylafax/config/rc32acl 
-/var/spool/hylafax/config/rc32acl-1 
-/var/spool/hylafax/config/rockwell-k56 
-/var/spool/hylafax/config/rockwell-rc 
-/var/spool/hylafax/config/sierra 
-/var/spool/hylafax/config/skel 
-/var/spool/hylafax/config/t38modem 
-/var/spool/hylafax/config/telebit-qblazer 
-/var/spool/hylafax/config/telebit-t3000 
-/var/spool/hylafax/config/telebit-wb 
-/var/spool/hylafax/config/topic 
-/var/spool/hylafax/config/tricom2842 
-/var/spool/hylafax/config/uds-fastalk 
-/var/spool/hylafax/config/umc92144 
-/var/spool/hylafax/config/umc9624 
-/var/spool/hylafax/config/usr-2.0 
-/var/spool/hylafax/config/usr-rts 
-/var/spool/hylafax/config/usr-xon 
-/var/spool/hylafax/config/zyxel-1496e 
-/var/spool/hylafax/config/zyxel-1496e-1 
-/var/spool/hylafax/config/zyxel-1496e-2.0 
-/var/spool/hylafax/config/zyxel-2864 
-/var/spool/hylafax/dev 
-/var/spool/hylafax/docq 
-/var/spool/hylafax/doneq 
-/var/spool/hylafax/etc 
-/var/spool/hylafax/etc/LiberationSans-25.pcf 
-/var/spool/hylafax/etc/cover.templ 
-/var/spool/hylafax/etc/hosts.hfaxd 
-/var/spool/hylafax/etc/lutRS18.pcf 
-/var/spool/hylafax/etc/xferfaxlog 
-/var/spool/hylafax/info 
-/var/spool/hylafax/log 
-/var/spool/hylafax/pollq 
-/var/spool/hylafax/recvq 
-/var/spool/hylafax/sendq 
-/var/spool/hylafax/status 
-/var/spool/hylafax/tmp 
-</code> 
- 
-   # rpm -qil hylafax+-client 
-<code>Name        : hylafax+-client              Relocations: (not relocatable) 
-Version     : 5.5.4                             Vendor: Fedora Project 
-Release     : 1.el6                         Build Date: Wed 07 Aug 2013 06:55:00 AM CEST 
-Install Date: Thu 02 Jan 2014 06:44:50 PM CET      Build Host: buildvm-13.phx2.fedoraproject.org 
-Group       : Applications/Communications   Source RPM: hylafax+-5.5.4-1.el6.src.rpm 
-Size        : 1091198                          License: libtiff and BSD with advertising 
-Signature   : RSA/8, Wed 07 Aug 2013 06:01:18 PM CEST, Key ID 3b49df2a0608b895 
-Packager    : Fedora Project 
-URL         : http://hylafax.sourceforge.net 
-Summary     : Client programs for HylaFAX fax servers 
-Description : 
-HylaFAX(tm) is a enterprise-strength fax server supporting 
-Class 1 and 2 fax modems on UNIX systems. This package provides 
-fax clients which may reside on machines different from the server. 
-/etc/hylafax 
-/etc/hylafax/faxcover.ps 
-/etc/hylafax/faxmail 
-/etc/hylafax/faxmail.ps 
-/etc/hylafax/faxmail/application 
-/etc/hylafax/faxmail/application/octet-stream 
-/etc/hylafax/faxmail/application/pdf 
-/etc/hylafax/faxmail/image 
-/etc/hylafax/faxmail/image/tiff 
-/etc/hylafax/pagesizes 
-/etc/hylafax/typerules 
-/usr/bin/faxalter 
-/usr/bin/faxcover 
-/usr/bin/faxmail 
-/usr/bin/faxrm 
-/usr/bin/faxstat 
-/usr/bin/sendfax 
-/usr/bin/sendpage 
-/usr/lib64/libfaxutil.so.5.5.4 
-/usr/sbin/dialtest 
-/usr/sbin/edit-faxcover 
-/usr/sbin/faxfetch 
-/usr/sbin/faxinfo 
-/usr/sbin/faxsetup 
-/usr/sbin/faxsetup.linux 
-/usr/sbin/faxwatch 
-/usr/sbin/textfmt 
-/usr/sbin/tiffcheck 
-/usr/sbin/typetest 
-/usr/share/doc/hylafax+-client-5.5.4 
-/usr/share/doc/hylafax+-client-5.5.4/CHANGES 
-/usr/share/doc/hylafax+-client-5.5.4/CONTRIBUTORS 
-/usr/share/doc/hylafax+-client-5.5.4/COPYRIGHT 
-/usr/share/doc/hylafax+-client-5.5.4/README 
-/usr/share/doc/hylafax+-client-5.5.4/TODO 
-/usr/share/doc/hylafax+-client-5.5.4/VERSION 
-/usr/share/man/man1/edit-faxcover.1.gz 
-/usr/share/man/man1/faxalter.1.gz 
-/usr/share/man/man1/faxcover.1.gz 
-/usr/share/man/man1/faxmail.1.gz 
-/usr/share/man/man1/faxrm.1.gz 
-/usr/share/man/man1/faxstat.1.gz 
-/usr/share/man/man1/hylafax-client.1.gz 
-/usr/share/man/man1/sendfax.1.gz 
-/usr/share/man/man1/sendpage.1.gz 
-/usr/share/man/man1/sgi2fax.1.gz 
-/usr/share/man/man1/textfmt.1.gz 
-/usr/share/man/man5/dialrules.5f.gz 
-/usr/share/man/man5/pagesizes.5f.gz 
-/usr/share/man/man5/typerules.5f.gz 
-/usr/share/man/man8/dialtest.8c.gz 
-/usr/share/man/man8/faxfetch.8c.gz 
-/usr/share/man/man8/faxinfo.8c.gz 
-/usr/share/man/man8/faxsetup.8c.gz 
-/usr/share/man/man8/faxsetup.linux.8c.gz 
-/usr/share/man/man8/faxwatch.8c.gz 
-/usr/share/man/man8/pdf2fax.8c.gz 
-/usr/share/man/man8/tiff2fax.8c.gz 
-/usr/share/man/man8/tiffcheck.8c.gz 
-/usr/share/man/man8/typetest.8c.gz 
-/var/spool/hylafax 
-/var/spool/hylafax/bin/common-functions 
-/var/spool/hylafax/bin/genfontmap.ps 
-/var/spool/hylafax/bin/pcl2fax 
-/var/spool/hylafax/bin/pdf2fax.gs 
-/var/spool/hylafax/bin/ps2fax.gs 
-/var/spool/hylafax/bin/tiff2fax 
-/var/spool/hylafax/bin/tiff2pdf 
-/var/spool/hylafax/etc 
-/var/spool/hylafax/etc/dialrules 
-/var/spool/hylafax/etc/dialrules-pabx.be 
-/var/spool/hylafax/etc/dialrules.europe 
-/var/spool/hylafax/etc/dialrules.ext 
-/var/spool/hylafax/etc/dialrules.sf-ba 
-/var/spool/hylafax/etc/dialrules.uk 
-/var/spool/hylafax/etc/dialrules.world 
-</code> 
-===== Konfiguration ===== 
-Bei der Konfiguration unseres Faxservers gibt es nun zu berücksichtigen, an welcher TK-Anlage der Fax-Server betrieben werden soll. 
-  - **Analoge Nebenstelle einer TK-Anlage** 
-  - **Integration in einem VoIP-Server //Asterisk//** 
- 
-==== 1. Analoge Nebenstelle einer TK-Anlage ==== 
-Zum Anschluß unseres Fax-Servers an einem analogen Port einer TK-Anlage benötigen wie einen entsprechenden Modem, in dem folgendem Beispiel gehen wir von einem vorhandenen ELSA-USB Modem aus.  
- 
-Nach dem Anstecken des Modems an den USB-Port wird dies im syslog entsprechend quittiert: 
-<code>Dez 12  9:30:40 elwms kernel: ohci_hcd 0000:00:12.0: wakeup 
-Dez 12  9:30:40 elwms kernel: usb 3-1: new full speed USB device using ohci_hcd and address 10 
-Dez 12  9:30:40 elwms kernel: usb 3-1: configuration #2 chosen from 2 choices 
-Dez 12  9:30:40 elwms kernel: cdc_acm 3-1:2.0: ttyACM0: USB ACM device 
-Dez 12  9:30:40 elwms kernel: usbcore: registered new driver cdc_acm 
-Dez 12  9:30:40 elwms kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters</code> 
-Somit ist schon mal sichergestellt, dass wir den Modem über das Gerät **ttyACM0** ansprechen können. 
-   # ll /dev/ttyACM0  
- 
-   crw-rw---- 1 root uucp 166, 0 27. Sep 16:10 /dev/ttyACM0 
- 
-Da wir den Modem später über die Gerätedatei **/dev/modem** ansprechen wollen (wer will schon immer bei einem Gerätewechsel diverse Konfigscripte abändern?) setzen wir uns noch einen symbolischen link. 
-   # ln -s /dev/ttyACM0 /dev/modem 
- 
-Bei Bedarf können wir nun noch kontrollieren, ob der gewünschte Symlink richtig gesetzt wurde. 
-   # ll /dev/mo* 
- 
-   lrwxrwxrwx 1 root root 12 27. Sep 17:52 /dev/modem -> /dev/ttyACM0 
- 
-Damit nun bei jedem Neustart des Systemes dieser symlink automatisch gesetzt wird, ergänzen wir in der **/etc/udev/rules.d/50-udev.rules** einfach folgende Zeilen: 
-   # vim /etc/udev/rules.d/50-udev.rules</code> 
- 
-<file bash /etc/udev/rules.d/50-udev.rule># Django : 2012-12-12 
-# symlink dauerhaft für /dev/modem setzen                                                                                                                           
-KERNEL=="ttyACM0", SYMLINK+="modem" 
-</file> 
- 
- 
- 
- 
-==== 2. Integration in einem VoIP-Server Asterisk ==== 
-Betreiben wir einen VoIP-Server **Asterisk** so ist es zweckmäßiger den Faxserver direkt in den Asterisk-Server zu integrieren. Hierzu verwenden wir das Programm [[http://iaxmodem.sourceforge.net|IAXmodem]], welches einen Modem emuliert. 
- 
- 
-=== Download === 
-Im ersten Schritt holen wir uns uns die Programm-Sourcen auf unseren Rechner. 
-   # cd /usr/local/src/ 
- 
-   # wget http://downloads.sourceforge.net/project/iaxmodem/iaxmodem/iaxmodem-1.2.0/iaxmodem-1.2.0.tar.gz 
-=== Quellen entpacken === 
-Anschließend entpacken wir die Sourcen und setzen uns einen Symlink auf das Programmverzeichnis. 
-   #  tar -xzvf iaxmodem-1.2.0.tar.gz 
- 
-   # ln -s iaxmodem-1.2.0 iaxmodem 
- 
-Zum Schluß verschieben wir noch das **tar.gz**-Archiv ins Verzeichnis **//packages//**. 
-   # mv /usr/local/src/iaxmodem-1.2.0.tar.gz /usr/local/src/packages/ 
- 
- 
- 
- 
-=== Quellen installieren === 
-Damit wir IAXmodem übersetzen können, installieren wir noch das Paket **libtiff-devel**, da auf dieses Paket beim nachfolgenden Installtionsablauf zurück gegriffen wird. 
-   # yum install libtiff-devel -y 
- 
-Bevor wir uns nun daran machen, die Quellen zu übersetzen, werfen wir noch einen Blick in die Hinweisdoku **README**. 
-   # less /usr/local/src/iaxmodem/README 
-<file /usr/local/src/iaxmodem/README> ** ABOUT IAXMODEM ** 
- 
-IAXmodem is a software modem written in C that uses an IAX channel 
-(commonly provided by an Asterisk PBX system) instead of a traditional 
-phone line and uses a DSP library instead of DSP hardware chipsets. 
- 
-To accomplish this, then, IAXmodem interfaces an IAX library known as 
-libiax2 with a DSP library known as spandsp, and then IAXmodem interfaces 
-the DSP library with a tty device node for interfacing with modem (fax) 
-applications. 
- 
-IAXmodem comes with a copy of both libiax2 and spandsp.  Both of these 
-libraries may have had bugs fixed or enhancements added for specific use 
-with IAXmodem.  Although these changes are submitted to the library 
-authors/maintainers and may be committed to the upstream repositories, 
-it is recommended that the versions here be used for iaxmodem if only 
-for the reason that these versions have been tested and are known to work. 
- 
-If you are using other applications that require a different libiax2 or 
-spandsp version then iaxmodem can be statically linked to the libraries 
-after building the versions here (but not installing them).  See the 
-part about "build static" below. 
- 
-Currently supported platforms are GNU/Linux on x86 hardware. 
- 
-The libiax2 source was pulled from iaxclient SVN on December 23, 2007. 
- 
-The spandsp source is spandsp-0.0.5 snapshot 20080725. 
- 
-IAXmodem should usually be installed either on the same machine as the 
-Asterisk server or on a system that is very close to the Asterisk server 
-on a controlled network.  Do not even bother trying to use IAXmodem to 
-send faxes through your IAX-supporting VoIP provider, it won't work 
-reliably, if at all. 
- 
-Please see the FAQ file for more information regarding IAXmodem. 
- 
- 
- ** INSTALLING IAXMODEM ** 
- 
-There are two ways to build IAXmodem.  One way uses dynamic libraries; 
-the other way uses static libraries.  If you already have an installation 
-of an incompatible spandsp or libiax2 on the system, then you should 
-probably build using static libraries. 
- 
-To install libiax2:  (if you're not going to 'build static') 
- 
-# cd lib/libiax2 
-# ./configure 
-# make 
-# make install 
- 
-To install spandsp:  (if you're not going to 'build static') 
- 
-# cd lib/spandsp 
-# ./configure 
-# make 
-# make install 
- 
-If you're building with dynamic libraries, make sure that your linker 
-can find these libraries by having a line in your /etc/ld.so.conf file 
-that is "/usr/local/lib" and running 'ldconfig' afterwards. 
- 
-To build IAXmodem with dynamic linking: 
- 
-# ./build 
- 
-To build IAXmodem with static linking: 
- 
-# ./build static 
- 
-This will create the iaxmodem binary.  You may run the binary from 
-its present location, or you may copy it to any location that you may 
-choose. 
- 
-The build script also accepts one other command-line option: -bsdptys. 
-This option must come first, like this: 
- 
-# ./build -bsdptys 
- 
-Alternatively you can build IAXmodem with static linking by running 
-the more traditional: 
- 
-# ./configure 
-# make 
- 
-Create the /etc/iaxmodem directory.  The modem configuration files will 
-be stored in here.  With your favorite editor edit the prototype modem 
-configuration file, iaxmodem-cfg.ttyIAX.  Alter the configuration lines 
-as needed and desired. 
- 
-The "device" entry is the full name of the device that you will be using 
-in your modem application.  If running multiple instances of iaxmodem then 
-you will need a different device for each instance. 
- 
-The "owner" entry (formatted "user:group") is the system user and group 
-that IAXmodem should use for the created device. 
- 
-The "mode" entry is the permissions mode for the created device. 
- 
-The "port" entry refers to the preferred port number on which to listen 
-for communications from the Asterisk server (so if you're using more than 
-one IAXmodem on a single IP address you will need to have each IAXmodem 
-configuration use a different port).  You should not use "4569" if Asterisk 
-is already listening on port 4569. 
- 
-The "refresh" entry indicates the preference on how frequently to refresh 
-the registration with the Asterisk server.  (However, the actual refresh 
-value that is used will be negotiated between IAXmodem and the Asterisk 
-server.)  By setting this to a value of "0" (zero), IAXmodem will not 
-register with the server, and thus the server should be configured to 
-communicate with IAXmodem on a static address. 
- 
-The "server", "peername", and "secret" entries refer to the server name 
-(or address), the registered peer name for the IAXmodem client, and the 
-registered secret (password) for the IAXmodem client. 
- 
-The entries "cidname" and "cidnumber" refer to the Caller*ID presentation 
-that will be made by IAXmodem to the Asterisk server. 
- 
-The "codec" entry refers to the preferred audio codec. This can be  
-"slinear", "ulaw", or "alaw". 
- 
-The "record" entry causes audio files to be recorded (see below). 
- 
-The "replay" entry causes the audio files to be replayed back (see below). 
- 
-The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer 
-(see below). 
- 
-The "iax2debug" entry enables debugging output for IAX2. 
- 
-The "dspdebug" entry enables debugging output for the DSPs. 
- 
-The "nodaemon" entry exempts the modem from inclusion with daemon use. 
- 
-Comments can be placed into the IAXmodem configuration files by beginning 
-them with a semicolon (";"). 
- 
-Now copy this file to the /etc/iaxmodem directory with a unique file name.   
-The name of the file will serve as the identifier, if you choose to launch  
-iaxmodem in non-daemon mode (see below). 
- 
- 
- ** RUNNING IAXMODEM ** 
- 
-Now you are ready to start IAXmodem.  IAXmodem can be run in two manners, 
-daemon mode, or non-daemon.  Initially you should probably run iaxmodem 
-at least once in non-daemon mode, just to make sure things are working  
-(that iaxmodem registers). 
- 
-                      ---------- 
- 
-In non-daemon mode, IAXmodem is started by supplying the configuration  
-identifier as the only command-line parameter, like this: 
- 
-  /path/to/iaxmodem ttyIAX 
- 
-In this example the modem configuration file is expected to be: 
- 
-  /etc/iaxmodem/ttyIAX 
- 
-You should probably run IAXmodem like this at least once to check 
-to see that registration occurs properly (then press ^C to exit). 
- 
-In non-daemon mode IAXmodem does not detach itself from the controlling  
-tty, and it does send logging data both to standard output (informational  
-items) and to standard error (errors).  As this logging can be a bit  
-verbose, you may choose to ignore all of it by starting IAXmodem like  
-this: 
- 
-  /path/to/iaxmodem ttyIAX >/dev/null 2>&1 
- 
-Alternatively, if you wish to record this into rotated log files: 
- 
-  /path/to/iaxmodem ttyIAX >/tmp/iaxmodem.stdout 2>/tmp/iaxmodem.stderr 
- 
-You may also choose to run IAXmodem from init by placing an entry into 
-the /etc/inittab file like this (and then restarting init): 
- 
-  IAX:2345:respawn:/path/to/iaxmodem ttyIAX 
- 
-                      ---------- 
- 
-In daemon mode, IAXmodem is started by not supplying a configuration  
-identifier on the command-line, like this: 
- 
-  /path/to/iaxmodem 
- 
-This will cause iaxmodem to detach itself from the controlling tty and 
-launch a separate iaxmodem instance for every modem configuration file 
-found in /etc/iaxmodem. 
- 
-In daemon mode IAXmodem sends logging data to files in the  
-/var/log/iaxmodem directory, if available.  (The /var/log/iaxmodem  
-directory will need to be created.) 
- 
-You may wish to run iaxmodem in daemon mode and start it with a standard 
-init.d script.  The provided iaxmodem.init files should serve this 
-purpose.  (Choose the appropriate one for your distribution.) 
- 
-                      ---------- 
- 
-Some people want to launch iaxmodem in a manner like daemon mode, but  
-for various reasons (like runit compatibility) need the parent process 
-to not detach itself from the controlling tty.  This is done with the -F 
-option like this: 
- 
-  /path/to/iaxmodem -F 
- 
- 
- ** USING IAX MODEM ** 
- 
-Once IAXmodem is running you are ready to use it with your application. 
- 
-If your application is HylaFAX, there is a HylaFAX modem configuration 
-file included with IAXmodem (config.ttyIAX).  The config file is for 
-HylaFAX version 4.2.2 and later.  Instead of running faxaddmodem, 
-simply edit this config file to your liking and then copy it to 
-/var/spool/hylafax/etc/ (Run faxgetty and the rest of HylaFAX as 
-usual.) 
- 
-If using the "record" option, IAXmodem will create two audio files in 
-the /tmp/ directory.  These files are overwritten by each new audio 
-call.  The file "ttyIAX-dsp.raw" is the audio that was received by 
-IAXmodem from the DSP library (which IAXmodem delivered to the IAX 
-library), and the file "ttyIAX-iax.raw" is the audio that was received 
-by IAXmodem from the IAX library (which IAXmodem delivered to the DSP  
-library).  These audio files can be converted by sox into playable WAV 
-files in this way: 
- 
-  sox -s -w -r 8000 -c 1 ttyIAX-iax.raw playable.wav 
- 
-If using the "replay" option, IAXmodem will replay the audio in the 
-audio files previously recorded by "record" So the audio that is  
-passed to the DSP comes from "ttyIAX-iax.raw" instead of from the IAX 
-channel, and the audio that is passed to the IAX channel comes from 
-"ttyIAX-dsp.raw" instead of from the DSP.  This feature is indended 
-to provide a simple and reliable way to methodically repeat a call  
-session for debugging.  Use of "replay" will disable "record". 
- 
-Jitter occurs when audio is received out of sequence.  Normally this 
-involves missing audio packets, but sometimes it can involve mis- 
-ordered audio.  Jitter occurs because the UDP communication medium 
-graciously allows packets to be dropped by the network, and so on 
-collision-prone links these audio packets will be dropped when 
-deemed necessary by the network equipment.  Jitter should not occur 
-if iaxmodem is communicating directly with the PBX over a loopback 
-or directly-wired (crossover) interface. 
- 
-By default iaxmodem copes with received jitter by replacing missing 
-audio with "fill" from the previously-received audio packet and by 
-dropping mis-ordered audio packets.  The intention behind this is to 
-prevent our packet counting from falling behind the other endpoint, 
-to prevent jitter from causing carrier drops or from producing a 
-carrier when there shouldn't be one.  In some cases this fill behavior 
-may be undesireable, and instead it would better to just skip the  
-missing audio (thus letting our packet counting fall slightly behind). 
-In order to disable the jitterbuffer put "nojitterbuffer" into the 
-iaxmodem config file. 
- 
-By default iaxmodem, when starting, will examine an existing log file 
-to see if it is larger than 1GB.  If it is, then iaxmodem will rename 
-that file with ".old" at the end, deleting any existing ".old" log  
-file.  The purpose in this is to prevent iaxmodem logging from  
-consuming too much disk space.  However, the astute iaxmodem  
-administrator should probably employ a system-wide logrotate service 
-to rotate the iaxmodem logging independently. 
- 
-An appropriate logrotate.d entry for iaxmodem may look like this: 
- 
-/var/log/iaxmodem/*.log { 
-    notifempty 
-    missingok 
-    postrotate 
-        /bin/kill -HUP `cat /var/run/iaxmodem.pid` || true 
-    endscript 
-} 
- 
-Modems typically should be reset and reinitialized after each call  
-(in case something within the call put the modem into a bad state). 
-During initialization it is difficult, if not impossible, to properly 
-handle incoming calls.  For this reason IAXmodem is "busied-out" for 
-five seconds after going on-hook (ATH0 or ATZ).  If the initialization 
-sequence can last longer than that time it would be advisable, then, 
-to take the modem off-hook (ATH1) at the outset of initialization and 
-to place it back on-hook (ATH0) when done (in which case the modem 
-will be busied out during the entire initialization sequence plus 
-five seconds after it finishes).  For HylaFAX the five-second  
-automatic busy-out should be sufficient. 
- 
- 
- ** CONTRIBUTING ** 
- 
-* Bug Reports - If you use IAXmodem and encounter a problem please do 
-  report it, even if you can work around the problem and even if you 
-  do not intend to fix the problem. 
-* Patches - If you develop a patch (bug fix or enhancement) please do 
-  share it.  If you would like to develop, but don't know what to do, 
-  please look at the list of items in the TODO file. 
-* Commission Work - If you use or would like to use IAXmodem and need 
-  some work done, hire someone to do it (the author can provide 
-  suggestions) and share that work. 
-* Donations - The author is always happy to accept donations of just 
-  about any kind. 
- 
- 
- ** CONTACTS and SUPPORT ** 
- 
-Original Author:  Lee Howard <faxguy@howardsilvan.com> 
-        Website:  http://iaxmodem.sourceforge.net 
-   Mailing List:  iaxmodem-users@lists.sourceforge.net 
-</file> 
- 
-Wir werden also nun unser Software-Modem aus den Quellen übersetzen und installieren. Als erstes wechseln wir in das neu erstellte Programmverzeichnis: 
-   # cd /usr/local/src/iaxmodem 
- 
-Als nächstes starten wir das erstellen des Konfigurationslaufes. 
-   # ./configure 
- 
-Anschließen lassen wir uns das benötigte Programm und die dazu passenden (statischen) Bibliotheken übersetzen. 
-   # make 
- 
-Zu guter letzt kopieren wir noch das erzeugte Programm **iaxmodem** nach //**/usr/local/sbin/**//. 
-   # cp /usr/local/src/iaxmodem/iaxmodem /usr/local/sbin/ 
- 
-=== Konfiguration - IAX-Modem === 
-Für die Konfiguration unseres bzw. unserer IAXmodem legen wir uns nun ein Konfigurationsverzeichnis an. 
-   # mkdir /etc/iaxmodem 
- 
-In dieses Verzeichnis kopieren wir uns nun das in dem Quellpaket enthaltene Konfigurationsdatei. 
-   # cp -a /usr/local/src/iaxmodem/iaxmodem-cfg.ttyIAX /etc/iaxmodem/ttyIAX0 
- 
-Diese Konfigurationsdatei passen wir nun unserer Umgebung entsprechend an. 
-   # vim /etc/iaxmodem/ttyIAX0 
-<file bash /etc/iaxmodem/ttyIAX0.conf>device /dev/ttyIAX 
-owner uucp:uucp 
-mode 660 
-port 4570 
-refresh 300 
-server 127.0.0.1 
-peername iaxmodem 
-secret password 
-cidname John Doe 
-cidnumber 8005551212 
-codec slinear</file> 
- 
-Die Parameter haben dabei folgende Bedeutung: 
-  * **device** Devicename unter dem wir später auf den virtuellen Modem zugreifen. Haben wir mehr als einen iaxmodem im Einsatz, erzeugen wir einfach fortlaufend nummerierte Gerätedateien. **../ttyIAX0**, **../ttyIAX1**, u.s.w. 
-  * **owner** Eigentümer und Gruppe der Gerätedatei der später auf das device zugreifen darf. 
-  * **mode** Dateirechte, der Gerätedatei. 
-  * **port** Port über den später die Verbindung zum Asterisk-Server eine Verbindung aufgebaut und gehalten wird. Es muss sichergestellt sein, dass jedem virtuellen Modem ein separater eigener Port zugwiwsen wurde. 
-  * **refresh** Zeitdauer (in Sekunden), wann eine Erneuerung der Registrierung am Asterisk-Server. 
-  * **server** IP-Adresse des Asterisk-Servers. In der Regel wird man hier **127.0.0.1** verwenden können, es sei denn, man hat in der **iax.conf** den Asterisk-Server nicht auf allen Adressen, sondern auf eine spezielle IP-Adresse gebunden.  
-  * **peername** Name, mit dem sich das IAXmodem am Asterisk-Server anmeldet. 
-  * **secret** Passwort für die Anmeldung am Asterisk-Server. 
-  * **cidname**  CID-Name mit dem sich der IAXmodem beim Asterisk-Server verweist. 
-  * **cidnumber** CID-Nummer mit dem sich der IAXmodem beim Asterisk-Server verweist. 
-  * **codec** Definition des Codec, welcher von dem IAXmodem verwendet werden soll. Eine Angabe von Codecs mit Datenkompression macht hier wenig Sinn, da sich die Kompremmierung der daten äußerst negativ auf die Übertragung der Faksimile auswirken wird. Somit wählt man am besten  Erlaubt sind hier alaw, ulaw und slinear. Andere machen hier auch wenig Sinn, da diese //slinear//, //alaw// oder //ulaw// aus.  
- 
-<WRAP round important>__**WICHTIG:**__\\ Beim Passwort auf gar keinen Fall das Zeichen **@** verwenden, da der IAXmodem das Passwort dann als eMailadresse versucht zu interprätieren (was i.d.R. natürlich kläglich scheitern wird) und somit den definierten Asterisk-Knoten nicht mehr erreichen könnte!</WRAP> 
- 
-Somit ergibt sich für den ersten Test folgende Konfigurationsdatei: 
-<file bash /etc/iaxmodem/ttyIAX0>device          /dev/ttyIAX0 
-owner           uucp:uucp 
-mode            660 
-port            4570 
-refresh         300 
-server          10.10.10.10 
-peername        ttyIAX0 
-secret          P1r4t3n43v3R! 
-cidname nausch.org 
-cidnumber +49 8121 8831-79 
-codec           slinear 
-</file> 
- 
-=== Konfiguration - Asterisk (iax.conf) === 
-Damit sich nun unser IAXmodem beim Asterisk-Server auch anmelden kann, müssen wir den entsprechenden Eintrag in der **IAX-Konfigurationsdatei** //**/etc/asterisk/iax.conf**// auch eintragen. 
- 
-Wir bearbeiten also mit dem Editor unseres Vertrauens die IAX-Konfigurationsdatei. 
-   # vim /etc/asterisk/iax.conf 
-<code bash >[general] 
- 
-...  
- 
-calltokenoptional=127.0.0.1/255.255.255.255 
- 
-... 
- 
-[ttyIAX0] 
-context=from-iaxmodems 
-type=friend 
-secret=P1r4t3nP4rTe1 
-port=4570 
-host=dynamic 
-defaultip=127.0.0.1 
-deny=0.0.0.0/0.0.0.0 
-permit=127.0.0.1/255.255.255.255 
-disallow=all 
-allow=ulaw 
-allow=alaw 
-jitterbuffer=no 
-requirecalltoken=no 
- 
-... 
-</code> 
- 
-<WRAP round important>__**WICHTIG**__:\\ Da IAXmodem, oder besser gesagt, die verwendete libiax keine CallToken-Unterstützung hat, wird der verwendete Endpunkt **localhost** entsprechend im Kontext **[general]** ausgenommen. <code>calltokenoptional=127.0.0.1/255.255.255.255</code> Ferner wird beim zugehörigen IAX-Endpunkt die Calltokenunterstützung auf **no** gesetzt.<code>requirecalltoken=no</code></WRAP> 
- 
-Da ein **reload** des IAX2-Definitionen die IP-Adresse und Port-Definitionen nicht neu einliest, starten wir den Asterisk-Server 1x durch. 
-   # service asterisk condrestart 
- 
-   Stopping safe_asterisk:                                    [  OK  ] 
-   Shutting down asterisk:                                    [  OK  ] 
-   Starting asterisk:                                          OK  ] 
- 
- 
-=== erster Programmstart === 
-Nun ist es an der Zeit unsere zuvor angelegte Konfiguration unseres ersten IAXmodem zu testen. Wir starten hierzu das Programm **iaxmodem** und geben an, welche Konfigurationsdatei im Verzeichnis //**/etc/ttyIAX0**// verwendet werden soll. 
-   # iaxmodem /etc/ttyIAX0.conf 
- 
-<code>[2012-12-11 14:18:50] Modem started 
-[2012-12-11 14:18:50] Setting device = '/dev/ttyIAX0' 
-[2012-12-11 14:18:50] Setting owner = 'uucp:uucp' 
-[2012-12-11 14:18:50] Setting mode = '660' 
-[2012-12-11 14:18:50] Setting port = 4570 
-[2012-12-11 14:18:50] Setting refresh = 50 
-[2012-12-11 14:18:50] Setting server = '127.0.0.1' 
-[2012-12-11 14:18:50] Setting peername = 'ttyIAX0' 
-[2012-12-11 14:18:50] Setting secret = 'P1r4t3n43v3R!' 
-[2012-12-11 14:18:50] Setting cidname = 'nausch.org' 
-[2012-12-11 14:18:50] Setting cidnumber = '+49 8121 8831-79' 
-[2012-12-11 14:18:50] Setting codec = slinear 
-[2012-12-11 14:18:50] Opened pty, slave device: /dev/pts/0 
-[2012-12-11 14:18:50] Created /dev/ttyIAX0 symbolic link 
-[2012-12-11 14:18:50] Registration completed successfully. 
-</code> 
- 
-Die erfolgreiche Registrierung unseres IAXmodem sehen wir auch auf der zuvor geöffneten Komandozeile von Asterisk. 
-<code>    -- Registered IAX2 'iaxmodem0' (AUTHENTICATED) at 10.10.0.2:4570</code> 
- 
-Rufen wir die definierten IAX2-Peers mit **iax2 show peers** ab, sehen wir auch unseren definierten IAXmodem. 
-  pml010010*CLI> iax2 show peers 
- 
-   Name/Username    Host              Mask             Port          Status     
-   ttyIAX0          127.0.0.1    (D)  255.255.255.255  4570          Unmonitored 
- 
-Bei Bedarf können wir auch noch testen, ob die Gerätetreiberdatei angelegt wurde und ob die Berechtigung so gesetzt wurden, wie wir diese definiert haben. 
-   # ll /dev/ttyIAX1  
- 
-   lrwxrwxrwx 1 root root 10 Dec  9 17:21 /dev/ttyIAX0 -> /dev/pts/1 
- 
- 
-   #  ll /dev/pts/1 
- 
-   crw-rw---- 1 uucp uucp 136, 1 Dec  9 17:21 /dev/pts/1 
- 
- 
-Nun können wir das laufende Programm **iaxmodem** wieder stoppen, indem wir den laufenden Prozess einfach killen, oder den gerade laufenden Task mit ''Strg C'' beenden. 
- 
- 
-=== automatischer Programmstart === 
- 
-Der automatische Start des **iaxmodem-Daemon** gestaltet sich unter **CentOS 6.x** etwas anders, als dies noch unter [[voip:fax:hylafax?&#automatischer_faxempfang|CentOS 5.x]] der Fall war. Der einmalige Start würde zwar, über einen Eintrag in der //**/etc/inittab**//, funktionieren, wie auch noch der **Neustart (respawn)** des Daemon. Das Anhalten und Wiederstarten des Daemon mit Hilfe des Aufrufs ''init q'' würde aber nicht mehr gehen! 
- 
-Unter CentOS 6.x erfolgt die Konfiguration nicht mehr in der Datei //**/etc/inittab**//. 
-   # cat /etc/inittab 
-<file bash /etc/inittab># inittab is only used by upstart for the default runlevel. 
-# 
-# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. 
-# 
-# System initialization is started by /etc/init/rcS.conf 
-# 
-# Individual runlevels are started by /etc/init/rc.conf 
-# 
-# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf 
-# 
-# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf, 
-# with configuration in /etc/sysconfig/init. 
-# 
-# For information on how to write upstart event handlers, or how 
-# upstart works, see init(5), init(8), and initctl(8). 
-# 
-# Default runlevel. The runlevels used are: 
-#   0 - halt (Do NOT set initdefault to this) 
-#   1 - Single user mode 
-#   2 - Multiuser, without NFS (The same as 3, if you do not have networking) 
-#   3 - Full multiuser mode 
-#   4 - unused 
-#   5 - X11 
-#   6 - reboot (Do NOT set initdefault to this) 
- 
-id:5:initdefault: 
-</file> 
- 
-Wir beschreiten hierzu nun den Standardweg, wie es bei CentOS 6.x nun der Fall ist. 
-  - **Startscript anlegen** Zunächst legen wir zum Starten unseres IAXmodem im Verzeichnis //**/etc/init**// ein passendes Script an.<code> # vim /etc/init/start-ttyIAX0.conf</code><file bash start-ttyIAX0.conf># Django : 2012-12-20 ttyIAX - getty zum automatischen Starten und Wiederbeleben der  
-# softwareemulierten IAXmodems 
-# 
- 
-start on runlevel [2345] 
-stop on runlevel [S016] 
-respawn 
- 
-exec /usr/local/sbin/iaxmodem ttyIAX0 
-</file> 
-  - **Optionales Logging** Zu Protokollierungszwecken oder zum Debuggen im Rahmen einer Fehlersuche kann es hilfreich sein, das Logging von IAXmodem zu aktivieren. Hierzu nutzen wird einfach den folgenden Programmaufruf in unserem Startscript:<code>exec /usr/local/sbin/iaxmodem ttyIAX0 >/var/log/iaxmodem/ttyIAX0.log 2>/var/log/iaxmodem/ttyIAX0-error.log</code> Hierzu ist natürlich das entsprechende Zielverzeichnis <code>mkdir -p /var/log/iaxmodem</code>und auch die beiden Logdateien anzulegen.<code> # touch /var/log/iaxmodem/ttyIAX0.log</code><code> # touch /var/log/iaxmodem/ttyIAX0-error.log</code> 
- 
-Nun können wir unser neu definiertes Softwaremodem **IAXmodem** starten. 
-   # initctl start start-ttyIAX0 
- 
-   start-ttyIAX0 start/running, process 24557 
- 
-Auf der (geöffneten) Asterisk Konsole sehen wir nun, dass sich unser IAXmodem am Asterisk-Server angemeldet hat. 
-   # asterisk -r 
-<code>Asterisk 1.8.18.0, Copyright (C) 1999 - 2012 Digium, Inc. and others. 
-Created by Mark Spencer <markster@digium.com> 
-Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. 
-This is free software, with components licensed under the GNU General Public 
-License version 2 and other licenses; you are welcome to redistribute it under 
-certain conditions. Type 'core show license' for details. 
-========================================================================= 
-Connected to Asterisk 1.8.18.0 currently running on pml010010 (pid = 12037) 
-Verbosity is at least 3 
-pml010010*CLI> 
-</code> 
-<code>    -- Registered IAX2 'ttyIAX0' (AUTHENTICATED) at 127.0.0.1:4570</code> 
- 
-Fragen wir nun die Prozessliste ab, finden wir dazu auch das entsprechende Programm: 
-   # ps aux | grep iax 
- 
-   uucp     24557  0.0  0.0  18004  1224 pts/3    Ss+  13:37   0:00 /usr/local/sbin/iaxmodem ttyIAX0 
- 
- 
-Mit Hilfe des Befehls **probemodem** kann nun auch getestet werden, welche Funktionen und Standards unser IAXmodem unterstützt. 
-   # probemodem 
-<code>Serial port that modem is connected to []? ttyIAX0 
- 
-Now we are going to probe the tty port.  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 
- OK. 
- 
-This looks like a Class 1 and 1.0 modem. 
- 
-ATI0 RESULT = "OK"         RESPONSE = "spandsp" 
-ATI1 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI2 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI3 RESULT = "OK"         RESPONSE = "www.soft-switch.org" 
-ATI4 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI5 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI6 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI7 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI8 RESULT = "ERROR" RESPONSE = "ERROR" 
-ATI9 RESULT = "ERROR" RESPONSE = "ERROR" 
- 
-Class 1 stuff... 
- 
-AT+FCLASS=? RESULT = "OK" RESPONSE = "0,1,1.0" 
-AT+FCLASS? RESULT = "OK" RESPONSE = "1" 
-AT+FCLASS=0 RESULT = "OK" RESPONSE = "OK" 
-AT+FCLASS=1 RESULT = "OK" RESPONSE = "OK" 
-AT+FCLASS? RESULT = "OK" RESPONSE = "1" 
-AT+FJUNK=? RESULT = "OK" RESPONSE = "OK" 
-AT+FJUNK? RESULT = "OK" RESPONSE = "OK" 
-AT+FAA=? RESULT = "OK" RESPONSE = "OK" 
-AT+FAA?         RESULT = "OK" RESPONSE = "OK" 
-AT+FAE=? RESULT = "OK" RESPONSE = "OK" 
-AT+FAE?         RESULT = "OK" RESPONSE = "OK" 
-AT+FTH=? RESULT = "OK" RESPONSE = "3" 
-AT+FRH=? RESULT = "OK" RESPONSE = "3" 
-AT+FTM=? RESULT = "OK" RESPONSE = "24,48,72,73,74,96,97,98,121,122,145,146" 
-AT+FRM=? RESULT = "OK" RESPONSE = "24,48,72,73,74,96,97,98,121,122,145,146" 
-AT+FTS=? RESULT = "OK" RESPONSE = "0-255" 
-AT+FRS=? RESULT = "OK" RESPONSE = "0-255" 
- 
-Class 1.0 stuff... 
- 
-AT+FCLASS=? RESULT = "OK" RESPONSE = "0,1,1.0" 
-AT+FCLASS? RESULT = "OK" RESPONSE = "1.0" 
-AT+FCLASS=0 RESULT = "OK" RESPONSE = "OK" 
-AT+FCLASS=1.0 RESULT = "OK" RESPONSE = "OK" 
-AT+FCLASS? RESULT = "OK" RESPONSE = "1.0" 
-AT+FJUNK=? RESULT = "OK" RESPONSE = "OK" 
-AT+FJUNK? RESULT = "OK" RESPONSE = "OK" 
-AT+FAA=? RESULT = "OK" RESPONSE = "OK" 
-AT+FAA?         RESULT = "OK" RESPONSE = "OK" 
-AT+FAE=? RESULT = "OK" RESPONSE = "OK" 
-AT+FAE?         RESULT = "OK" RESPONSE = "OK" 
-AT+FTH=? RESULT = "OK" RESPONSE = "3" 
-AT+FRH=? RESULT = "OK" RESPONSE = "3" 
-AT+FTM=? RESULT = "OK" RESPONSE = "24,48,72,73,74,96,97,98,121,122,145,146" 
-AT+FRM=? RESULT = "OK" RESPONSE = "24,48,72,73,74,96,97,98,121,122,145,146" 
-AT+FTS=? RESULT = "OK" RESPONSE = "0-255" 
-AT+FRS=? RESULT = "OK" RESPONSE = "0-255" 
-AT+FAR=? RESULT = "OK" RESPONSE = "0,1" 
-AT+FCL=? RESULT = "OK" RESPONSE = "(0-255)" 
-AT+FIT=? RESULT = "OK" RESPONSE = "+FIT:(0-255),(0-1)" 
-AT+F34=? RESULT = "OK" RESPONSE = "OK" 
-</code> 
- 
-==== Konfiguration Asterisk ==== 
-=== Modem an SIP/analog TA === 
-Verwendet man einen **TA**((**T**erminal**A**dapter)) zum Anschluß des Modem, gestaltet sich die Einbindung sehr einfach, ist dies ja nur ein weiterer SIP-Teilnehmer in unserer Asterisk-TK-Anlage. 
- 
-Eine mögliche Konfiguration in der **extension.conf** könnte wie folgt aussehen. 
-   # vim /etc/asterisk/extension.conf 
-<file bash /etc/asterisk/extension.conf>... 
- 
-; ankommende ISDN-Anrufe auf die Rufnummer 883418210 auf den beiden internen Nst. 210 und 211 
-exten => 883418210,1,NoOp(Anrufer übertrug die Rufnummer ${CALLERID(num)}, Nst. 210 (Fax-a/b) und Nst. 211 (Fax-Server) werden gerufen.) 
-exten => 883418210,n,Dial(SIP/210&SIP/211,30) 
-exten => 883418210,n,Hangup 
- 
-... 
-</file> 
- 
-=== IAXmodem und Asterisk === 
- 
-Die Definition des oder der IAXmodem haben wir ja bereits die entsprechenden Definitionen in der Datei **iax.conf** im Kapitel [[centos:hylafax_c6#konfiguration_-_asterisk_(iax.conf)|Konfiguration - Asterisk  (iax.conf)]] vorgenommen. 
- 
-<file bash iax.conf>...  
-  
-[ttyIAX0] 
-context=from-iaxmodems 
-type=friend 
-secret=P1r4t3nP4rTe1 
-port=4570 
-host=dynamic 
-defaultip=127.0.0.1 
-deny=0.0.0.0/0.0.0.0 
-permit=127.0.0.1/255.255.255.255 
-disallow=all 
-allow=ulaw 
-allow=alaw 
-jitterbuffer=no 
-requirecalltoken=no 
- 
-... 
-</file> 
-<WRAP round tip>Jeder Modem kann immer nur jeweils eine Sendung Empfangen, bzw. versenden. Wollen wir gleichzeigtig mehrere Sendungen bearbeiten, müssen wir für die simultane Bearbeitung der Faksimile entsprechend mehrere IAX-Modem (mit unterschiedlichen Ports) und die passenden zugehörigen Definitionen in der **iax.conf** vornehmen.</WRAP> 
- 
-   # vim /etc/asterisk/extensions.conf 
-<file bash /etc/asterisk/extensions.conf>... 
- 
-[fax-in] 
-; ankommende ISDN-Anrufe auf die Nst. 210 zu den IAXmodem durchrouten. 
-exten => 883418210,1,Verbose(1,### Anruf von "from-pstn" ISDN ${EXTEN} an IAXmodem(s) ###) 
-exten => 883418210,n,Dial(IAX2/iaxmodem0/${EXTEN},15,r) 
-exten => 883418210,n,Dial(IAX2/iaxmodem1/${EXTEN},15,r) 
-exten => 883418210,n,Dial(IAX2/iaxmodem2/${EXTEN},15,r) 
-exten => 883418210,n,Dial(IAX2/iaxmodem3/${EXTEN},15,r) 
-exten => 883418210,n,Congestion() 
-exten => 883418210,n,Hangup() 
- 
- 
-[from-iaxmodems] 
-;Anwahl des internen analogen Faxanschlusses 
-exten => 19,1,NoOp(Anwahl des internen analogen Faxanschlusses vom IAXmodem-Pool) 
-exten => 19,n,Dial(DAHDI/G3,60) 
-exten => 19,n,Hangup() 
- 
-; Ruf vom IAXMODEM-Pool 
-exten => _XXX.,1,Verbose(### Anruf vom IAXmodem-Pool an die Rufnummer ${EXTEN} via PSTN ###) 
-exten => _XXX.,n,Set(CALLERID(num)=883418210) 
-exten => _XXX.,n,Set(CHANNEL(transfercapability)=3K1AUDIO) 
-exten => _XXX.,n,Dial(DAHDI/G1/${EXTEN}) 
-exten => _XXX.,n,Hangup() 
- 
-... 
- 
-... 
- 
-[default] 
-include => fax-in 
- 
-... 
-</file> 
- 
-==== Grundkonfiguration HylaFAX ==== 
-=== faxsetup === 
-Die Konfiguration unseres Faxservers wird am einfachsten mit Hilfe des Scriptes **faxsetup** durchgeführt. 
-   # faxsetup 
- 
-<code>Setup program for HylaFAX (tm) 5.2.5. 
- 
-Created for x86_64-unknown-linux-gnu on Thu Nov 11 00:26:04 EST 2010. 
- 
-Found encoder: /usr/bin/base64 
-Found encoder: /usr/bin/uuencode 
-Looks like /usr/bin/base64 supports base64 encoding. 
-Checking system for proper client configuration. 
-Checking system for proper server configuration. 
- 
-... 
- 
-... 
- 
- 
-There does not appear to be an entry for the FaxMaster either in 
-the YP/NIS database or in the /etc/aliases file.  The 
-FaxMaster is the primary point of contact for HylaFAX problems. 
-The HylaFAX client-server protocol server identifies this alias as 
-the place to register complaints and HylaFAX directs automatic mail 
-messages to this user when problems are identified on a server 
-machine or when the routine server maintainence scripts are run 
-(e.g. faxcron). 
- 
-Should an entry be added for the FaxMaster to /etc/aliases [yes]? 
-</code> 
-Eingabe: **yes** 
-  Users to receive fax-related mail [root]? 
-Eingabe: **CR**((Datenfreigabe, RETURN)) 
-<code>Rebuilt /etc/aliases database. 
-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]? 
-</code> 
-Eingabe: **yes** 
-<code>Modem support functions written to /var/spool/hylafax/etc/setup.modem. 
-Configuration parameters written to /var/spool/hylafax/etc/setup.cache. 
- 
-No scheduler config file exists, creating one from scratch. 
-Country code [1]? 
-</code> 
-Eingabe: **49** 
-  Area code [000]? 
-Eingabe: **89** 
-  Long distance dialing prefix [1]? 
-Eingabe: **0** 
-  International dialing prefix [011]? 
-Eingabe: **00** 
-  Dial string rules file (relative to /var/spool/hylafax) ["etc/dialrules"]? 
-Eingabe: **CR** 
-  Tracing during normal server operation [1]? 
-Eingabe: **527** 
-  Default tracing during send and receive sessions [0xFFF]? 
-Eingabe: **527** 
-  Continuation cover page (relative to /var/spool/hylafax) []? 
-Eingabe: **CR** 
-  Timeout when converting PostScript documents (secs) [180]? 
-Eingabe: **CR** 
-  Maximum number of concurrent jobs to a destination [1]? 
-Eingabe: **CR** 
-  Define a group of modems []? 
-Eingabe: **CR** 
-  Time of day restrictions for outbound jobs ["Any"]? 
-Eingabe: **CR** 
-  Timeout before purging a stale UUCP lock file (secs) [30]? 
-Eingabe: **CR** 
-  Max number of pages to permit in an outbound job [0xffffffff]? 
-Eingabe: **50** 
-  Syslog facility name for ServerTracing messages [daemon]? 
-Eingabe: **CR** 
-<code>The non-default scheduler parameters are: 
- 
-CountryCode:         49 
-AreaCode:            89 
-LongDistancePrefix:  0 
-InternationalPrefix: 00 
-ServerTracing:       527 
-MaxSendPages:        50 
-SessionTracing:      527 
- 
-Are these ok [yes]? 
-</code> 
-Eingabe: **yes** 
-<code>Creating new configuration file /var/spool/hylafax/etc/config... 
- 
-Restarting HylaFAX server processes. 
-Should I restart the HylaFAX server processes [yes]? 
-</code> 
-Eingabe: **yes** 
-<code>/etc/rc.d/init.d/hylafax start 
-Starting HylaFAX queue manager (faxq):                      OK  ] 
-Starting HylaFAX server (hfaxd):                            OK  ] 
- 
-You do not appear to have any modems configured for use.  Modems are 
-configured for use with HylaFAX with the faxaddmodem(8C) command. 
-Do you want to run faxaddmodem to configure a modem [yes]? 
-</code> 
-Eingabe: **no** 
-<code>You do not appear to be using faxgetty to notify the HylaFAX scheduler 
-about new modems and/or their status.  This means that you must use the 
-faxmodem program to inform the new faxq process about the modems you 
-want to have scheduled by HylaFAX.  Beware that if you have modems that 
-require non-default capabilities specified to faxmodem then you should 
-read faxmodem(8C) manual page and do this work yourself (since this 
-script is not intelligent enough to automatically figure out the modem 
-capabilities and supply the appropriate arguments). 
- 
-Should I run faxmodem for each configured modem [yes]? 
-</code> 
-Eingabe: **no** <WRAP round tip>Verwenden wir für die Anbindung unseres Faxservers **__nicht__** IAXmoden, sondern einen herkömmlichen analogen Modem, so müssen wir die Frage: <code>Do you want to run faxaddmodem to configure a modem [yes]?</code> entsprechend mit **yes** beantworten.</WRAP> 
-  Done verifying system setup. 
- 
-== faxaddmodem == 
-Haben wir die Frage <code>Do you want to run faxaddmodem to configure a modem [yes]?</code> mit **yes** bestätigt, geht es nun weiter mit der Konfiguration des Analogen Modems. 
-  Serial port that modem is connected to []?  
-Eingabe: **modem** 
-<code>Ok, time to setup a configuration file for the modem.  The manual 
-page config(5F) 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. 
- 
-Country code [49]? 
-</code> 
-Eingabe: **CR** 
-  Area code [89]?  
-Eingabe: **CR** 
-  Phone number of fax modem [+1.999.555.1212]?  
-Eingabe: **+49 89 88031079** 
-  Local identification string (for TSI/CIG) ["NothingSetup"]? 
-Eingabe: **www.nausch.org** 
-  Long distance dialing prefix [1]? 
-Eingabe: **0** 
-  International dialing prefix [011]? 
-Eingabe: **0** 
-  Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?  
-Eingabe: **CR** 
-  Tracing during normal server operation [1]?  
-Eingabe: **527** 
-  Tracing during send and receive sessions [0xFFF]?  
-Eingabe: **527** 
-  Protection mode for received facsimile [0600]?  
-Eingabe: **0644** 
-  Protection mode for session logs [0600]? 0600 
-Eingabe: **0600** 
-  Protection mode for modem [0600]? 0644 
-Eingabe: **0644** 
-  Rings to wait before answering [1]?  
-Eingabe: **CR** 
-  Modem speaker volume [off]?  
-Eingabe: **CR** 
-  Command line arguments to getty program ["-h %l dx_%s"]?  
-Eingabe: **"-r -b -s %s %l"** 
-  Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?  
-Eingabe: **CR** 
-  Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?  
-Eingabe: **CR** 
-  Tag line format string ["From %%l|%c|Page %%P of %%T"]?  
-Eingabe: **CR** 
-  Time before purging a stale UUCP lock file (secs) [30]?  
-Eingabe: **CR** 
-  Hold UUCP lockfile during inbound data calls [Yes]?  
-Eingabe: **CR** 
-  Hold UUCP lockfile during inbound voice calls [Yes]?  
-Eingabe: **CR** 
-  Percent good lines to accept during copy quality checking [95]?  
-Eingabe: **CR** 
-  Max consecutive bad lines to accept during copy quality checking [5]?  
-Eingabe: **CR** 
-  Max number of pages to accept in a received facsimile [25]? 50 
-Eingabe: **50** 
-  Syslog facility name for ServerTracing messages [daemon]?  
-Eingabe: **CR** 
-  Set UID to 0 to manipulate CLOCAL [""]?  
-Eingabe: **CR** 
-  Use available priority job scheduling mechanism [""]?  
-Eingabe: **CR** 
-<code> 
-The non-default server configuration parameters are: 
- 
-CountryCode:            49 
-AreaCode:               8121 
-FAXNumber:              +49 8121 883179 
-LongDistancePrefix:     0 
-InternationalPrefix:    00 
-DialStringRules:        etc/dialrules 
-ServerTracing:          527 
-SessionTracing:         527 
-RecvFileMode:           0644 
-DeviceMode:             0644 
-RingsBeforeAnswer:      1 
-SpeakerVolume:          off 
-GettyArgs:              "-r -b -s %s %l" 
-LocalIdentifier:        www.nausch.org 
-TagLineFont:            etc/lutRS18.pcf 
-TagLineFormat:          "From %%l|%c|Page %%P of %%T" 
-MaxRecvPages:           50 
- 
-Are these ok [yes]? 
-</code> 
-Eingabe: **yes**  
- 
-Und weiter geht es mit der Konfiguration des Modems:  
- 
-<code>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 OK. 
- 
-About fax classes: 
- 
-The difference between fax classes has to do with how HylaFAX interacts 
-with the modem and the fax protocol features that are used when sending 
-or receiving faxes.  One class isn't inherently better than another; 
-however, one probably will suit a user's needs better than others. 
-     
-Class 1 relies on HylaFAX to perform the bulk of the fax protocol. 
-Class 2 relies on the modem to perform the bulk of the fax protocol. 
-Class 2.0 is similar to Class 2 but may include more features. 
-Class 1.0 is similar to Class 1 but may add V.34-fax capability. 
-Class 2.1 is similar to Class 2.0 but adds V.34-fax capability. 
-       
-HylaFAX generally will have more features when using Class 1/1.0 than 
-when using most modems' Class 2 or Class 2.0 implementations.  Generally 
-any problems encountered in Class 1/1.0 can be resolved by modifications 
-to HylaFAX, but usually any problems encountered in Class 2/2.0/2.1 will 
-require the modem manufacturer to resolve it. 
- 
-Use Class 1 unless you have a good reason not to. 
- 
-This modem looks to have support for Class 1 and 2. 
-How should it be configured [1]?  
-</code> 
-Eingabe: **1** 
-<code>Hmm, this looks like a Class 1 modem. 
-Product code (ATI0) is "OK". 
-Other information (ATI3) is "Version 1.11 / 21.03.2000". 
-DTE-DCE flow control scheme [default]? RTSCTS 
-Modem manufacturer is "Unknown". 
-Modem model is "Unknown". 
- 
-Using prototype configuration file class1... 
- 
-There is no prototype configuration file for your modem, so we will 
-have to fill in the appropriate parameters by hand.  You will need the 
-manual for how to program your modem to do this task.  In case you are 
-uncertain of the meaning of a configuration parameter you should 
-consult the config(5F) manual page for an explanation. 
- 
-Note that modem commands must be specified exactly as they are to be 
-sent to the modem.  Note also that quote marks (") will not be displayed 
-and will automatically be deleted.  You can use this facility to supply 
-null parameters as "". 
- 
-Finally, beware that the set of parameters is long.  If you prefer to 
-use your favorite editor instead of this script you should fill things 
-in here as best you can and then edit the configuration file 
- 
-"/var/spool/hylafax/etc/config.modem" 
- 
-after completing this procedure. 
- 
-Command to enter Class 1 [AT+FCLASS=1]?  
-Command to stop and wait prior to sending PPM [AT+FTS=7]?  
-Command to stop and wait prior to sending TCF [AT+FTS=7]?  
-Command to stop and wait prior to sending EOP [AT+FTS=9]?  
-Extra bytes in a received HDLC frame [4]?  
-Maximum time to wait for OK after aborting a receive (ms) [200]?  
-Maximum wait for initial identification frame (ms) [40000]?  
-Command to ensure silence after receiving HDLC and before sending [AT+FRS=7]?  
- 
-The modem configuration parameters are: 
- 
-Class1Cmd:              AT+FCLASS=1 
-Class1PPMWaitCmd:       AT+FTS=7 
-Class1TCFWaitCmd:       AT+FTS=7 
-Class1EOPWaitCmd:       AT+FTS=9 
-Class1FrameOverhead:    4 
-Class1RecvAbortOK:      200 
-Class1RecvIdentTimer:   40000 
-Class1SwitchingCmd:     AT+FRS=7 
-Class1TCFMaxNonZero:    10 
-Class1TCFMinRun:        1000 
- 
-Are these ok [yes]? 
-</code> 
-Eingabe: **yes** 
-<code>Creating new configuration file /var/spool/hylafax/etc/config.modem... 
-Creating fifo /var/spool/hylafax/FIFO.modem for faxgetty... done. 
-Done setting up the modem configuration. 
- 
-Checking /var/spool/hylafax/etc/config for consistency... 
-...some parameters are different. 
- 
-The non-default scheduler parameters are: 
- 
-CountryCode:            49 
-AreaCode:               89 
-LongDistancePrefix:     0 
-InternationalPrefix:    00 
-DialStringRules:        etc/dialrules 
-ServerTracing:          527 
-MaxSendPages:           50 
-SessionTracing:         527 
- 
-Are these ok [yes]? 
-</code> 
-Eingabe: **yes** 
-<code> 
- 
-Creating new configuration file /var/spool/hylafax/etc/config... 
-...saving current file as /var/spool/hylafax/etc/config.sav. 
- 
-Don't forget to run faxmodem(8C) (if you have a send-only environment) 
-or configure init to run faxgetty on modem. 
-Do you want to run faxaddmodem to configure another modem [yes]? 
-</code> 
-Eingabe: **no** 
-<code> 
- 
-You do not appear to be using faxgetty to notify the HylaFAX scheduler 
-about new modems and/or their status.  This means that you must use the 
-faxmodem program to inform the new faxq process about the modems you 
-want to have scheduled by HylaFAX.  Beware that if you have modems that 
-require non-default capabilities specified to faxmodem then you should 
-read faxmodem(8C) manual page and do this work yourself (since this 
-script is not intelligent enough to automatically figure out the modem 
-capabilities and supply the appropriate arguments). 
- 
-Should I run faxmodem for each configured modem [yes]? 
-</code> 
-Eingabe: **no** 
-  Done verifying system setup. 
- 
-Die Frage **Should I run faxmodem for each configured modem** ist mit **__no__** zu beantworten, da wir //HylaFAX+// nicht nur zum Senden, sondern auch zum Beantworten von Faksimileanrufen verwenden wollen. 
- 
-== faxaddmodem == 
-Nutzen wir zur Anbindung an unseren Asterisk-Server **IAXmodem** brauchen wir das vorgenannte Hilfsprogramm **faxaddmodem** nicht aufrufen! 
- 
-Einen entsprechenden Hinweis hierzu finden wir in der Datei //**/usr/local/src/iaxmodem/README**//. 
-<code>If your application is HylaFAX, there is a HylaFAX modem configuration 
-file included with IAXmodem (config.ttyIAX).  The config file is for 
-HylaFAX version 4.2.2 and later.  Instead of running faxaddmodem, 
-simply edit this config file to your liking and then copy it to 
-/var/spool/hylafax/etc/ (Run faxgetty and the rest of HylaFAX as 
-usual.)</code> 
- 
-Also kopieren wir die Vorgabedatei **config.ttyIAX** in das Konfigurationsverzeichnis //**/var/spool/hylafax/etc**// von HylaFAX. 
-   # cp /usr/local/src/iaxmodem/config.ttyIAX /var/spool/hylafax/etc/config.ttyIAX0 
-Anschließend bearbeiten wir diese Datei und ändern sie, unseren Bedürfnis entsprechend, ab. 
-   # vim /var/spool/hylafax/etc/config.ttyIAX0 
- 
-<file bash /var/spool/hylafax/etc/config.ttyIAX0>CountryCode: 49 
-AreaCode: 89 
-FAXNumber: "+49 89 88031079" 
-LongDistancePrefix: 0 
-InternationalPrefix: 00 
-DialStringRules: etc/dialrules.europe 
-ServerTracing: 527 
-SessionTracing: 527 
-RecvFileMode: 0644 
-LogFileMode: 0600 
-DeviceMode: 0644 
-RingsBeforeAnswer: 1 
-SpeakerVolume: off 
-#GettyArgs: "-h %l dx_%s" 
-GettyArgs:              "-r -b -s %s %l" 
-LocalIdentifier: "www.nausch.org" 
-TagLineFont: etc/lutRS18.pcf 
-TagLineFormat: "From %%l|%c|Page %%P of %%T" 
-MaxRecvPages: 200 
-# 
-# 
-# Modem-related stuff: should reflect modem command interface 
-# and hardware connection/cabling (e.g. flow control). 
-# 
-ModemType: Class1 # use this to supply a hint 
- 
-# 
-# Enabling this will use the hfaxd-protocol to set Caller*ID 
-# 
-#ModemSetOriginCmd: AT+VSID="%s","%d" 
- 
-ModemDialCmd:          ATX3DT%s 
- 
-# 
-# If "glare" during initialization becomes a problem then take 
-# the modem off-hook during initialization, and then place it 
-# back on-hook when done. 
-# 
-#ModemResetCmds: "ATH1\nAT+VCID=1" # enables CallID display 
-#ModemReadyCmds: ATH0 
- 
-Class1AdaptRecvCmd: AT+FAR=1 
-Class1TMConnectDelay: 400 # counteract quick CONNECT response 
- 
-# 
-# If you have trouble with V.17 receiving or sending, 
-# you may want to enable one of these, respectively. 
-# 
-#Class1RMQueryCmd:      "!24,48,72,96"  # enable this to disable V.17 receiving 
-#Class1TMQueryCmd:      "!24,48,72,96"  # enable this to disable V.17 sending 
- 
-# 
-# You'll likely want Caller*ID display (also displays DID) enabled. 
-# 
-ModemResetCmds: AT+VCID=1 # enables CallID display 
- 
-# 
-# The pty does not support changing parity. 
-# 
-PagerTTYParity: none 
- 
-# 
-# If you are "missing" Caller*ID data on some calls (but not all) 
-# and if you do not have adequate glare protection you may want to 
-# not answer based on RINGs, but rather enable the CallIDAnswerLength 
-# for NDID, disable AT+VCID=1 and do this: 
-# 
-#RingsBeforeAnswer: 0 
-#ModemRingResponse: AT+VRID=1 
- 
-# Uncomment DATE and TIME if you really want them, but you probably don't. 
-#CallIDPattern:          "DATE=" 
-#CallIDPattern:          "TIME=" 
-CallIDPattern:          "NMBR=" 
-CallIDPattern:          "NAME=" 
-CallIDPattern: "ANID=" 
-#CallIDPattern:          "USER=" # username provided by call 
-#CallIDPattern:          "PASS=" # password provided by call 
-#CallIDPattern:          "CDID=" # DID context in call 
-CallIDPattern:          "NDID=" 
-#CallIDAnswerLength: 4 
-</file> 
- 
-==== erweiterte Konfiguration HylaFAX ==== 
-=== cronjobs faxqclean und faxcron === 
- 
-Das Script **faxcron** (beheimatet unter ///usr/sbin/faxcron//) erstellt für den Administrator des FAX-Servers einen Report mit Angaben zur den empfangenen und gesendeten Dokumenten, wie auch ggf. aufgetretenen Problemberichten. 
- 
-Dank der RPM-Installation wurden für die beiden Aufgaben entsprechende Eintragungen bereits vorgenommen. 
- 
-Das Sript **faxqclean** (beheimatet unter ///usr/sbin/faxqclean//) wird verwendet um das spooling-Verzeichnis von HylaFAX aufzuräumen, in dem es alte nicht mehr benötigte Dateien löscht. 
- 
-Diese beiden Scripte **faxqclean** und **faxcron** sollen in regelmäßigen Abständen als cron-jobs aufgerufen werden. 
-   # ll /etc/cron.hourly/hyla* 
- 
-<code>-rwxr-xr-x 1 root root 39 20. Jun 15:08 hylafax</code> 
- 
-   # cat /etc/cron.hourly/hylafax 
-<file bash /etc/cron.hourly/hylafax>#!/bin/sh 
- 
-/usr/sbin/faxqclean 
- 
-exit 0 
-</file> 
-Das zweite script **faxcron** (ebenfalls beheimatet unter ///usr/sbin/faxcron//) erstellt für den Administrator des FAX-Servers einen Report mit Angaben zur den empfangenen und gesendeten Dokumenten, wie auch ggf. aufgetretenen Problemberichten. 
-   # ll /etc/cron.daily/hyla* 
-<code>-rwxr-xr-x 1 root root 80 20. Jun 15:08 /etc/cron.daily/hylafax</code> 
- 
-      # cat /etc/cron.daily/hylafax 
-<file bash /etc/cron.daily/hylafax>#!/bin/sh 
- 
-/usr/sbin/faxcron | mail -s "HylaFAX Usage Report" faxmaster 
- 
-exit 0</file> 
- 
-Der Report, den **faxcron** täglich erstellt, sieht exeplarisch wie folgt aus: 
- 
-<code>Facsimile transmitted since : 
- 
-Sender           Pages      Time Pg/min  Errs TypRate TypData 
-------------------------------------------------------------- 
-Total                0      0:00    0,0     0 
- 
-Facsimile transmitted since last week: 
- 
-Sender           Pages      Time Pg/min  Errs TypRate TypData 
-------------------------------------------------------------- 
-Total                0      0:00    0,0     0 
- 
-Facsimile received since : 
- 
-Sender          CIDName         CIDNumber       Pages     Time Pg/min Errs TypRate TypData 
------------------------------------------------------------------------------------------- 
-Total                                                   0:00    0,0    0 
- 
-Facsimile received since last week: 
- 
-Sender          CIDName         CIDNumber       Pages     Time Pg/min Errs TypRate TypData 
------------------------------------------------------------------------------------------- 
-Total                                                   0:00    0,0    0 
- 
-Report failed calls and associated session logs: 
- 
-Nothing to purge in info directory. 
- 
-Truncate merged session logs older than 30 days: 
- 
-Nothing to purge in receive queue. 
- 
-Nothing to purge in the tmp directory. 
-</code> 
- 
- 
-=== Ghostscript Fonts Fix === 
-Versuchen wir jetzt schon ein Faksimile zu verschicken, scheitert dies und wir bekommen folgende Fehlermeldung. 
-   # sendfax -n -d 883179 /etc/motd 
-<code>/usr/sbin/textfmt: No font metric information found for "Courier-Bold". 
-Usage: /usr/sbin/textfmt [-1] [-2] [-B] [-c] [-D] [-f fontname] [-F fontdir(s)] [-m N] [-o #] [-p #] [-r] [-U] [-Ml=#,r=#,t=#,b=#] [-V #] files... >out.ps 
-Default options: -f Courier -1 -p 11bp -o 0 
-Error converting data; command was "/usr/sbin/textfmt -B -f Courier-Bold -Ml=0.4in -p 11 -s default > '/tmp//sndfaxhrmQpG' < '/etc/motd'" 
-</code> 
-Zur Beseitigung des Fehlers **No font metric information found for "Courier-Bold"** benötigen wir noch ein zusätzliches Ghostscript-Font Paket und eine Anpassunge an den **Fontmaps**. 
-Bevor wir nun das Paket auf unseren Rechner holen, wechseln wir erst noch in das lokale Installationsverzeichnis. 
-   # cd /usr/local/src/ 
- 
-Anschließend holen wir uns das **tar.gz**-Archiv auf unseren Server. 
-   # wget http://ghostscript.googlecode.com/files/ghostscript-fonts-std-8.11.tar.gz 
- 
-Im nächsten Schritt entpacken wir das Paket. 
-   # tar zxf ghostscript-fonts-std-8.11.tar.gz 
- 
-Nun verschieben wir das entpackte Verzeichnis //**fonts**// in Ghostscript-Verzeichnis //**fonts**// 
-   # mv fonts/* /usr/share/ghostscript/fonts/ -f 
- 
-Bevor wir nun Änderungen an der Konfigurationsdatei vornehmen, kopierenn wird die Datei erst mal noch zur Sicherheit. 
-   # cp -a /usr/share/ghostscript/8.70/Resource/Init/Fontmap.GS /usr/share/ghostscript/8.70/Resource/Init/Fontmap.GS.orig 
- 
-Zum Schluss ersetzen wir noch in der Zeile **92** den Wert **/NimbusMonL-Bold** mit **(n022004l.pfa)**. 
-   # vim +92 /usr/share/ghostscript/8.70/Resource/Init/Fontmap.GS 
- 
-  /Courier-Bold                   /NimbusMonL-Bold        ; 
-  /Courier-Bold                   (n022004l.pfa)          ; 
- 
- 
-===== Faxserver starten ===== 
-==== manuellen Start ==== 
-Zum Starten und Stoppen bedienen wir uns am besten der Scripte, die beim Installationsprozess in die dafür vorgesehenen Pfade kopiert worden sind. 
- 
-Unter **CentOS 6.x** stoppen wir den Server einfach via **service hylafax stop** und der Start erfolgt dann analog via **service hylafax start**. 
- 
-Den ersten Start unseres Fax-Servers nehmen wir wie folgt vor.  
-   # service hylafax start 
- 
-  Starting HylaFAX queue manager (faxq):                      OK  ] 
-  Starting HylaFAX server (hfaxd):                            OK  ] 
- 
-Im Syslog wird uns der erfolgreiche Start entsprechend quittiert. 
-  Jan  2 18:48:53 vml000020 HylaFAX[23129]: Listening to 0.0.0.0:4559 
-  Jan  2 18:48:53 vml000020 HylaFAX[23129]: HylaFAX INET Protocol Server: restarted. 
-  Jan  2 18:48:53 vml000020 FaxQueuer[23126]: HylaFAX (tm) Version 5.5.4 
-  Jan  2 18:48:53 vml000020 FaxQueuer[23126]: Copyright (c) 1990-1996 Sam Leffler 
-  Jan  2 18:48:53 vml000020 FaxQueuer[23126]: Copyright (c) 1991-1996 Silicon Graphics, Inc. 
- 
- 
-Zur Kontrolle können wir ja noch genau nachprüfen, ob die benötigten deamon's auch wirklich laufen. Dies geschieht am einfachsten via:  
-   # ps auxw | grep fax 
- 
-  uucp     25781  0.0  0.0  10276  1372 ?        Ss   20:02   0:00 faxq 
-  uucp     25784  0.0  0.0   7840  1000 ?        Ss   20:02   0:00 hfaxd -i hylafax 
- 
-==== automatischer Serverstart ==== 
-Damit nun unser HylaFAX-Server beim Booten automatisch gestartet wird, nehmen wir noch folgende Konfigurationsschritte vor. 
-   # chkconfig hylafax+ on 
- 
-Bei Bedarf können wir überprüfen, ob die Konfigurationsänderung aktiviert wurden. 
-   # chkconfig --list | grep hylafax+ 
- 
-  hylafax+         0:Aus   1:Aus   2:Ein   3:Ein   4:Ein   5:Ein   6:Aus 
- 
- 
-==== automatischer Faxempfang ==== 
-Da wir Faxe nicht nur senden sondern auch empfangen wollen, veranlassen wir den Start des Programms **faxgetty** bereits beim Hochfahren des Servers. 
- 
-Genauso wie beim Starten von [[centos:hylafax_c6#integration_in_einem_voip-server_asterisk|IAXmodem]] benötigen wir zum Starten und Wiederanlauf, den für den Faxempfang notwendigen Programms **faxgetty**, ein entsprechendes Hilfsprogramm. 
- 
-Der automatische Start von **faxgetty** gestaltet sich unter **CentOS 6.x** etwas anders als dies noch unter [[voip:fax:hylafax?&#automatischer_faxempfang|CentOS 5.x]] der Fall war. Der einmalige Start würde zwar über einen Eintrag in der //**/etc/inittab**// funktionieren, auch noch der **Neustart (respawn)** des Daemon.  
- 
-Das Anhalten und Wiederstarten des Daemon mit Hilfe des Aufrufs ''init q'' würde aber nicht mehr gehen! 
- 
-Wir beschreiten also, genau so wie schon bei **iaxmodem** hierzu nun den Standardweg, wie es bei CentOS 6.x nun der Fall ist. 
-  - **Startscript anlegen** Zunächst legen wir zum Starten von **faxgetty** im Verzeichnis //**/etc/init**// ein passendes Script an.<code> # vim /etc/init/start-faxgetty0.conf</code><file bash /etc/init/start-faxgetty0.conf># Django : 2012-12-11 
-# Für den Faxempfang das Hilfsprogramm faxgetty mit der Option (Gerätetreiberdatei)  
-# in den Runlevel 2345 automatisch starten und auch neustarten, sollte der Daemon sterben 
-start on runlevel [2345] 
-stop on runlevel [S016] 
-respawn 
- 
-exec /usr/sbin/faxgetty /dev/ttyIAX0 
-</file>  
- 
-<WRAP round tip>Benutzt man einen analogen Modem ist statt der Gerätetreiberdatei ''/dev/ttyIAX0'' der entsprechende Ort anzugebene, i.d.R. ''/dev/modem/'', also: <code>exec /usr/sbin/faxgetty /dev/modem</code></WRAP> 
- 
-Nun können wir, den für den Faxempfang notwendigen **faxgetty**-Prozess starten. 
-   # initctl start start-faxgetty0 
- 
-  start-faxgetty0 start/running, process 27251 
- 
-Fragen wir die Prozessliste ab, finden wir dazu auch das entsprechende Programm: 
-   # ps aux | grep ttyIAX 
- 
-  uucp     14029  0.0  0.0  17996  1196 pts/3    Ss+  14:26   0:00 /usr/local/sbin/iaxmodem ttyIAX0 
-  uucp     27251  0.0  0.0  66528  2820 ?        Ss   17:29   0:00 /usr/sbin/faxgetty /dev/ttyIAX0 
- 
-Es läuft also sowohl das **IAXmodem** wie auch der **faxgetty**-Prozess. 
- 
-==== Sytemcheck ==== 
-Ob nun unser FAX-Server und die zugehörigen Daemons auch alle laufen und zur Verfügung stehen, können wir wie folgt abfragen. 
-   # service hylafax+ status 
- 
-  hfaxd (pid 1026) is running... 
-  faxq (pid 1023) is running... 
- 
-Genauso gut kann man natürlich auch ermitteln, ob der Port 4559 des Hylafax-Daemon geöffnet ist. 
-   # netstat -tulpen | grep 4559 
- 
-  tcp        0      0 0.0.0.0:4559                0.0.0.0:                  LISTEN      10         7981871    1026/hfaxd 
- 
-Ob beide Daemons für den entsprechend kponfigurierten Modem zur Verfügung stehen, fragen wir so ab: 
-   # ps aux | grep ttyIAX 
- 
-  uucp     14029  0.0  0.0  17996  1196 pts/3    Ss+  14:26   0:00 /usr/local/sbin/iaxmodem ttyIAX0 
-  uucp     27251  0.0  0.0  66528  2820 ?        Ss   17:29   0:00 /usr/sbin/faxgetty /dev/ttyIAX0 
- 
-<WRAP round info>In der Regel wird man jedoch mehr als einen Modem verwenden, da jeder Modem während einer Verbindung jeweils nur eine Sendung annehmen oder verschicken kann.</WRAP> 
- 
-Mit Hilfe des Programms **faxstat** können wir den Status unseres HylaFAX-Servers abfragen. Im ersten Beispiel läuft zwar der FaxServer schon, aber der definierte Modem wird noch initialisiert. 
-   # faxstat 
- 
-  HylaFAX scheduler on pml010010.nausch.org: Running 
-  Modem ttyIAX0 (+49 89 88031079): Initializing server 
- 
-Das zweite Beispiel zeigt den Server, wie er sich im Wartezustand befindet, also darauf wartet Faksimile anzunehmen oder verschicken zu können. 
-   # faxstat 
- 
-  HylaFAX scheduler on pml010010.nausch.org: Running 
-  Modem ttyIAX0 (+49 89 88031079): Running and idle 
- 
-Im dritten Beispiel sehen wir, dass gerade ein Anruf beim IAXmodem eintrifft, also "anklingelt". 
-   # faxstat 
- 
-  HylaFAX scheduler on pml010010.nausch.org: Running 
-  Modem ttyIAX0 (+49 89 88031079): Answering the phone 
- 
-Im nächsten Beispiel sehen wir, dass der HylaFAX-Server den Anruf entgegengenommen hat und gerade mit dem Aushandeln der Verbindungsparameter mit dem Sender beschäftigt ist. 
-   # faxstat 
- 
-  HylaFAX scheduler on pml010010.nausch.org: Running 
-  Modem ttyIAX0 (+49 89 88031079): Receiving facsimile 
- 
-Das letzte Beispiel zeigt den Hylafax im Empfangsbetrieb, bei dem er ein Faksimile vom Absender mit der Kennung **+49 89 2160 9596** entgegen nimmt. 
-   # faxstat 
- 
-  HylaFAX scheduler on pml010010.nausch.org: Running 
-  Modem ttyIAX0 (+49 89 88031079): Receiving from "+49 89 2160 9596" 
- 
-===== Fax-Empfang ===== 
-==== erster Fax-Empfang ==== 
-Verbinden wir uns mit dem **CLI**((**C**ommand **L**ine **I**nterface)) von Asterisk, können wir während eines Faxempfanges sehen, was alles passiert. 
-<code>pml010010*CLI> 
-    -- Accepting call from '0950916' to '88031079' on channel 0/1, span 1 
-    -- Executing [88031079@from-pstn:1] Verbose("DAHDI/i1/0950916-25", "1,### Anruf von "from-pstn" ISDN 88031079 an (DAHDI-Channel 5 ###") in new stack 
- ### Anruf von "from-pstn" ISDN 88031079 an (DAHDI-Channel 5 ### 
-    -- Executing [88031079@from-pstn:2] Dial("DAHDI/i1/0950916-25", "IAX2/ttyIAX0/88031079,60,r") in new stack 
-    -- Called IAX2/ttyIAX0/88031079 
-    -- Call accepted by 127.0.0.1 (format alaw) 
-    -- Format for call is alaw 
-    -- IAX2/ttyIAX0-9457 is ringing 
-    -- IAX2/ttyIAX0-9457 answered DAHDI/i1/0950916-25 
-    -- Span 1: Channel 0/1 got hangup request, cause 16 
-    -- Hungup 'IAX2/ttyIAX0-9457' 
-  == Spawn extension (from-pstn, 88031079, 2) exited non-zero on 'DAHDI/i1/0950916-25' 
-    -- Hungup 'DAHDI/i1/0950916-25' 
-</code> 
- 
-Im Spoolingverzeichnis //**/var/spool/hylafax/recvq/**// befindet sich dann das empfangene Dokument in Form einer TIFF-Datei. 
-   # ll /var/spool/hylafax/recvq/*tif 
- 
-<code>-rw-r--r-- 1 uucp uucp 144800 14. Dez 15:06 /var/spool/hylafax/recvq/fax000000017.tif</code> 
- 
-Mit Hilfe des Befehls **faxinfo** können wir uns die (technischen) Daten des empfangenen Faksilies ansehen. 
-   # faxinfo /var/spool/hylafax/recvq/fax000000017.tif 
-<code>/var/spool/hylafax/recvq/fax000000017.tif: 
-    Sender: +49 89 2161 95916 
-     Pages: 8 
-   Quality: Fine 
-      Page: 1728 by 8 
-  Received: 2012:12:14 15:01:43 
-TimeToRecv: 0:05:12 
-SignalRate: 9600 bit/s 
-DataFormat: 2-D MR 
-ErrCorrect: No 
-</code> 
- 
-\\ 
- 
-==== Fax-Empfang und eMail an Sammelpostkorb ==== 
-Normalerweise wird man die entgegengenommen Faksimile an eine eMailadresse (Vorzimmer/Büro) weiterleiten wollen. Der Empfänger soll das Faksimile als eMail Anhang als PDF-Datei erhalten. 
- 
-Hierzu legen wir im Verzeichnis //**/var/spool/hylafax/etc/**// die Datei mit Namen **FaxDispatch** an. 
-   # vim /var/spool/hylafax/etc/FaxDispatch 
-<file bash /var/spool/hylafax/etc/FaxDispatch># Django : 2012-12-21 Empfangene Faxe an einen Sammelpostkorb (Sekretariat) per 
-# eMail mit dem empfangenen Dokument als PDF-Datei im Anhang senden 
-SENDTO=vorzimmer+fax@nausch.org; 
-FILETYPE=pdf; 
-</file> 
- 
-Die Variablen sind selbsterklärend. Beim **FileTYPE** wäre auch **//ps//** oder **//tif//** denkbar. 
- 
-Nach erfolgreicher Annahme eines Faksimiles wird dann an den Adressaten eine eMail verschickt, die folgenden Aufbau hat: 
-<code>To: vorzimmer+fax@nausch.org 
-From: hylafax@faxserver.nausch.org 
-Subject: Facsimile received from +49 89 2167 950916 
-Date: Fri, 21 Dec 2012 10:32:12 +0100 (CET) 
- 
-         Sender: +49 89 2161 9596 
-          Pages: 1 
-        Quality: Fine 
-           Size: ISO A4 
-       Received: 2012:12:21 10:31:55 
-Time To Receive: 0:00:19 
-    Signal Rate: 9600 bit/s 
-    Data Format: 2-D MR 
-  Error Correct: No 
-        CallID1: 0950916 
-        CallID2:=20 
-        CallID3: <NONE> 
-        CallID4: 8813179 
-    Received On: ttyIAX0 
-         CommID: c000000353 
-</code> 
-==== Fax-Empfang und eMail an individuelle Empfänger ==== 
-Sehr oft wird bei Fax-Server-Installationen jedem Mitarbeiter und/oder Bereich neben einer individuellen Nebenstellen-Nummer eine zugehörige individuelle Fax-Rufnummer zugeteilt.  
- 
-Im folgenden Beispiel gehen wir von folgender Zuordnung aus: 
-^ Nebenstellen-Nummer ^ Fax-Rufnummer  ^ Bezeichnung          ^ eMail-Adresse            ^ 
-|         8813179 - 0 |  8813179 - 699 | Zentrale             | vermittlung@nausch.org   | 
-|        8813179 - 10 |  8813179 - 610 | Vertrieb (Vorzimmer) | vorzimmer@nausch.org     | 
-|        8813179 - 11 |  8813179 - 611 | Geschäftsführer      | michael@nausch.org       | 
-|        8813179 - 20 |  8813179 - 620 | Technik              | support@nausch.org       | 
-|        8813179 - 30 |  8813179 - 630 | Vertrieb             | sales@nausch.org         | 
-|        8813179 - 40 |  8813179 - 640 | Lager                | lagermeister@nausch.org  | 
-|        8813179 - 66 |  8813179 - 666 | BOfH                 | django@nausch.org        | 
- 
- 
-Schickt nun jemand ein Faksimile an den Geschäftsführer an die Nummer 089/8813179-611, so soll das erhaltene Dokument direkt an die eMail des Scheffs geschickt werden. Eine Sendung an den **BOfH**((**B**astard **O**perator **f**rom **H**ell)) geht entsprechend an die eMail-Adresse //django@nausch.org//. 
- 
-Da uns der **IAXmodem** in der Variable **$CALLID4** die angewählte Rufnummer zum HylaFAX-Server übergibt, brauchen wir nur noch eine logische Verknüpfung zwischen **$CALLID4** und der eMail-Adresse aus obiger Tabelle vornehmen. 
- 
-Im Verzeichnis //**/var/spool/hylafax/etc/**// legen wir uns hierzu eine Datei an, in der wird diese Zuordnungen definieren.  
-   # vim /var/spool/hylafax/etc/Fax2Mail 
- 
-<file /var/spool/hylafax/etc/Fax2Mail>8813179699 vermittlung@nausch.org 
-8813179610 vorzimmer@nausch.org 
-8813179611 michael@nausch.org  
-8813179620 support@nausch.org 
-8813179630 sales@nausch.org 
-8813179640 lagermeister@nausch.org 
-8813179666 django@nausch.org  
-</file> 
- 
-Die Konfigurationsdatei für den eMailversand //**/var/spool/hylafax/etc/**// erweitern wir nun um ein kleines Shell-Script.  
-   # vim /var/spool/hylafax/etc/FaxDispatch 
-<file bash /var/spool/hylafax/etc/FaxDispatch># Django : 2012-12-21 Empfangene Faxe an einen Sammelpostkorb (Sekretariat) per 
-# eMail mit dem empfangenen Dokument als PDF-Datei im Anhang senden 
-#SENDTO=django@nausch.org 
-#FILETYPE=pdf 
- 
-# Django : 2012-12-21 Empfangene Faxe an die individuellen eMail-Postkörbe per 
-# eMail mit dem empfangenen Dokument als PDF-Datei im Anhang senden 
- 
-DEST_EMAIL=$(/bin/grep $CALLID4 /var/spool/hylafax/etc/Fax2Mail | /bin/sed -e 's/^.* \(.*\)$/\1/g') 
- 
-if [ $DEST_EMAIL == "NIL" ]; 
-    then 
-        SENDTO=FaxMaster; 
-        FILETYPE=pdf; 
-    else 
-        SENDTO=$DEST_EMAIL; 
-        FILETYPE=pdf; 
-fi 
- 
-# Deutsche Rückmeldungen ausgeben 
-LANG=de_DE 
-</file> 
- 
-Für die Ausgabe der deutschsprachigen Rückmeldungen haben wir den für unseren Sparchbereich geltenden Wert **de_DE** auch gleich noch gesetzt. 
- 
-Empfängt nun unser HylaFAX-Server eine Sendung für den **BOfH** auf der Rufnummer **8813179666**, so wird dem Empfänger in seinem eMail-Postfach die Sendung, mit dem zugehörigem Anhang **fax000000060.pdf**, zugestellt. 
-<code>An: django@nausch.org 
-Betreff: Facsimile received from +49 89 2161 9916 
-Datum: Fri, 21 Dec 2012 15:10:37 +0100 (CET) 
- 
-                     Sender: +49 89 2161 9916 
-                     Seiten: 1 
-                   Qualität: Normal 
-                      Größe: 1728 by 78 
-                  Empfangen: 2012:12:21 15:10:26 
-          Verarbeitungszeit: 0:00:19 
-Übertragungsgeschwindigkeit: 14400 bit/s 
-                Datenformat: 2-D MMR 
-            FehlerKorrektur: Ja 
-                Anrufe ID 1: 08921619916 
-                Anrufe ID 2:  
-                Anrufe ID 3: <NONE> 
-                Anrufe ID 4: 8813179666 
-                EmpfangenAn: ttyIAX0 
-           KommunikationsID: c000000391 
-</code> 
- 
-\\ 
-===== Fax-Versand ===== 
-==== erster Test von der Konsole aus ==== 
-Für den ersten Versandtest von der Konsole aus, bemühen wir das Programm **sendfax** 
-   # sendfax -n -d 0892161951916 /etc/motd 
- 
-  request id is 167 (group id 167) for host localhost (1 file) 
- 
-<WRAP round info>Mit der Option **-n** geben wir an, dass kein automatisch generiertes Deckblatt verwendet werden soll. \\ Mit der Option **-d** definieren wir die Zielrufnummer. 
- 
-Weitere Informationen zu den Optionen findet man in der manpage von sendfax. 
-</WRAP> 
- 
-Die abgehende Faxverbindung wird auf der Konsole entsprechend protokolliert. 
-<code>pml010010*CLI> 
-    -- Accepting AUTHENTICATED call from 127.0.0.1: 
-       > requested format = ulaw, 
-       > requested prefs = (), 
-       > actual format = ulaw, 
-       > host prefs = (ulaw|alaw), 
-       > priority = mine 
-    -- Executing [0892161951916@from-iaxmodems:1] Verbose("IAX2/ttyIAX0-14418", "### Anruf vom IAXmodem-Pool an die Rufnummer 0892161951916 via PSTN ###") in new stack 
-### Anruf vom IAXmodem-Pool an die Rufnummer 0892161951916 via PSTN ### 
-    -- Executing [0892161951916@from-iaxmodems:2] Set("IAX2/ttyIAX0-14418", "CALLERID(num)=898833311121") in new stack 
-    -- Executing [0892161951916@from-iaxmodems:3] Set("IAX2/ttyIAX0-14418", "CHANNEL(transfercapability)=3K1AUDIO") in new stack 
-    -- Executing [0892161951916@from-iaxmodems:4] Dial("IAX2/ttyIAX0-14418", "DAHDI/G1/0892161951916") in new stack 
-    -- Requested transfer capability: 0x10 - 3K1AUDIO 
-    -- Called DAHDI/G1/0892161951916 
-    -- DAHDI/i1/0892161951916-b2 is proceeding passing it to IAX2/ttyIAX0-14418 
-    -- DAHDI/i1/0892161951916-b2 answered IAX2/ttyIAX0-14418 
-    -- Hungup 'DAHDI/i1/0892161951916-b2' 
-  == Spawn extension (from-iaxmodems, 0892161951916, 4) exited non-zero on 'IAX2/ttyIAX0-14418' 
-    -- Hungup 'IAX2/ttyIAX0-14418' 
-    -- Channel 0/2, span 1 received AOC-E charging 1 unit 
-pml010010*CLI> 
-</code> 
- 
-\\ 
- 
-==== Fax-Versand per eMail ==== 
- 
-Im Produktivbetrieb werden normaler Weise keine User Zugriff auf Konsole unseres Faxservers haben. Wozu auch? entweder nutzen diese zum Versand ein stand-alone Faxgerät oder einen Mutifunktionsgerät, bei dem Drucken, Scannen und Faxen in einem Gerät vereint wurden. Nachdem unser Anwender Ihre ankommenden Fax-Sendungen direkt in die individuellen eMailpostfächer gestellt bekommen, liegt es nahe auch für den Versand das Medium eMail zu nutzen. In unserem Konfigurationsbeispiel wollen wir ein Fax, genauer gesagt ein Libre-Office-Document an die Empfangsadresse **08121883179** schicken, in dem wir einfach eine eMail an //**08121883179@faxserver.nausch.org**//. 
- 
-Bevor wir nun das Libreoffice-Dokument verschicken können, ist noch ein kleiner Konfigurationsaufwand notwenig: 
-  - **User und Gruppe anlegen:** Damit die beiden Dienste **faxmail** und **sendfax** nicht unter Root-Rechten laufen muss, legen wir uns einen sowohl einen System-User **sendfax** und einen Systemgruppe **sendfax** an. \\ Als erstes überprüfen wir ob unsere gewüschte User- und Group-ID frei ist. <code> # grep 496 /etc/group</code><code> # grep 496 /etc/passwd</code> \\ Die UID und GID 476 ist demnach nicht belegt und kann für unser Vorhaben verwendet werden. \\ Als nächstes legen wir uns eine Systemgruppe **sendfax** mit der GID **496** an. <code> # groupadd -g 496 sendfax</code> \\ Zum Schluss legen wir uns noch den User **sdendfax** mit der UID **496** an. <code> # useradd -c HylaFAX_System_User -u 496 -g sendfax -s /sbin/nologin sendfax</code> 
-  - **Mail-2-Fax-Gateway:** Damit die eMail mit ggf. enthaltenen Dateianhängen an den Faxserver weitergereicht werden können, benötigen wir noch ein kleines Hilfsprogramms. Als Basis verwenden wir das Muster von der [[http://hylafax.sourceforge.net/howto/misc/mail2fax.sh|HylaFAX-Projektseite]]. Wir legen das Script im Verzeichnis //**/usr/local/bin**// an.<code> # vim /usr/local/bin/mail2fax</code><file bash /usr/local/bin/mail2fax>#!/bin/sh 
-# 
-# simple mail-to-fax utility using both faxmail and sendfax. 
-# 
-# - Lee Howard 
-# - Django (Optionen für Empfangsbestätigung und Übertragungsmodus eingetragen) 
- 
-# 
-# Mail addresses can be three ways: 
-# 1) user@host.org 
-# 2) "User Name" <user@host.org> 
-# 3) user@host.org (User Name) 
-# 
-# in the latter cases, quotes may or may not be used, 
-# there may or may not be any User Name at all, and User Name 
-# may come before or after user@host.org. 
-# 
-# We need to make sure we handle all these possibilities for 
-# both TO and FROM situations.  Return-Path is different. 
-# 
- 
-RANDOMFAX=/tmp/mail2fax.$$ 
-mkdir $RANDOMFAX 
- 
-cat >> $RANDOMFAX/_message_ 
- 
-# Uncomment the following three lines for debugging. 
-#set -x 
-#exec > /tmp/mail2faxlog.$$ 2>&1 
-#cp $RANDOMFAX/_message_ /tmp/mail2faxmail.$$ 
- 
-JOBID=`grep -e "^subject:" -i $RANDOMFAX/_message_ | sed q | sed 's/^[^:]*: *//g'` 
-TOLINE=`grep -e "^to:" -i $RANDOMFAX/_message_ | sed q` 
-FROMLINE=`grep -e "^from:" -i $RANDOMFAX/_message_ | sed q` 
-if [ "`echo $TOLINE | grep '<.*>'`" != "" ]; then 
-        TONUMBER=`echo $TOLINE| sed -e 's/.*<\(.*[^@]*\)@.*>.*/\1/'` 
-else 
-        TONUMBER=`echo $TOLINE| sed -e 's/^[Tt]o://g' -e 's/[ ]*\(.*[^@]*\)@.*/\1/'` 
-fi 
-if [ "`echo $FROMLINE | grep '<.*>'`" != "" ]; then 
-        FROMPATH=`echo $FROMLINE| sed -e 's/.*<\(.*\).*>.*/\1/'` 
-else 
-        FROMPATH=`echo $FROMLINE| sed -e 's/^[Ff]rom://g' -e 's/[ ]*\([^ ]*\).*/\1/'` 
-fi 
- 
-# Django : 2013-01-05  
-# Senden ohne Empfangsbestätigung (Parameter '-R' bei sendfax) 
-#cat $RANDOMFAX/_message_ | faxmail -v -T $FROMPATH | sendfax -vv -n -D -f "$FROMPATH" -i "$JOBID" -d $TONUMBER 
- 
-# Django : 2013-01-05  
-# Senden mit Empfangsbestätigung (Parameter '-R' bei sendfax) 
-#cat $RANDOMFAX/_message_ | faxmail -v -T $FROMPATH | sendfax -R -vv -n -D -f "$FROMPATH" -i "$JOBID" -d $TONUMBER 
- 
-# Django : 2013-01-06 
-# Senden mit Empfangsbestätigung und im Feinmodus bei der Faxübertragung (Parameter '-R' und '-G' bei sendfax) 
-cat $RANDOMFAX/_message_ | faxmail -v -T $FROMPATH | sendfax -G -R -vv -n -D -f "$FROMPATH" -i "$JOBID" -d $TONUMBER 
- 
-rm -rf $RANDOMFAX 
- 
-exit 0 
-</file> Anschließend setzen wir noch die Ausführungsrechte für unser neues Script.<code> # chmod +x /usr/local/bin/mail2fax</code> 
-  - **Postfix anpassen:** Für die Annahme und Übergabe der eMails an den Faxserver, nutzen wir den **MTA Postfix**((**M**ail **T**ransport **A**gent)), dessen Konfigiration wir nun ein klein wenig erweitern. Zunächst definieren wir einen neue Transportmethode **fax** in der Postfix-Konfigurationsdatei //**/etc/postfix/master.cf**//. Wir fügen also am Ende der **master.cf** nachfolgende Zeilen ein.<code> # vim /etc/postfix/master.cf</code><code bash>... 
- 
-#  Django : 2013-01-06 
-#  Dienst fax für die Übergabe der Fax-Sendungen vom Mailserver Postfix in Richtung Haylafax definiert 
-# 
-fax       unix  -                               pipe 
-  flags= user=sendfax argv=/usr/local/bin/mail2fax ${nexthop} ${user} 
-</code>In der Postfix-Konfigurationsdatei **main.cf** definieren wir nun die Optionen **virtual_alias_maps**, **transport_maps** und **fax_destination_recipient_limit**.<code> # vim /etc/postfix/main.cf</code><code bash>... 
- 
-# Django : 2013-01-06 
-# Fax2Mail Gateway für die Übergabe der Fax-Sendungen vom Mailserver Postfix in Richtung Hylafax definiert 
-# 
-virtual_alias_maps = btree:/etc/postfix/virtual_alias_maps 
-transport_maps = btree:/etc/postfix/transport_maps 
-fax_destination_recipient_limit = 1 
-</code>Im Anschluss setzen wir dann einen **catch-all** für die Mail2Fax-Sendungen in der **/etc/postfix/virtual_alias_maps**.<file bash /etc/postfix/virtual_alias_maps># Definition der Weiterleitungen von eMails anhand der Empfangsadresse. eMails, die an den 
-# Faxserver weitergereicht werden, über geben wir dem Dienst fax auf localhost. Alle anderen 
-# eMails reichen wir zum zuständigen Mailgateway weiter. 
- 
-# Nach dem Ändern und/oder Erweitern der Tabelle, muß noch mittels  $ postmap btree:/etc/postfix/virtual_alias_maps 
-# die zugehörige Datenbank erzeugt werden. 
- 
-# Django : 2013-01-06 
-# Definitionen für das Mail2Fax-Gateway vorgenommen 
- 
-fax.nausch.org        fax: 
-*                     smtp:[mailgateway.dmz.nausch.org] 
-</file>Auch hier erstellen wir nun die zugehörige Datenbank mit folgendem Aufruf.<code>postmap btree:/etc/postfix/virtual_alias_maps</code> Zum Schluss starten wir unseren Mailserver einmal durch.<code> # service postfix restart</code> 
- 
-Beim ersten Testverschicken wir nun eine einfache Textnachricht (eMail) per Faksimile. Wir Adressieren also eine Nachricht an den Empfänger **08121883179** Dies machen wir zu Testzwecken auf der Konsole unseres Clients.  
-   # echo Nachrichtentext | mailx -s "erstes Testfax" 08121883179@fax.nausch.org 
- 
-Im Maillog sehen wir dann die Annahme der eMail und das Weiterreichen an den Dienst **fax**. 
-<code>Jan  6 22:41:00 vml000020 postfix/smtpd[26024]: connect from pml010045.intra.nausch.org[10.0.10.45] 
-Jan  6 22:41:00 vml000020 postfix/smtpd[26024]: B01291D6C: client=pml010045.intra.nausch.org[10.0.10.45] 
-Jan  6 22:41:00 vml000020 postfix/cleanup[26027]: B01291D6C: message-id=<201301062141.r06Lf0pb005589@pml010045.intra.nausch.org> 
-Jan  6 22:41:00 vml000020 postfix/qmgr[25951]: B01291D6C: from=<django@pml010045.intra.nausch.org>, size=959, nrcpt=1 (queue active) 
-Jan  6 22:41:00 vml000020 postfix/pipe[26028]: B01291D6C: to=<mail2fax@vml000020.dmz.nausch.org>, orig_to=<08121883179@fax.nausch.org>, relay=fax, delay=0.19, delays=0.09/0.01/0/0.09, dsn=2.0.0, status=sent (delivered via fax service) 
-Jan  6 22:41:00 vml000020 postfix/qmgr[25951]: B01291D6C: removed 
-Jan  6 22:41:00 vml000020 postfix/smtpd[26024]: disconnect from pml010045.intra.nausch.org[10.0.10.45] 
-</code> 
-Beim Empfänger sehen wir dann die einfache Textnachricht, die dort als {{:voip:voip:fax000000046.pdf|Faksimile}} zugestellt wurde. 
- 
-Als nächstes verschicken wir nun das Eingangs erwähnte {{:voip:voip:mail2fax-testdokument.pdf|Libre-Office-Dokument (PDF)}}. Dazu erstellen wir eine eMail mit dem von uns bevorzugten Mailclient, z.B. Thunderbird. 
- 
-{{ :voip:voip:bildschirmfoto_vom_2013-01-06_23_00_10.png?nolink&555 |Bildschirmhardcopy Mail2FAX}} 
- 
-Beim Empfänger wird dann ein {{:voip:voip:fax000000047.pdf|Fax}} mit 2 Seiten eingehen. 
- 
- 
-Der erfolgreiche Versand wir uns per eMail bestätigt. 
- 
-{{ :voip:voip:bildschirmfoto_vom_2013-01-06_23_09_16.png?nolink&700 |Versandbestätigung des Faxes per eMail}} 
- 
-====== Links ====== 
-  * **[[wiki:start|Zurück zu Projekte und Themenkapitel]]** 
-  * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]** 
- 
-~~AUTOTWEET~~ 
- 
-~~DISCUSSION~~ 
- 
- 
  
  • centos/hylafax_c6.txt
  • Zuletzt geändert: 31.10.2023 19:26.
  • von 127.0.0.1