Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:hylafax_c6 [06.01.2013 22:14. ] – FaxGateway Mail2Fax beschrieben und Dokumentation fertig gestellt django | centos:hylafax_c6 [31.10.2023 19:26. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Fax-Server mit HylaFAX+ unter CentOS 6.x ====== | ||
+ | {{: | ||
+ | |||
+ | **HylaFAX+** ist eine OpenSource Fax-Serverlösung mit dem klingenden Slogan:\\ | ||
+ | \\ **// | ||
+ | |||
+ | Da es für **HylaFAX+** ein bereits vorgefertigtes **RPM** aus dem [[https:// | ||
+ | |||
+ | Ein ausführliches [[https:// | ||
+ | |||
+ | |||
+ | ===== 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, | ||
+ | # rpm -qil hylafax+ | ||
+ | < | ||
+ | Version | ||
+ | Release | ||
+ | Install Date: Fri 13 Dec 2013 01:27:57 PM CET Build Host: buildvm-13.phx2.fedoraproject.org | ||
+ | Group : Applications/ | ||
+ | Size : 2196979 | ||
+ | Signature | ||
+ | Packager | ||
+ | URL : https:// | ||
+ | Summary | ||
+ | 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. | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | # rpm -qil hylafax+-client | ||
+ | < | ||
+ | Version | ||
+ | Release | ||
+ | Install Date: Thu 02 Jan 2014 06:44:50 PM CET Build Host: buildvm-13.phx2.fedoraproject.org | ||
+ | Group : Applications/ | ||
+ | Size : 1091198 | ||
+ | Signature | ||
+ | Packager | ||
+ | URL : https:// | ||
+ | Summary | ||
+ | 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. | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | ===== Konfiguration ===== | ||
+ | Bei der Konfiguration unseres Faxservers gibt es nun zu berücksichtigen, | ||
+ | - **Analoge Nebenstelle einer TK-Anlage** | ||
+ | - **Integration in einem VoIP-Server // | ||
+ | |||
+ | ==== 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: | ||
+ | < | ||
+ | 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/ | ||
+ | Somit ist schon mal sichergestellt, | ||
+ | # ll / | ||
+ | |||
+ | | ||
+ | |||
+ | Da wir den Modem später über die Gerätedatei **/ | ||
+ | # ln -s / | ||
+ | |||
+ | Bei Bedarf können wir nun noch kontrollieren, | ||
+ | # ll /dev/mo* | ||
+ | |||
+ | | ||
+ | |||
+ | Damit nun bei jedem Neustart des Systemes dieser symlink automatisch gesetzt wird, ergänzen wir in der **/ | ||
+ | # vim / | ||
+ | |||
+ | <file bash / | ||
+ | # symlink dauerhaft für /dev/modem setzen | ||
+ | KERNEL==" | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== 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 [[https:// | ||
+ | |||
+ | |||
+ | === Download === | ||
+ | Im ersten Schritt holen wir uns uns die Programm-Sourcen auf unseren Rechner. | ||
+ | # cd / | ||
+ | |||
+ | # wget https:// | ||
+ | === Quellen entpacken === | ||
+ | Anschließend entpacken wir die Sourcen und setzen uns einen Symlink auf das Programmverzeichnis. | ||
+ | # | ||
+ | |||
+ | # ln -s iaxmodem-1.2.0 iaxmodem | ||
+ | |||
+ | Zum Schluß verschieben wir noch das **tar.gz**-Archiv ins Verzeichnis **// | ||
+ | # mv / | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === Quellen installieren === | ||
+ | Damit wir IAXmodem übersetzen können, installieren wir noch das Paket **libtiff-devel**, | ||
+ | # yum install libtiff-devel -y | ||
+ | |||
+ | Bevor wir uns nun daran machen, die Quellen zu übersetzen, | ||
+ | # less / | ||
+ | <file / | ||
+ | |||
+ | 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. | ||
+ | libraries may have had bugs fixed or enhancements added for specific use | ||
+ | with IAXmodem. | ||
+ | authors/ | ||
+ | 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). | ||
+ | part about "build static" | ||
+ | |||
+ | 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. | ||
+ | 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. | ||
+ | the other way uses static libraries. | ||
+ | of an incompatible spandsp or libiax2 on the system, then you should | ||
+ | probably build using static libraries. | ||
+ | |||
+ | To install libiax2: | ||
+ | |||
+ | # cd lib/libiax2 | ||
+ | # ./configure | ||
+ | # make | ||
+ | # make install | ||
+ | |||
+ | To install spandsp: | ||
+ | |||
+ | # 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 / | ||
+ | that is "/ | ||
+ | |||
+ | To build IAXmodem with dynamic linking: | ||
+ | |||
+ | # ./build | ||
+ | |||
+ | To build IAXmodem with static linking: | ||
+ | |||
+ | # ./build static | ||
+ | |||
+ | This will create the iaxmodem binary. | ||
+ | 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 / | ||
+ | be stored in here. With your favorite editor edit the prototype modem | ||
+ | configuration file, iaxmodem-cfg.ttyIAX. | ||
+ | as needed and desired. | ||
+ | |||
+ | The " | ||
+ | in your modem application. | ||
+ | you will need a different device for each instance. | ||
+ | |||
+ | The " | ||
+ | that IAXmodem should use for the created device. | ||
+ | |||
+ | The " | ||
+ | |||
+ | The " | ||
+ | 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). | ||
+ | is already listening on port 4569. | ||
+ | |||
+ | The " | ||
+ | the registration with the Asterisk server. | ||
+ | value that is used will be negotiated between IAXmodem and the Asterisk | ||
+ | server.) | ||
+ | register with the server, and thus the server should be configured to | ||
+ | communicate with IAXmodem on a static address. | ||
+ | |||
+ | The " | ||
+ | (or address), the registered peer name for the IAXmodem client, and the | ||
+ | registered secret (password) for the IAXmodem client. | ||
+ | |||
+ | The entries " | ||
+ | that will be made by IAXmodem to the Asterisk server. | ||
+ | |||
+ | The " | ||
+ | " | ||
+ | |||
+ | The " | ||
+ | |||
+ | The " | ||
+ | |||
+ | The " | ||
+ | (see below). | ||
+ | |||
+ | The " | ||
+ | |||
+ | The " | ||
+ | |||
+ | The " | ||
+ | |||
+ | Comments can be placed into the IAXmodem configuration files by beginning | ||
+ | them with a semicolon (";" | ||
+ | |||
+ | Now copy this file to the / | ||
+ | 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. | ||
+ | daemon mode, or non-daemon. | ||
+ | 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: | ||
+ | |||
+ | / | ||
+ | |||
+ | In this example the modem configuration file is expected to be: | ||
+ | |||
+ | / | ||
+ | |||
+ | 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). | ||
+ | verbose, you may choose to ignore all of it by starting IAXmodem like | ||
+ | this: | ||
+ | |||
+ | / | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | / | ||
+ | |||
+ | You may also choose to run IAXmodem from init by placing an entry into | ||
+ | the / | ||
+ | |||
+ | IAX: | ||
+ | |||
+ | ---------- | ||
+ | |||
+ | In daemon mode, IAXmodem is started by not supplying a configuration | ||
+ | identifier on the command-line, | ||
+ | |||
+ | / | ||
+ | |||
+ | This will cause iaxmodem to detach itself from the controlling tty and | ||
+ | launch a separate iaxmodem instance for every modem configuration file | ||
+ | found in / | ||
+ | |||
+ | In daemon mode IAXmodem sends logging data to files in the | ||
+ | / | ||
+ | directory will need to be created.) | ||
+ | |||
+ | You may wish to run iaxmodem in daemon mode and start it with a standard | ||
+ | init.d script. | ||
+ | purpose. | ||
+ | |||
+ | ---------- | ||
+ | |||
+ | 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: | ||
+ | |||
+ | / | ||
+ | |||
+ | |||
+ | ** 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). | ||
+ | HylaFAX version 4.2.2 and later. | ||
+ | simply edit this config file to your liking and then copy it to | ||
+ | / | ||
+ | usual.) | ||
+ | |||
+ | If using the " | ||
+ | the /tmp/ directory. | ||
+ | call. The file " | ||
+ | IAXmodem from the DSP library (which IAXmodem delivered to the IAX | ||
+ | library), and the file " | ||
+ | by IAXmodem from the IAX library (which IAXmodem delivered to the DSP | ||
+ | library). | ||
+ | files in this way: | ||
+ | |||
+ | sox -s -w -r 8000 -c 1 ttyIAX-iax.raw playable.wav | ||
+ | |||
+ | If using the " | ||
+ | audio files previously recorded by " | ||
+ | passed to the DSP comes from " | ||
+ | channel, and the audio that is passed to the IAX channel comes from | ||
+ | " | ||
+ | to provide a simple and reliable way to methodically repeat a call | ||
+ | session for debugging. | ||
+ | |||
+ | Jitter occurs when audio is received out of sequence. | ||
+ | involves missing audio packets, but sometimes it can involve mis- | ||
+ | ordered audio. | ||
+ | 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. | ||
+ | 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 " | ||
+ | dropping mis-ordered audio packets. | ||
+ | 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' | ||
+ | may be undesireable, | ||
+ | missing audio (thus letting our packet counting fall slightly behind). | ||
+ | In order to disable the jitterbuffer put " | ||
+ | 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 " | ||
+ | file. The purpose in this is to prevent iaxmodem logging from | ||
+ | consuming too much disk space. | ||
+ | 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: | ||
+ | |||
+ | / | ||
+ | notifempty | ||
+ | missingok | ||
+ | postrotate | ||
+ | /bin/kill -HUP `cat / | ||
+ | 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. | ||
+ | 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). | ||
+ | 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: | ||
+ | Website: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Wir werden also nun unser Software-Modem aus den Quellen übersetzen und installieren. Als erstes wechseln wir in das neu erstellte Programmverzeichnis: | ||
+ | # cd / | ||
+ | |||
+ | 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 // | ||
+ | # cp / | ||
+ | |||
+ | === Konfiguration - IAX-Modem === | ||
+ | Für die Konfiguration unseres bzw. unserer IAXmodem legen wir uns nun ein Konfigurationsverzeichnis an. | ||
+ | # mkdir / | ||
+ | |||
+ | In dieses Verzeichnis kopieren wir uns nun das in dem Quellpaket enthaltene Konfigurationsdatei. | ||
+ | # cp -a / | ||
+ | |||
+ | Diese Konfigurationsdatei passen wir nun unserer Umgebung entsprechend an. | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | owner uucp: | ||
+ | mode 660 | ||
+ | port 4570 | ||
+ | refresh 300 | ||
+ | server 127.0.0.1 | ||
+ | peername iaxmodem | ||
+ | secret password | ||
+ | cidname John Doe | ||
+ | cidnumber 8005551212 | ||
+ | codec slinear</ | ||
+ | |||
+ | 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. **../ | ||
+ | * **owner** Eigentümer und Gruppe der Gerätedatei der später auf das device zugreifen darf. | ||
+ | * **mode** Dateirechte, | ||
+ | * **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** | ||
+ | * **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 | ||
+ | |||
+ | <WRAP round important> | ||
+ | |||
+ | Somit ergibt sich für den ersten Test folgende Konfigurationsdatei: | ||
+ | <file bash / | ||
+ | owner | ||
+ | mode 660 | ||
+ | port 4570 | ||
+ | refresh | ||
+ | server | ||
+ | peername | ||
+ | secret | ||
+ | cidname nausch.org | ||
+ | cidnumber +49 8121 8831-79 | ||
+ | codec | ||
+ | </ | ||
+ | |||
+ | === 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** // | ||
+ | |||
+ | Wir bearbeiten also mit dem Editor unseres Vertrauens die IAX-Konfigurationsdatei. | ||
+ | # vim / | ||
+ | <code bash > | ||
+ | |||
+ | ... | ||
+ | |||
+ | calltokenoptional=127.0.0.1/ | ||
+ | |||
+ | ... | ||
+ | |||
+ | [ttyIAX0] | ||
+ | context=from-iaxmodems | ||
+ | type=friend | ||
+ | secret=P1r4t3nP4rTe1 | ||
+ | port=4570 | ||
+ | host=dynamic | ||
+ | defaultip=127.0.0.1 | ||
+ | deny=0.0.0.0/ | ||
+ | permit=127.0.0.1/ | ||
+ | disallow=all | ||
+ | allow=ulaw | ||
+ | allow=alaw | ||
+ | jitterbuffer=no | ||
+ | requirecalltoken=no | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP round important> | ||
+ | |||
+ | 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 | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | === 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 // | ||
+ | # iaxmodem / | ||
+ | |||
+ | < | ||
+ | [2012-12-11 14:18:50] Setting device = '/ | ||
+ | [2012-12-11 14:18:50] Setting owner = ' | ||
+ | [2012-12-11 14:18:50] Setting mode = ' | ||
+ | [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 = ' | ||
+ | [2012-12-11 14:18:50] Setting peername = ' | ||
+ | [2012-12-11 14:18:50] Setting secret = ' | ||
+ | [2012-12-11 14:18:50] Setting cidname = ' | ||
+ | [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 / | ||
+ | [2012-12-11 14:18:50] Registration completed successfully. | ||
+ | </ | ||
+ | |||
+ | Die erfolgreiche Registrierung unseres IAXmodem sehen wir auch auf der zuvor geöffneten Komandozeile von Asterisk. | ||
+ | < | ||
+ | |||
+ | Rufen wir die definierten IAX2-Peers mit **iax2 show peers** ab, sehen wir auch unseren definierten IAXmodem. | ||
+ | pml010010*CLI> | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | 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 / | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | # | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | Nun können wir das laufende Programm **iaxmodem** wieder stoppen, indem wir den laufenden Prozess einfach killen, oder den gerade laufenden Task mit '' | ||
+ | |||
+ | |||
+ | === automatischer Programmstart === | ||
+ | |||
+ | Der automatische Start des **iaxmodem-Daemon** gestaltet sich unter **CentOS 6.x** etwas anders, als dies noch unter [[voip: | ||
+ | |||
+ | Unter CentOS 6.x erfolgt die Konfiguration nicht mehr in der Datei // | ||
+ | # cat / | ||
+ | <file bash / | ||
+ | # | ||
+ | # ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. | ||
+ | # | ||
+ | # System initialization is started by / | ||
+ | # | ||
+ | # Individual runlevels are started by / | ||
+ | # | ||
+ | # Ctrl-Alt-Delete is handled by / | ||
+ | # | ||
+ | # Terminal gettys are handled by / | ||
+ | # with configuration in / | ||
+ | # | ||
+ | # 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: | ||
+ | </ | ||
+ | |||
+ | Wir beschreiten hierzu nun den Standardweg, | ||
+ | - **Startscript anlegen** Zunächst legen wir zum Starten unseres IAXmodem im Verzeichnis // | ||
+ | # softwareemulierten IAXmodems | ||
+ | # | ||
+ | |||
+ | start on runlevel [2345] | ||
+ | stop on runlevel [S016] | ||
+ | respawn | ||
+ | |||
+ | exec / | ||
+ | </ | ||
+ | - **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:< | ||
+ | |||
+ | Nun können wir unser neu definiertes Softwaremodem **IAXmodem** starten. | ||
+ | # initctl start start-ttyIAX0 | ||
+ | |||
+ | | ||
+ | |||
+ | Auf der (geöffneten) Asterisk Konsole sehen wir nun, dass sich unser IAXmodem am Asterisk-Server angemeldet hat. | ||
+ | # asterisk -r | ||
+ | < | ||
+ | Created by Mark Spencer < | ||
+ | Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' | ||
+ | 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' | ||
+ | ========================================================================= | ||
+ | Connected to Asterisk 1.8.18.0 currently running on pml010010 (pid = 12037) | ||
+ | Verbosity is at least 3 | ||
+ | pml010010*CLI> | ||
+ | </ | ||
+ | < | ||
+ | |||
+ | Fragen wir nun die Prozessliste ab, finden wir dazu auch das entsprechende Programm: | ||
+ | # ps aux | grep iax | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | Mit Hilfe des Befehls **probemodem** kann nun auch getestet werden, welche Funktionen und Standards unser IAXmodem unterstützt. | ||
+ | # probemodem | ||
+ | < | ||
+ | |||
+ | Now we are going to probe the tty port. This takes a few seconds, | ||
+ | so be patient. | ||
+ | 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 = " | ||
+ | ATI1 RESULT = " | ||
+ | ATI2 RESULT = " | ||
+ | ATI3 RESULT = " | ||
+ | ATI4 RESULT = " | ||
+ | ATI5 RESULT = " | ||
+ | ATI6 RESULT = " | ||
+ | ATI7 RESULT = " | ||
+ | ATI8 RESULT = " | ||
+ | ATI9 RESULT = " | ||
+ | |||
+ | Class 1 stuff... | ||
+ | |||
+ | AT+FCLASS=? | ||
+ | AT+FCLASS? | ||
+ | AT+FCLASS=0 RESULT = " | ||
+ | AT+FCLASS=1 RESULT = " | ||
+ | AT+FCLASS? | ||
+ | AT+FJUNK=? | ||
+ | AT+FJUNK? | ||
+ | AT+FAA=? | ||
+ | AT+FAA? | ||
+ | AT+FAE=? | ||
+ | AT+FAE? | ||
+ | AT+FTH=? | ||
+ | AT+FRH=? | ||
+ | AT+FTM=? | ||
+ | AT+FRM=? | ||
+ | AT+FTS=? | ||
+ | AT+FRS=? | ||
+ | |||
+ | Class 1.0 stuff... | ||
+ | |||
+ | AT+FCLASS=? | ||
+ | AT+FCLASS? | ||
+ | AT+FCLASS=0 RESULT = " | ||
+ | AT+FCLASS=1.0 RESULT = " | ||
+ | AT+FCLASS? | ||
+ | AT+FJUNK=? | ||
+ | AT+FJUNK? | ||
+ | AT+FAA=? | ||
+ | AT+FAA? | ||
+ | AT+FAE=? | ||
+ | AT+FAE? | ||
+ | AT+FTH=? | ||
+ | AT+FRH=? | ||
+ | AT+FTM=? | ||
+ | AT+FRM=? | ||
+ | AT+FTS=? | ||
+ | AT+FRS=? | ||
+ | AT+FAR=? | ||
+ | AT+FCL=? | ||
+ | AT+FIT=? | ||
+ | AT+F34=? | ||
+ | </ | ||
+ | |||
+ | ==== 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 / | ||
+ | <file bash / | ||
+ | |||
+ | ; ankommende ISDN-Anrufe auf die Rufnummer 883418210 auf den beiden internen Nst. 210 und 211 | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | === IAXmodem und Asterisk === | ||
+ | |||
+ | Die Definition des oder der IAXmodem haben wir ja bereits die entsprechenden Definitionen in der Datei **iax.conf** im Kapitel [[centos: | ||
+ | |||
+ | <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/ | ||
+ | permit=127.0.0.1/ | ||
+ | disallow=all | ||
+ | allow=ulaw | ||
+ | allow=alaw | ||
+ | jitterbuffer=no | ||
+ | requirecalltoken=no | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | <WRAP round tip> | ||
+ | |||
+ | # vim / | ||
+ | <file bash / | ||
+ | |||
+ | [fax-in] | ||
+ | ; ankommende ISDN-Anrufe auf die Nst. 210 zu den IAXmodem durchrouten. | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | exten => 883418210, | ||
+ | |||
+ | |||
+ | [from-iaxmodems] | ||
+ | ;Anwahl des internen analogen Faxanschlusses | ||
+ | exten => 19, | ||
+ | exten => 19, | ||
+ | exten => 19, | ||
+ | |||
+ | ; Ruf vom IAXMODEM-Pool | ||
+ | exten => _XXX., | ||
+ | exten => _XXX., | ||
+ | exten => _XXX., | ||
+ | exten => _XXX., | ||
+ | exten => _XXX., | ||
+ | |||
+ | ... | ||
+ | |||
+ | ... | ||
+ | |||
+ | [default] | ||
+ | include => fax-in | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ==== Grundkonfiguration HylaFAX ==== | ||
+ | === faxsetup === | ||
+ | Die Konfiguration unseres Faxservers wird am einfachsten mit Hilfe des Scriptes **faxsetup** durchgeführt. | ||
+ | # faxsetup | ||
+ | |||
+ | < | ||
+ | |||
+ | Created for x86_64-unknown-linux-gnu on Thu Nov 11 00:26:04 EST 2010. | ||
+ | |||
+ | Found encoder: / | ||
+ | Found encoder: / | ||
+ | Looks like / | ||
+ | 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 / | ||
+ | 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 / | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | Users to receive fax-related mail [root]? | ||
+ | Eingabe: **CR**((Datenfreigabe, | ||
+ | < | ||
+ | Update / | ||
+ | |||
+ | HylaFAX configuration parameters are: | ||
+ | |||
+ | [1] Init script starts faxq: yes | ||
+ | [2] Init script starts hfaxd yes | ||
+ | [3] Start paging protocol: | ||
+ | Are these ok [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | < | ||
+ | Configuration parameters written to / | ||
+ | |||
+ | No scheduler config file exists, creating one from scratch. | ||
+ | Country code [1]? | ||
+ | </ | ||
+ | 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 / | ||
+ | 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 / | ||
+ | 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 [" | ||
+ | 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** | ||
+ | < | ||
+ | |||
+ | CountryCode: | ||
+ | AreaCode: | ||
+ | LongDistancePrefix: | ||
+ | InternationalPrefix: | ||
+ | ServerTracing: | ||
+ | MaxSendPages: | ||
+ | SessionTracing: | ||
+ | |||
+ | Are these ok [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | < | ||
+ | |||
+ | Restarting HylaFAX server processes. | ||
+ | Should I restart the HylaFAX server processes [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | < | ||
+ | Starting HylaFAX queue manager (faxq): | ||
+ | Starting HylaFAX server (hfaxd): | ||
+ | |||
+ | 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]? | ||
+ | </ | ||
+ | Eingabe: **no** | ||
+ | < | ||
+ | about new modems and/or their status. | ||
+ | faxmodem program to inform the new faxq process about the modems you | ||
+ | want to have scheduled by HylaFAX. | ||
+ | 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]? | ||
+ | </ | ||
+ | Eingabe: **no** <WRAP round tip> | ||
+ | Done verifying system setup. | ||
+ | |||
+ | == faxaddmodem == | ||
+ | Haben wir die Frage < | ||
+ | Serial port that modem is connected to []? | ||
+ | Eingabe: **modem** | ||
+ | < | ||
+ | page config(5F) may be useful during this process. | ||
+ | that at any time you can safely interrupt this procedure. | ||
+ | |||
+ | Reading scheduler config file / | ||
+ | |||
+ | No existing configuration, | ||
+ | |||
+ | Country code [49]? | ||
+ | </ | ||
+ | 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) [" | ||
+ | Eingabe: **www.nausch.org** | ||
+ | Long distance dialing prefix [1]? | ||
+ | Eingabe: **0** | ||
+ | International dialing prefix [011]? | ||
+ | Eingabe: **0** | ||
+ | Dial string rules file (relative to / | ||
+ | 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 / | ||
+ | Eingabe: **CR** | ||
+ | Tag line font file (relative to / | ||
+ | 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** | ||
+ | < | ||
+ | The non-default server configuration parameters are: | ||
+ | |||
+ | CountryCode: | ||
+ | AreaCode: | ||
+ | FAXNumber: | ||
+ | LongDistancePrefix: | ||
+ | InternationalPrefix: | ||
+ | DialStringRules: | ||
+ | ServerTracing: | ||
+ | SessionTracing: | ||
+ | RecvFileMode: | ||
+ | DeviceMode: | ||
+ | RingsBeforeAnswer: | ||
+ | SpeakerVolume: | ||
+ | GettyArgs: | ||
+ | LocalIdentifier: | ||
+ | TagLineFont: | ||
+ | TagLineFormat: | ||
+ | MaxRecvPages: | ||
+ | |||
+ | Are these ok [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | |||
+ | Und weiter geht es mit der Konfiguration des Modems: | ||
+ | |||
+ | < | ||
+ | of modem that is attached. | ||
+ | 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. | ||
+ | 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' | ||
+ | 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]? | ||
+ | </ | ||
+ | Eingabe: **1** | ||
+ | < | ||
+ | Product code (ATI0) is " | ||
+ | Other information (ATI3) is " | ||
+ | DTE-DCE flow control scheme [default]? RTSCTS | ||
+ | Modem manufacturer is " | ||
+ | Modem model is " | ||
+ | |||
+ | 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. | ||
+ | and will automatically be deleted. | ||
+ | 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 | ||
+ | |||
+ | "/ | ||
+ | |||
+ | 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: | ||
+ | Class1PPMWaitCmd: | ||
+ | Class1TCFWaitCmd: | ||
+ | Class1EOPWaitCmd: | ||
+ | Class1FrameOverhead: | ||
+ | Class1RecvAbortOK: | ||
+ | Class1RecvIdentTimer: | ||
+ | Class1SwitchingCmd: | ||
+ | Class1TCFMaxNonZero: | ||
+ | Class1TCFMinRun: | ||
+ | |||
+ | Are these ok [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | < | ||
+ | Creating fifo / | ||
+ | Done setting up the modem configuration. | ||
+ | |||
+ | Checking / | ||
+ | ...some parameters are different. | ||
+ | |||
+ | The non-default scheduler parameters are: | ||
+ | |||
+ | CountryCode: | ||
+ | AreaCode: | ||
+ | LongDistancePrefix: | ||
+ | InternationalPrefix: | ||
+ | DialStringRules: | ||
+ | ServerTracing: | ||
+ | MaxSendPages: | ||
+ | SessionTracing: | ||
+ | |||
+ | Are these ok [yes]? | ||
+ | </ | ||
+ | Eingabe: **yes** | ||
+ | < | ||
+ | |||
+ | Creating new configuration file / | ||
+ | ...saving current file as / | ||
+ | |||
+ | 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]? | ||
+ | </ | ||
+ | Eingabe: **no** | ||
+ | < | ||
+ | |||
+ | You do not appear to be using faxgetty to notify the HylaFAX scheduler | ||
+ | about new modems and/or their status. | ||
+ | faxmodem program to inform the new faxq process about the modems you | ||
+ | want to have scheduled by HylaFAX. | ||
+ | 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]? | ||
+ | </ | ||
+ | Eingabe: **no** | ||
+ | Done verifying system setup. | ||
+ | |||
+ | Die Frage **Should I run faxmodem for each configured modem** ist mit **__no__** zu beantworten, | ||
+ | |||
+ | == 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 // | ||
+ | < | ||
+ | file included with IAXmodem (config.ttyIAX). | ||
+ | HylaFAX version 4.2.2 and later. | ||
+ | simply edit this config file to your liking and then copy it to | ||
+ | / | ||
+ | usual.)</ | ||
+ | |||
+ | Also kopieren wir die Vorgabedatei **config.ttyIAX** in das Konfigurationsverzeichnis // | ||
+ | # cp / | ||
+ | Anschließend bearbeiten wir diese Datei und ändern sie, unseren Bedürfnis entsprechend, | ||
+ | # vim / | ||
+ | |||
+ | <file bash / | ||
+ | AreaCode: | ||
+ | FAXNumber: | ||
+ | LongDistancePrefix: | ||
+ | InternationalPrefix: | ||
+ | DialStringRules: | ||
+ | ServerTracing: | ||
+ | SessionTracing: | ||
+ | RecvFileMode: | ||
+ | LogFileMode: | ||
+ | DeviceMode: | ||
+ | RingsBeforeAnswer: | ||
+ | SpeakerVolume: | ||
+ | # | ||
+ | GettyArgs: | ||
+ | LocalIdentifier: | ||
+ | TagLineFont: | ||
+ | TagLineFormat: | ||
+ | MaxRecvPages: | ||
+ | # | ||
+ | # | ||
+ | # Modem-related stuff: should reflect modem command interface | ||
+ | # and hardware connection/ | ||
+ | # | ||
+ | ModemType: | ||
+ | |||
+ | # | ||
+ | # Enabling this will use the hfaxd-protocol to set Caller*ID | ||
+ | # | ||
+ | # | ||
+ | |||
+ | ModemDialCmd: | ||
+ | |||
+ | # | ||
+ | # If " | ||
+ | # the modem off-hook during initialization, | ||
+ | # back on-hook when done. | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | Class1AdaptRecvCmd: | ||
+ | Class1TMConnectDelay: | ||
+ | |||
+ | # | ||
+ | # If you have trouble with V.17 receiving or sending, | ||
+ | # you may want to enable one of these, respectively. | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # You'll likely want Caller*ID display (also displays DID) enabled. | ||
+ | # | ||
+ | ModemResetCmds: | ||
+ | |||
+ | # | ||
+ | # The pty does not support changing parity. | ||
+ | # | ||
+ | PagerTTYParity: | ||
+ | |||
+ | # | ||
+ | # If you are " | ||
+ | # 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: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Uncomment DATE and TIME if you really want them, but you probably don't. | ||
+ | # | ||
+ | # | ||
+ | CallIDPattern: | ||
+ | CallIDPattern: | ||
+ | CallIDPattern: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | CallIDPattern: | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ==== erweiterte Konfiguration HylaFAX ==== | ||
+ | === cronjobs faxqclean und faxcron === | ||
+ | |||
+ | Das Script **faxcron** (beheimatet unter /// | ||
+ | |||
+ | Dank der RPM-Installation wurden für die beiden Aufgaben entsprechende Eintragungen bereits vorgenommen. | ||
+ | |||
+ | Das Sript **faxqclean** (beheimatet unter /// | ||
+ | |||
+ | Diese beiden Scripte **faxqclean** und **faxcron** sollen in regelmäßigen Abständen als cron-jobs aufgerufen werden. | ||
+ | # ll / | ||
+ | |||
+ | < | ||
+ | |||
+ | # cat / | ||
+ | <file bash / | ||
+ | |||
+ | / | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | Das zweite script **faxcron** (ebenfalls beheimatet unter /// | ||
+ | # ll / | ||
+ | < | ||
+ | |||
+ | # cat / | ||
+ | <file bash / | ||
+ | |||
+ | / | ||
+ | |||
+ | exit 0</ | ||
+ | |||
+ | Der Report, den **faxcron** täglich erstellt, sieht exeplarisch wie folgt aus: | ||
+ | |||
+ | < | ||
+ | |||
+ | Sender | ||
+ | ------------------------------------------------------------- | ||
+ | Total 0 0:00 0,0 0 | ||
+ | |||
+ | Facsimile transmitted since last week: | ||
+ | |||
+ | Sender | ||
+ | ------------------------------------------------------------- | ||
+ | Total 0 0:00 0,0 0 | ||
+ | |||
+ | Facsimile received since : | ||
+ | |||
+ | Sender | ||
+ | ------------------------------------------------------------------------------------------ | ||
+ | Total | ||
+ | |||
+ | Facsimile received since last week: | ||
+ | |||
+ | Sender | ||
+ | ------------------------------------------------------------------------------------------ | ||
+ | Total | ||
+ | |||
+ | 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. | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Ghostscript Fonts Fix === | ||
+ | Versuchen wir jetzt schon ein Faksimile zu verschicken, | ||
+ | # sendfax -n -d 883179 /etc/motd | ||
+ | < | ||
+ | Usage: / | ||
+ | Default options: -f Courier -1 -p 11bp -o 0 | ||
+ | Error converting data; command was "/ | ||
+ | </ | ||
+ | Zur Beseitigung des Fehlers **No font metric information found for " | ||
+ | Bevor wir nun das Paket auf unseren Rechner holen, wechseln wir erst noch in das lokale Installationsverzeichnis. | ||
+ | # cd / | ||
+ | |||
+ | Anschließend holen wir uns das **tar.gz**-Archiv auf unseren Server. | ||
+ | # wget https:// | ||
+ | |||
+ | Im nächsten Schritt entpacken wir das Paket. | ||
+ | # tar zxf ghostscript-fonts-std-8.11.tar.gz | ||
+ | |||
+ | Nun verschieben wir das entpackte Verzeichnis // | ||
+ | # mv fonts/* / | ||
+ | |||
+ | Bevor wir nun Änderungen an der Konfigurationsdatei vornehmen, kopierenn wird die Datei erst mal noch zur Sicherheit. | ||
+ | # cp -a / | ||
+ | |||
+ | Zum Schluss ersetzen wir noch in der Zeile **92** den Wert **/ | ||
+ | # vim +92 / | ||
+ | |||
+ | / | ||
+ | / | ||
+ | |||
+ | |||
+ | ===== 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): | ||
+ | Starting HylaFAX server (hfaxd): | ||
+ | |||
+ | Im Syslog wird uns der erfolgreiche Start entsprechend quittiert. | ||
+ | Jan 2 18:48:53 vml000020 HylaFAX[23129]: | ||
+ | Jan 2 18:48:53 vml000020 HylaFAX[23129]: | ||
+ | Jan 2 18:48:53 vml000020 FaxQueuer[23126]: | ||
+ | Jan 2 18:48:53 vml000020 FaxQueuer[23126]: | ||
+ | Jan 2 18:48:53 vml000020 FaxQueuer[23126]: | ||
+ | |||
+ | |||
+ | Zur Kontrolle können wir ja noch genau nachprüfen, | ||
+ | # ps auxw | grep fax | ||
+ | |||
+ | uucp | ||
+ | uucp | ||
+ | |||
+ | ==== 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, | ||
+ | # chkconfig --list | grep hylafax+ | ||
+ | |||
+ | hylafax+ | ||
+ | |||
+ | |||
+ | ==== 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: | ||
+ | |||
+ | Der automatische Start von **faxgetty** gestaltet sich unter **CentOS 6.x** etwas anders als dies noch unter [[voip: | ||
+ | |||
+ | Das Anhalten und Wiederstarten des Daemon mit Hilfe des Aufrufs '' | ||
+ | |||
+ | Wir beschreiten also, genau so wie schon bei **iaxmodem** hierzu nun den Standardweg, | ||
+ | - **Startscript anlegen** Zunächst legen wir zum Starten von **faxgetty** im Verzeichnis // | ||
+ | # 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 / | ||
+ | </ | ||
+ | |||
+ | <WRAP round tip> | ||
+ | |||
+ | Nun können wir, den für den Faxempfang notwendigen **faxgetty**-Prozess starten. | ||
+ | # initctl start start-faxgetty0 | ||
+ | |||
+ | start-faxgetty0 start/ | ||
+ | |||
+ | Fragen wir die Prozessliste ab, finden wir dazu auch das entsprechende Programm: | ||
+ | # ps aux | grep ttyIAX | ||
+ | |||
+ | uucp | ||
+ | uucp | ||
+ | |||
+ | 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: | ||
+ | |||
+ | Ob beide Daemons für den entsprechend kponfigurierten Modem zur Verfügung stehen, fragen wir so ab: | ||
+ | # ps aux | grep ttyIAX | ||
+ | |||
+ | uucp | ||
+ | uucp | ||
+ | |||
+ | <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.</ | ||
+ | |||
+ | 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: | ||
+ | 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: | ||
+ | Modem ttyIAX0 (+49 89 88031079): Running and idle | ||
+ | |||
+ | Im dritten Beispiel sehen wir, dass gerade ein Anruf beim IAXmodem eintrifft, also " | ||
+ | # faxstat | ||
+ | |||
+ | HylaFAX scheduler on pml010010.nausch.org: | ||
+ | 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: | ||
+ | Modem ttyIAX0 (+49 89 88031079): Receiving facsimile | ||
+ | |||
+ | Das letzte Beispiel zeigt den Hylafax im Empfangsbetrieb, | ||
+ | # faxstat | ||
+ | |||
+ | HylaFAX scheduler on pml010010.nausch.org: | ||
+ | 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. | ||
+ | < | ||
+ | -- Accepting call from ' | ||
+ | -- Executing [88031079@from-pstn: | ||
+ | ### Anruf von " | ||
+ | -- Executing [88031079@from-pstn: | ||
+ | -- Called IAX2/ | ||
+ | -- Call accepted by 127.0.0.1 (format alaw) | ||
+ | -- Format for call is alaw | ||
+ | -- IAX2/ | ||
+ | -- IAX2/ | ||
+ | -- Span 1: Channel 0/1 got hangup request, cause 16 | ||
+ | -- Hungup ' | ||
+ | == Spawn extension (from-pstn, 88031079, 2) exited non-zero on ' | ||
+ | -- Hungup ' | ||
+ | </ | ||
+ | |||
+ | Im Spoolingverzeichnis // | ||
+ | # ll / | ||
+ | |||
+ | < | ||
+ | |||
+ | Mit Hilfe des Befehls **faxinfo** können wir uns die (technischen) Daten des empfangenen Faksilies ansehen. | ||
+ | # faxinfo / | ||
+ | < | ||
+ | Sender: +49 89 2161 95916 | ||
+ | | ||
+ | | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== Fax-Empfang und eMail an Sammelpostkorb ==== | ||
+ | Normalerweise wird man die entgegengenommen Faksimile an eine eMailadresse (Vorzimmer/ | ||
+ | |||
+ | Hierzu legen wir im Verzeichnis // | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | # eMail mit dem empfangenen Dokument als PDF-Datei im Anhang senden | ||
+ | SENDTO=vorzimmer+fax@nausch.org; | ||
+ | FILETYPE=pdf; | ||
+ | </ | ||
+ | |||
+ | 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: | ||
+ | < | ||
+ | From: hylafax@faxserver.nausch.org | ||
+ | Subject: Facsimile received from +49 89 2167 950916 | ||
+ | Date: Fri, 21 Dec 2012 10:32:12 +0100 (CET) | ||
+ | |||
+ | | ||
+ | Pages: 1 | ||
+ | Quality: Fine | ||
+ | Size: ISO A4 | ||
+ | | ||
+ | Time To Receive: 0:00:19 | ||
+ | Signal Rate: 9600 bit/s | ||
+ | Data Format: 2-D MR | ||
+ | Error Correct: No | ||
+ | CallID1: 0950916 | ||
+ | CallID2:=20 | ||
+ | CallID3: < | ||
+ | CallID4: 8813179 | ||
+ | Received On: ttyIAX0 | ||
+ | | ||
+ | </ | ||
+ | ==== 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 | ||
+ | | | ||
+ | | 8813179 - 10 | 8813179 - 610 | Vertrieb (Vorzimmer) | vorzimmer@nausch.org | ||
+ | | 8813179 - 11 | 8813179 - 611 | Geschäftsführer | ||
+ | | 8813179 - 20 | 8813179 - 620 | Technik | ||
+ | | 8813179 - 30 | 8813179 - 630 | Vertrieb | ||
+ | | 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/ | ||
+ | |||
+ | 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 // | ||
+ | # vim / | ||
+ | |||
+ | <file / | ||
+ | 8813179610 vorzimmer@nausch.org | ||
+ | 8813179611 michael@nausch.org | ||
+ | 8813179620 support@nausch.org | ||
+ | 8813179630 sales@nausch.org | ||
+ | 8813179640 lagermeister@nausch.org | ||
+ | 8813179666 django@nausch.org | ||
+ | </ | ||
+ | |||
+ | Die Konfigurationsdatei für den eMailversand // | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | # eMail mit dem empfangenen Dokument als PDF-Datei im Anhang senden | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # 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=$(/ | ||
+ | |||
+ | if [ $DEST_EMAIL == " | ||
+ | then | ||
+ | SENDTO=FaxMaster; | ||
+ | FILETYPE=pdf; | ||
+ | else | ||
+ | SENDTO=$DEST_EMAIL; | ||
+ | FILETYPE=pdf; | ||
+ | fi | ||
+ | |||
+ | # Deutsche Rückmeldungen ausgeben | ||
+ | LANG=de_DE | ||
+ | </ | ||
+ | |||
+ | 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**, | ||
+ | < | ||
+ | Betreff: Facsimile received from +49 89 2161 9916 | ||
+ | Datum: Fri, 21 Dec 2012 15:10:37 +0100 (CET) | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | Größe: 1728 by 78 | ||
+ | Empfangen: 2012:12:21 15:10:26 | ||
+ | Verarbeitungszeit: | ||
+ | Übertragungsgeschwindigkeit: | ||
+ | Datenformat: | ||
+ | FehlerKorrektur: | ||
+ | Anrufe ID 1: 08921619916 | ||
+ | Anrufe ID 2: | ||
+ | Anrufe ID 3: < | ||
+ | Anrufe ID 4: 8813179666 | ||
+ | EmpfangenAn: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ===== 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. | ||
+ | </ | ||
+ | |||
+ | Die abgehende Faxverbindung wird auf der Konsole entsprechend protokolliert. | ||
+ | < | ||
+ | -- 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: | ||
+ | ### Anruf vom IAXmodem-Pool an die Rufnummer 0892161951916 via PSTN ### | ||
+ | -- Executing [0892161951916@from-iaxmodems: | ||
+ | -- Executing [0892161951916@from-iaxmodems: | ||
+ | -- Executing [0892161951916@from-iaxmodems: | ||
+ | -- Requested transfer capability: 0x10 - 3K1AUDIO | ||
+ | -- Called DAHDI/ | ||
+ | -- DAHDI/ | ||
+ | -- DAHDI/ | ||
+ | -- Hungup ' | ||
+ | == Spawn extension (from-iaxmodems, | ||
+ | -- Hungup ' | ||
+ | -- Channel 0/2, span 1 received AOC-E charging 1 unit | ||
+ | pml010010*CLI> | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== 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, | ||
+ | |||
+ | 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. < | ||
+ | - **Mail-2-Fax-Gateway: | ||
+ | # | ||
+ | # 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" < | ||
+ | # 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. | ||
+ | # | ||
+ | |||
+ | RANDOMFAX=/ | ||
+ | mkdir $RANDOMFAX | ||
+ | |||
+ | cat >> $RANDOMFAX/ | ||
+ | |||
+ | # Uncomment the following three lines for debugging. | ||
+ | #set -x | ||
+ | #exec > / | ||
+ | #cp $RANDOMFAX/ | ||
+ | |||
+ | JOBID=`grep -e " | ||
+ | TOLINE=`grep -e " | ||
+ | FROMLINE=`grep -e " | ||
+ | if [ "`echo $TOLINE | grep '< | ||
+ | TONUMBER=`echo $TOLINE| sed -e ' | ||
+ | else | ||
+ | TONUMBER=`echo $TOLINE| sed -e ' | ||
+ | fi | ||
+ | if [ "`echo $FROMLINE | grep '< | ||
+ | FROMPATH=`echo $FROMLINE| sed -e ' | ||
+ | else | ||
+ | FROMPATH=`echo $FROMLINE| sed -e ' | ||
+ | fi | ||
+ | |||
+ | # Django : 2013-01-05 | ||
+ | # Senden ohne Empfangsbestätigung (Parameter ' | ||
+ | #cat $RANDOMFAX/ | ||
+ | |||
+ | # Django : 2013-01-05 | ||
+ | # Senden mit Empfangsbestätigung (Parameter ' | ||
+ | #cat $RANDOMFAX/ | ||
+ | |||
+ | # Django : 2013-01-06 | ||
+ | # Senden mit Empfangsbestätigung und im Feinmodus bei der Faxübertragung (Parameter ' | ||
+ | cat $RANDOMFAX/ | ||
+ | |||
+ | rm -rf $RANDOMFAX | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | - **Postfix anpassen:** Für die Annahme und Übergabe der eMails an den Faxserver, nutzen wir den **MTA Postfix**((**M**ail **T**ransport **A**gent)), | ||
+ | |||
+ | # Django : 2013-01-06 | ||
+ | # Dienst fax für die Übergabe der Fax-Sendungen vom Mailserver Postfix in Richtung Haylafax definiert | ||
+ | # | ||
+ | fax | ||
+ | flags= user=sendfax argv=/ | ||
+ | </ | ||
+ | |||
+ | # Django : 2013-01-06 | ||
+ | # Fax2Mail Gateway für die Übergabe der Fax-Sendungen vom Mailserver Postfix in Richtung Hylafax definiert | ||
+ | # | ||
+ | virtual_alias_maps = btree:/ | ||
+ | transport_maps = btree:/ | ||
+ | fax_destination_recipient_limit = 1 | ||
+ | </ | ||
+ | # 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 | ||
+ | # die zugehörige Datenbank erzeugt werden. | ||
+ | # | ||
+ | # Django : 2013-01-06 | ||
+ | # Definitionen für das Mail2Fax-Gateway vorgenommen | ||
+ | |||
+ | fax.nausch.org | ||
+ | * | ||
+ | </ | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | Im Maillog sehen wir dann die Annahme der eMail und das Weiterreichen an den Dienst **fax**. | ||
+ | < | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | Jan 6 22:41:00 vml000020 postfix/ | ||
+ | </ | ||
+ | Beim Empfänger sehen wir dann die einfache Textnachricht, | ||
+ | |||
+ | Als nächstes verschicken wir nun das Eingangs erwähnte {{: | ||
+ | |||
+ | {{pdfjs 100%, 1200px >: | ||
+ | |||
+ | Dazu erstellen wir eine eMail mit dem von uns bevorzugten Mailclient, z.B. Thunderbird. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Beim Empfänger wird dann ein {{: | ||
+ | |||
+ | |||
+ | Der erfolgreiche Versand wir uns per eMail bestätigt. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ====== Links ====== | ||
+ | * **[[wiki: | ||
+ | * **[[https:// | ||
+ | |||
+ | |||