Battle Forum

Battle Forum (http://battlefox.rooty.ru/index.php)
-   Программная - Linux (http://battlefox.rooty.ru/forumdisplay.php?f=80)
-   -   hylafax (http://battlefox.rooty.ru/showthread.php?t=9591)

tmp0000 16.10.2008 14:39

hylafax
 
На сервере (linux) установлен hylafax и настроен на прием входящих факсов и их отправку на e-mail компании.

Задача: организовать отправку факсов.

Код:

[root@servant fax]# cat etc/config
LogFacility:            daemon
CountryCode:            7
AreaCode:              8142
LongDistancePrefix:    1
InternationalPrefix:    011
DialStringRules:        etc/dialrules
ServerTracing:          1

Код:

[root@servant fax]# cat etc/config.ttyS1
# $Id: usr-xon,v 1.10 2004/05/19 21:17:23 lhoward Exp $
#
# HylaFAX Facsimile Software
#
# Copyright (c) 1990-1996 Sam Leffler
# Copyright (c) 1991-1996 Silicon Graphics, Inc.
# HylaFAX is a trademark of Silicon Graphics, Inc.
#
#

#
# Configuration for using the Class 1 command interface with
# a USR Courier or Sportster modem and XON/XOFF flow control.
#
#
CountryCode:            7
AreaCode:              8142
FAXNumber:              +7.8142.765.099
LongDistancePrefix:    1
InternationalPrefix:    011
DialStringRules:        etc/dialrules
ServerTracing:          1
SessionTracing:        11
RecvFileMode:          0644
LogFileMode:            0600
DeviceMode:            0600
RingsBeforeAnswer:      1
SpeakerVolume:          off
GettyArgs:              "-h %l dx_%s"
LocalIdentifier:        "NothingSetup"
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"

#Added via opennet
PercentGoodLines:      75
MaxConsecutiveBadLines: 25

MaxRecvPages:          25
#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
ModemType:              Class1          # use class 1 interface
#ModemRate:            19200          # rate for DCE-DTE communication
ModemRate:              115200          # rate for DCE-DTE communication

ModemFlowControl:      xonxoff        # software flow control
#
ModemSetupDTRCmd:      ATS13=1&D2      # setup so DTR drop resets modem
ModemSetupDCDCmd:      AT&C1          # setup so DCD reflects carrier (or not)
ModemNoFlowCmd:        AT&H0&I0&R1    # setup modem for no flow control
ModemHardFlowCmd:      AT&H1&I0&R2    # setup modem for hardware flow control
ModemSoftFlowCmd:      AT&H2&I2&R1    # setup modem for software flow control
ModemResultCodesCmd:    ATQ0X4          # enable result codes
#
ModemMfrQueryCmd:      !USR
ModemModelQueryCmd:    ATI3
ModemRevQueryCmd:      ATI7            # XXX returns a multi-line result
ModemDialCmd:          ATDT9,%s@
#ModemDialCmd: ATS7=50\nAT&K3#CLS=8\nAT#VRN=0#VBT=1\nAT#VSR=7200\nAT#VBS=8\nATDP%s\n<waitfor:VCON>\nAT#VLS=4\nAT#VTX\n<waitfor:CONNECT><play:1><waitfor:OK>
#
# When AT+FCLASS=1 is issued the modem automatically switches
# to software flow control; these parameters let the fax software
# reset flow control as needed after entering Class 1.
#
Class1NFLOCmd:          AT&H0&I0&R1    # setup modem for no flow control
Class1HFLOCmd:          AT&H1&I0&R2    # setup modem for hardware flow control
Class1SFLOCmd:          ""              # modem does this automatically
#
# This should resolve "DIS/DTC received 3 times" errors:
#
Class1ResponseWaitCmd:  AT+FRS=1        # wait after sending TCF for response
#
# The remainder of this configuration is included so that the
# modem "idles" in Class 0 while not sending or receiving facsimile.
#
ModemSetupAACmd:        AT+FCLASS=0    # leave modem idling in class 0
ModemAnswerCmd:        AT+FCLASS=1A    # answer in Class 1
#
# Disables the reporting of bad frames by the modem.  This
# overcomes a firmware problem in the x2 and V90 Sportsters.
# It is not necessary for the Courier modem.
#
Class2NRCmd:    AT+FNR=1,1,1,0

Пытаюсь пообщаться с модемом:
Код:

[root@servant fax]# cu -l /dev/ttyS1
Connected.
OK
at+fclass=?
0,1,2.0

OK
ATZ
OK

Прием факсов работает хорошо, факсы приходят на e-mail. Нужно отправлять.

Как я понял, сначала надо добиться отправления факсов с этой linux-машины, а потом уже пробовать клиентский софт на других компьютерах.

Пытаюсь отправить факс на внутренний номер, где 110 -- номер еще одного факса в конторе.:
Код:

[root@servant fax]# sendfax -n -d 110 /etc/passwd
425 Cannot create data socket (127.0.0.1,4558): Address already in use.

Пытаюсь понять, кто использует этот порт:
Код:

[root@servant fax]# netstat -avpn | grep 4558
tcp        0      0 127.0.0.1:4558          127.0.0.1:4560          ESTABLISHED 11937/(pam_auth)
tcp        0      0 127.0.0.1:4560          127.0.0.1:4558          ESTABLISHED 19214/(squid)

, оказывается squid с PAM.

Нашел вот такую ветвь в мейллисте:
http://www.hylafax.org/archive/2000-...eads.php#00191

Мало понимаю, что нужно сделать, чтоб это исправить... Помогите, пожалуйста.

Добавлено через 22 часа 2 минуты
Еще один вопрос: кто-нибудь знает средства, которыми можно отправлять факсы с такими функциями: количество попыток, отправка результата на e-mail? ОС не важна.


Текущее время: 13:52. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot