[asterisk-users] Training failed with hylafax

tanhui1540 tanhui1540 at 126.com
Sat Aug 29 01:16:05 CDT 2009


I try to use hylafax to send fax, but i encounter with TRAINING failed error
I try many times to send a fax to fax machine whose type is Canon Laser Class 9000 Series
I always failed with the TRAINING failed error but succeed 2-3 times
I also send fax to another machine whose type is Panasonic
And I failed all the time with the same error without any success 

When using windows's fax modem to fax to the fax machine , I can fax successfully,so the fax machine is working well,
and the problem is related to the hylafax or something else that i can't figure out

I hava install spandsp-0.0.6,iaxmodem-1.2.0, hylafax-6.0.3
my asterisk version is 1.4.25.1, my TDM card's type is sangoma's 4 FXO port A200TDM card

and my configure are the following:

/var/spool/hylafax/etc/config.tty125
=================================================================================
 CountryCode:            86
 AreaCode:               020
 FAXNumber:              28683014
 LongDistancePrefix:     1
 InternationalPrefix:    011
 DialStringRules:        etc/dialrules
 ServerTracing:          1
 SessionTracing:         11
 RecvFileMode:           0660
 LogFileMode:            0600
 DeviceMode:             0600
 RingsBeforeAnswer:      1
 SpeakerVolume:          off
 GettyArgs:              "-h %l dx_%s"
 LocalIdentifier:        "OC9 Technologies"
 TagLineFont:            etc/lutRS18.pcf
 TagLineFormat:          "From %%l|%c|Page %%P of %%T"
 MaxRecvPages:           175

 #
 #
 # 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"

 #
 # 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:   1000             # 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

 Class1ResponseWaitCmd:  AT+FRS=1

 #
 # 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
============================================================================================

/etc/iaxmodem/tty125
======================================================================
device /dev/tty125
owner uucp:uucp
mode 660
port 4570
refresh 50
server 127.0.0.1
peername 125
secret 125
codec alaw
=======================================================================

my asterisk's config are following:

/etc/asterisk/iax.conf
=====================================================================
[125] 
type=friend
secret=125
host=dynamic
qualify=yes
context=fax_out
allow=alaw
===========================================================================

/etc/asterisk/extensions.conf
============================================================================
[fax_out]
exten => _X.,1,answer
exten => _X.,n,Dial(ZAP/g0/${EXTEN})
==============================================================================

when I use the command 
sendfax -n -d 81094660 /var/spool/asterisk/fax/11.tif
I can connect to the remote fax machine,but come to a TRAINING failed as an end
here's my log's detail:
================================================================================================================
Aug 29 09:45:30.63: [ 9568]: SESSION BEGIN 000000113 8602028683015
Aug 29 09:45:30.63: [ 9568]: HylaFAX (tm) Version 6.0.3
Aug 29 09:45:30.63: [ 9568]: SEND FAX: JOB 60 DEST 28683015 COMMID 000000113 DEVICE '/dev/tty125' FROM 'root <root at elastix.example.com>' USER root
Aug 29 09:45:30.63: [ 9568]: <-- [12:AT+FCLASS=1\r]
Aug 29 09:45:30.63: [ 9568]: --> [2:OK]
Aug 29 09:45:30.65: [ 9568]: DIAL 28683015
Aug 29 09:45:30.65: [ 9568]: <-- [13:ATDT28683015\r]
Aug 29 09:45:44.67: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:46.25: [ 9568]: --> [2:OK]
Aug 29 09:45:46.25: [ 9568]: REMOTE NSF "00 00 0E 00 00 00 16 0F 41 07 00 10 00 02 95 C8 08"
Aug 29 09:45:46.25: [ 9568]: NSF remote fax equipment: Panasonic 
Aug 29 09:45:46.25: [ 9568]: <-- [9:AT+FRH=3\r]
Aug 29 09:45:46.61: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:46.67: [ 9568]: --> [2:OK]
Aug 29 09:45:46.67: [ 9568]: REMOTE best rate 9600 bit/s
Aug 29 09:45:46.67: [ 9568]: REMOTE max A4 page width (215 mm)
Aug 29 09:45:46.67: [ 9568]: REMOTE max unlimited page length
Aug 29 09:45:46.67: [ 9568]: REMOTE best vres 15.4 line/mm
Aug 29 09:45:46.67: [ 9568]: REMOTE format support: MH, MR
Aug 29 09:45:46.67: [ 9568]: REMOTE best 20 ms/scanline
Aug 29 09:45:46.67: [ 9568]: USE 9600 bit/s
Aug 29 09:45:46.67: [ 9568]: SEND file "docq/doc60.tif;70"
Aug 29 09:45:46.67: [ 9568]: USE A4 page width (215 mm)
Aug 29 09:45:46.67: [ 9568]: USE unlimited page length
Aug 29 09:45:46.67: [ 9568]: USE 3.85 line/mm
Aug 29 09:45:46.67: [ 9568]: USE 2-D MR
Aug 29 09:45:46.67: [ 9568]: USE 20 ms/scanline
Aug 29 09:45:46.67: [ 9568]: SEND training at v.29 9600 bit/s
Aug 29 09:45:46.67: [ 9568]: <-- [9:AT+FRS=7\r]
Aug 29 09:45:46.73: [ 9568]: --> [2:OK]
Aug 29 09:45:46.73: [ 9568]: <-- [9:AT+FTH=3\r]
Aug 29 09:45:46.75: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:46.75: [ 9568]: <-- data [23]
Aug 29 09:45:46.75: [ 9568]: <-- data [2]
Aug 29 09:45:48.31: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:48.31: [ 9568]: <-- data [6]
Aug 29 09:45:48.31: [ 9568]: <-- data [2]
Aug 29 09:45:48.67: [ 9568]: --> [2:OK]
Aug 29 09:45:48.67: [ 9568]: <-- [9:AT+FTS=7\r]
Aug 29 09:45:48.75: [ 9568]: --> [2:OK]
Aug 29 09:45:48.75: [ 9568]: <-- [10:AT+FTM=96\r]
Aug 29 09:45:48.77: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:48.77: [ 9568]: DELAY 1000 ms
Aug 29 09:45:49.77: [ 9568]: <-- data [1024]
Aug 29 09:45:49.77: [ 9568]: <-- data [776]
Aug 29 09:45:49.77: [ 9568]: <-- data [2]
Aug 29 09:45:51.34: [ 9568]: --> [2:OK]
Aug 29 09:45:51.34: [ 9568]: <-- [9:AT+FRS=1\r]
Aug 29 09:45:51.36: [ 9568]: --> [2:OK]
Aug 29 09:45:51.36: [ 9568]: <-- [9:AT+FRH=3\r]
Aug 29 09:45:51.54: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:52.69: [ 9568]: --> [2:OK]
Aug 29 09:45:52.69: [ 9568]: SEND training at v.29 7200 bit/s
Aug 29 09:45:52.69: [ 9568]: <-- [9:AT+FRS=7\r]
Aug 29 09:45:52.75: [ 9568]: --> [2:OK]
Aug 29 09:45:52.75: [ 9568]: <-- [9:AT+FTH=3\r]
Aug 29 09:45:52.76: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:52.76: [ 9568]: <-- data [23]
Aug 29 09:45:52.76: [ 9568]: <-- data [2]
Aug 29 09:45:54.31: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:54.31: [ 9568]: <-- data [6]
Aug 29 09:45:54.31: [ 9568]: <-- data [2]
Aug 29 09:45:54.67: [ 9568]: --> [2:OK]
Aug 29 09:45:54.67: [ 9568]: <-- [9:AT+FTS=7\r]
Aug 29 09:45:54.77: [ 9568]: --> [2:OK]
Aug 29 09:45:54.77: [ 9568]: <-- [10:AT+FTM=72\r]
Aug 29 09:45:54.79: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:54.79: [ 9568]: DELAY 1000 ms
Aug 29 09:45:55.79: [ 9568]: <-- data [1024]
Aug 29 09:45:55.79: [ 9568]: <-- data [326]
Aug 29 09:45:55.79: [ 9568]: <-- data [2]
Aug 29 09:45:57.35: [ 9568]: --> [2:OK]
Aug 29 09:45:57.35: [ 9568]: <-- [9:AT+FRS=1\r]
Aug 29 09:45:57.37: [ 9568]: --> [2:OK]
Aug 29 09:45:57.37: [ 9568]: <-- [9:AT+FRH=3\r]
Aug 29 09:45:57.54: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:58.69: [ 9568]: --> [2:OK]
Aug 29 09:45:58.69: [ 9568]: SEND training at v.27ter 4800 bit/s
Aug 29 09:45:58.69: [ 9568]: <-- [9:AT+FRS=7\r]
Aug 29 09:45:58.75: [ 9568]: --> [2:OK]
Aug 29 09:45:58.75: [ 9568]: <-- [9:AT+FTH=3\r]
Aug 29 09:45:58.77: [ 9568]: --> [7:CONNECT]
Aug 29 09:45:58.77: [ 9568]: <-- data [23]
Aug 29 09:45:58.77: [ 9568]: <-- data [2]
Aug 29 09:46:00.32: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:00.32: [ 9568]: <-- data [6]
Aug 29 09:46:00.32: [ 9568]: <-- data [2]
Aug 29 09:46:00.68: [ 9568]: --> [2:OK]
Aug 29 09:46:00.69: [ 9568]: <-- [9:AT+FTS=7\r]
Aug 29 09:46:00.77: [ 9568]: --> [2:OK]
Aug 29 09:46:00.77: [ 9568]: <-- [10:AT+FTM=48\r]
Aug 29 09:46:00.79: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:00.79: [ 9568]: DELAY 1000 ms
Aug 29 09:46:01.79: [ 9568]: <-- data [900]
Aug 29 09:46:01.79: [ 9568]: <-- data [2]
Aug 29 09:46:03.37: [ 9568]: --> [2:OK]
Aug 29 09:46:03.37: [ 9568]: <-- [9:AT+FRS=1\r]
Aug 29 09:46:03.39: [ 9568]: --> [2:OK]
Aug 29 09:46:03.39: [ 9568]: <-- [9:AT+FRH=3\r]
Aug 29 09:46:04.05: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:05.24: [ 9568]: --> [2:OK]
Aug 29 09:46:05.24: [ 9568]: SEND training at v.27ter fallback mode 2400 bit/s
Aug 29 09:46:05.24: [ 9568]: <-- [9:AT+FRS=7\r]
Aug 29 09:46:05.30: [ 9568]: --> [2:OK]
Aug 29 09:46:05.30: [ 9568]: <-- [9:AT+FTH=3\r]
Aug 29 09:46:05.32: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:05.32: [ 9568]: <-- data [23]
Aug 29 09:46:05.32: [ 9568]: <-- data [2]
Aug 29 09:46:06.88: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:06.88: [ 9568]: <-- data [6]
Aug 29 09:46:06.88: [ 9568]: <-- data [2]
Aug 29 09:46:07.24: [ 9568]: --> [2:OK]
Aug 29 09:46:07.24: [ 9568]: <-- [9:AT+FTS=7\r]
Aug 29 09:46:07.34: [ 9568]: --> [2:OK]
Aug 29 09:46:07.34: [ 9568]: <-- [10:AT+FTM=24\r]
Aug 29 09:46:07.36: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:07.36: [ 9568]: DELAY 1000 ms
Aug 29 09:46:08.36: [ 9568]: <-- data [450]
Aug 29 09:46:08.36: [ 9568]: <-- data [2]
Aug 29 09:46:09.94: [ 9568]: --> [2:OK]
Aug 29 09:46:09.94: [ 9568]: <-- [9:AT+FRS=1\r]
Aug 29 09:46:09.96: [ 9568]: --> [2:OK]
Aug 29 09:46:09.96: [ 9568]: <-- [9:AT+FRH=3\r]
Aug 29 09:46:11.13: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:12.30: [ 9568]: --> [2:OK]
Aug 29 09:46:12.30: [ 9568]: TRAINING failed
Aug 29 09:46:12.30: [ 9568]: <-- [9:AT+FRS=7\r]
Aug 29 09:46:12.36: [ 9568]: --> [2:OK]
Aug 29 09:46:12.36: [ 9568]: <-- [9:AT+FTH=3\r]
Aug 29 09:46:12.38: [ 9568]: --> [7:CONNECT]
Aug 29 09:46:12.38: [ 9568]: <-- data [3]
Aug 29 09:46:12.38: [ 9568]: <-- data [2]
Aug 29 09:46:13.47: [ 9568]: --> [2:OK]
Aug 29 09:46:14.47: [ 9568]: <-- [5:ATH0\r]
Aug 29 09:46:14.58: [ 9568]: --> [2:OK]
Aug 29 09:46:14.58: [ 9568]: SESSION END

====================================================================================================

is there something wrong with my configure or this is my TDM card's problem,
any help for this is very appreciated, thanks in advance 


and before this ,I use rxfax and txfax application to send and receive fax,
i can receive fax successfully and failed to send fax, any help for this is 
a big grace to me, thanks all



~                  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090829/96ca076a/attachment.htm 


More information about the asterisk-users mailing list