HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] sendfax and dialrules



Hmm, I think I may have found the problem, it looks like these variables
in the dialrules file are not being set for some reason...

Area=${AreaCode}
Country=${CountryCode}
IDPrefix=${InternationalPrefix}
LDPrefix=${LongDistancePrefix}

Were does hylafax get these settings from, is it the
<spool_dir>/etc/config file?




Bruce McAlister wrote:
> Hi All,
> 
> Another top post, apologies again, just some more information.
> 
> If I add
> 
> DialStringRules: "etc/dialrules"
> 
> to <spool_dir>/config/iaxmodem, which is symlinked to the config.<devid>
> for faxgetty, it then looks like the dialstring changes, however, if I
> omit this line then the dialstring is unmodified, ie, what is sent from
> sendfax.
> 
> So for example, if I send a fax like so:
> 
> sendfax -n -T 3 -d 0766022007 /etc/hosts
> 
> the session log, with the DialStringRules defined looks like this:
> 
> -----------------------------------------------------------------------
> Oct 10 11:53:09.95: [ 8975]: SESSION BEGIN 000000005 +0766022007
> Oct 10 11:53:09.95: [ 8975]: HylaFAX (tm) Version 5.1.8
> Oct 10 11:53:09.95: [ 8975]: SEND FAX: JOB 1 DEST 0766022007 COMMID
> 000000005 DEVICE '/etc/iaxmodem/devices/ttyIAX002' FROM 'daemon
> <daemon@host>' USER root
> Oct 10 11:53:09.95: [ 8975]: STATE CHANGE: RUNNING -> SENDING
> Oct 10 11:53:09.95: [ 8975]: <-- [12:AT+FCLASS=1\r]
> Oct 10 11:53:09.95: [ 8975]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
> Oct 10 11:53:09.95: [ 8975]: <-- <1:0D>
> Oct 10 11:53:09.95: [ 8975]: --> <2:0D 0A>
> Oct 10 11:53:09.95: [ 8975]: --> <4:4F 4B 0D 0A>
> Oct 10 11:53:09.95: [ 8975]: --> [2:OK]
> Oct 10 11:53:09.95: [ 8975]: MODEM set XON/XOFF/FLUSH: input ignored,
> output disabled
> Oct 10 11:53:09.95: [ 8975]: DIAL 766022007
> Oct 10 11:53:09.95: [ 8975]: <-- [14:ATDT766022007\r]
> Oct 10 11:53:09.95: [ 8975]: <-- <13:41 54 44 54 37 36 36 30 32 32 30 30 37>
> Oct 10 11:53:09.95: [ 8975]: <-- <1:0D>
> Oct 10 11:53:10.96: [ 8975]: --> <6:0D 0A 42 55 53 59>
> Oct 10 11:53:10.96: [ 8975]: --> <2:0D 0A>
> Oct 10 11:53:10.96: [ 8975]: --> [4:BUSY]
> Oct 10 11:53:10.96: [ 8975]: SEND FAILED: JOB 1 DEST 0766022007 ERR Busy
> signal detected {E001}
> Oct 10 11:53:11.97: [ 8975]: <-- [5:ATH0\r]
> Oct 10 11:53:11.97: [ 8975]: <-- <4:41 54 48 30>
> Oct 10 11:53:11.97: [ 8975]: <-- <1:0D>
> Oct 10 11:53:11.97: [ 8975]: --> <4:0D 0A 4F 4B>
> Oct 10 11:53:11.97: [ 8975]: --> <2:0D 0A>
> Oct 10 11:53:11.97: [ 8975]: --> [2:OK]
> Oct 10 11:53:11.97: [ 8975]: MODEM set DTR OFF
> Oct 10 11:53:11.97: [ 8975]: MODEM set baud rate: 0 baud (flow control
> unchanged)
> Oct 10 11:53:11.97: [ 8975]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
> Oct 10 11:53:11.97: [ 8975]: SESSION END
> -----------------------------------------------------------------------
> 
> as you can see the string passed to ATDT has had it's leading 0
> stripped, this implies to me that it is trying to apply some regex's
> from the dialrules file, but it looks like it does not complete
> processing through the extra rules of the dialrules file. Does it exit
> on the initial match?
> 
> If I then remove the DialStringRules parameter from the iaxmodem
> definition, then it looks like no modification is made to the dialtring:
> 
> -----------------------------------------------------------------------
> Oct 10 11:46:47.13: [ 7814]: SESSION BEGIN 000000002 0766022007
> Oct 10 11:46:47.13: [ 7814]: HylaFAX (tm) Version 5.1.8
> Oct 10 11:46:47.13: [ 7814]: SEND FAX: JOB 2 DEST 0766022007 COMMID
> 000000002 DEVICE '/etc/iaxmodem/devices/ttyIAX004' FROM 'daemon
> <daemon@host>' USER root
> Oct 10 11:46:47.13: [ 7814]: STATE CHANGE: RUNNING -> SENDING
> Oct 10 11:46:47.13: [ 7814]: <-- [12:AT+FCLASS=1\r]
> Oct 10 11:46:47.13: [ 7814]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
> Oct 10 11:46:47.13: [ 7814]: <-- <1:0D>
> Oct 10 11:46:47.13: [ 7814]: --> <2:0D 0A>
> Oct 10 11:46:47.13: [ 7814]: --> <4:4F 4B 0D 0A>
> Oct 10 11:46:47.13: [ 7814]: --> [2:OK]
> Oct 10 11:46:47.13: [ 7814]: MODEM set XON/XOFF/FLUSH: input ignored,
> output disabled
> Oct 10 11:46:47.13: [ 7814]: DIAL 0766022007
> Oct 10 11:46:47.13: [ 7814]: <-- [15:ATDT0766022007\r]
> Oct 10 11:46:47.13: [ 7814]: <-- <14:41 54 44 54 30 37 36 36 30 32 32 30
> 30 37>
> Oct 10 11:46:47.13: [ 7814]: <-- <1:0D>
> Oct 10 11:46:48.14: [ 7814]: --> <6:0D 0A 42 55 53 59>
> Oct 10 11:46:48.14: [ 7814]: --> <2:0D 0A>
> Oct 10 11:46:48.14: [ 7814]: --> [4:BUSY]
> Oct 10 11:46:48.15: [ 7814]: SEND FAILED: JOB 2 DEST 0766022007 ERR Busy
> signal detected {E001}
> Oct 10 11:46:49.15: [ 7814]: <-- [5:ATH0\r]
> Oct 10 11:46:49.15: [ 7814]: <-- <4:41 54 48 30>
> Oct 10 11:46:49.15: [ 7814]: <-- <1:0D>
> Oct 10 11:46:49.16: [ 7814]: --> <2:0D 0A>
> Oct 10 11:46:49.16: [ 7814]: --> <4:4F 4B 0D 0A>
> Oct 10 11:46:49.16: [ 7814]: --> [2:OK]
> Oct 10 11:46:49.16: [ 7814]: MODEM set DTR OFF
> Oct 10 11:46:49.16: [ 7814]: MODEM set baud rate: 0 baud (flow control
> unchanged)
> Oct 10 11:46:49.16: [ 7814]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
> Oct 10 11:46:49.16: [ 7814]: SESSION END
> -----------------------------------------------------------------------
> 
> I am now at the end of the line with my limited knowledge of HylaFAX, I
> dont quite know where else to look in trying to get my dialrules working
> as expected.
> 
> Is there another way that i can force the modem to dial a specific
> dialtring? Would JobControl be another option, I could possible come up
> with a regex in a perl script that would pass correct dialstring over to
> the application that performs the dialing? Is this a viable alternative?
> 
> Thanks
> Bruce
> 
> Bruce McAlister wrote:
>> Hi All,
>>
>> Sorry for top posting again, in addition to the information below
>> (previous posts), it appears that sendfax is performing some sort of
>> dialrules conversion, I'm just not too sure which file it is using, or,
>> if it is indeed sendfax performing the conversions. For example, using
>> all the configuration options below (previous posts), if i submit the
>> following fax for transmission:
>>
>> sendfax -n -T 3 -d aaadddd /etc/hosts
>>
>> The session log shows that the letters have been converted to numbers:
>>
>> ----------------------------------------------------------------------
>> Oct 09 17:10:39.11: [ 8326]: SESSION BEGIN 000000126 +2223333
>> Oct 09 17:10:39.11: [ 8326]: HylaFAX (tm) Version 5.1.8
>> Oct 09 17:10:39.11: [ 8326]: SEND FAX: JOB 62 DEST aaadddd COMMID
>> 000000126 DEVICE '/etc/iaxmodem/devices/ttyIAX003' FROM 'Super-User
>> <root@host>' USER root
>> Oct 09 17:10:39.11: [ 8326]: STATE CHANGE: RUNNING -> SENDING
>> Oct 09 17:10:39.11: [ 8326]: <-- [12:AT+FCLASS=1\r]
>> Oct 09 17:10:39.12: [ 8326]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
>> Oct 09 17:10:39.12: [ 8326]: <-- <1:0D>
>> Oct 09 17:10:39.12: [ 8326]: --> <2:0D 0A>
>> Oct 09 17:10:39.12: [ 8326]: --> <4:4F 4B 0D 0A>
>> Oct 09 17:10:39.12: [ 8326]: --> [2:OK]
>> Oct 09 17:10:39.12: [ 8326]: MODEM set XON/XOFF/FLUSH: input ignored,
>> output disabled
>> Oct 09 17:10:39.12: [ 8326]: DIAL 2223333
>> Oct 09 17:10:39.12: [ 8326]: <-- [12:ATDT2223333\r]
>> Oct 09 17:10:39.12: [ 8326]: <-- <11:41 54 44 54 32 32 32 33 33 33 33>
>> Oct 09 17:10:39.12: [ 8326]: <-- <1:0D>
>> Oct 09 17:10:40.13: [ 8326]: --> <8:0D 0A 42 55 53 59 0D 0A>
>> Oct 09 17:10:40.13: [ 8326]: --> [4:BUSY]
>> Oct 09 17:10:40.13: [ 8326]: SEND FAILED: JOB 62 DEST aaadddd ERR Busy
>> signal detected {E001}
>> Oct 09 17:10:41.14: [ 8326]: <-- [5:ATH0\r]
>> Oct 09 17:10:41.14: [ 8326]: <-- <4:41 54 48 30>
>> Oct 09 17:10:41.14: [ 8326]: <-- <1:0D>
>> Oct 09 17:10:41.14: [ 8326]: --> <2:0D 0A>
>> Oct 09 17:10:41.14: [ 8326]: --> <4:4F 4B 0D 0A>
>> Oct 09 17:10:41.14: [ 8326]: --> [2:OK]
>> Oct 09 17:10:41.14: [ 8326]: MODEM set DTR OFF
>> Oct 09 17:10:41.14: [ 8326]: MODEM set baud rate: 0 baud (flow control
>> unchanged)
>> Oct 09 17:10:41.14: [ 8326]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
>> Oct 09 17:10:41.14: [ 8326]: SESSION END
>> ----------------------------------------------------------------------
>>
>> It also appears to strip leading zeros off of any number I put in as a
>> destination, for example, if I submit the following for transmission:
>>
>> sendfax -n -T 3 -d 0766022007 /etc/hosts
>>
>> The leading 0 is stripped off of the dial-string.
>>
>> -----------------------------------------------------------------------
>> Oct 09 16:48:06.36: [ 4253]: SESSION BEGIN 000000124 +0766022007
>> Oct 09 16:48:06.36: [ 4253]: HylaFAX (tm) Version 5.1.8
>> Oct 09 16:48:06.36: [ 4253]: SEND FAX: JOB 61 DEST 0766022007 COMMID
>> 000000124 DEVICE '/etc/iaxmodem/devices/ttyIAX005' FROM 'Super-User
>> <root@host>' USER root
>> Oct 09 16:48:06.36: [ 4253]: STATE CHANGE: RUNNING -> SENDING
>> Oct 09 16:48:06.36: [ 4253]: <-- [12:AT+FCLASS=1\r]
>> Oct 09 16:48:06.36: [ 4253]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
>> Oct 09 16:48:06.36: [ 4253]: <-- <1:0D>
>> Oct 09 16:48:06.36: [ 4253]: --> <6:0D 0A 4F 4B 0D 0A>
>> Oct 09 16:48:06.36: [ 4253]: --> [2:OK]
>> Oct 09 16:48:06.36: [ 4253]: MODEM set XON/XOFF/FLUSH: input ignored,
>> output disabled
>> Oct 09 16:48:06.36: [ 4253]: DIAL 766022007
>> Oct 09 16:48:06.36: [ 4253]: <-- [14:ATDT766022007\r]
>> Oct 09 16:48:06.36: [ 4253]: <-- <13:41 54 44 54 37 36 36 30 32 32 30 30 37>
>> Oct 09 16:48:06.36: [ 4253]: <-- <1:0D>
>> Oct 09 16:48:07.38: [ 4253]: --> <6:0D 0A 42 55 53 59>
>> Oct 09 16:48:07.38: [ 4253]: --> <2:0D 0A>
>> Oct 09 16:48:07.38: [ 4253]: --> [4:BUSY]
>> Oct 09 16:48:07.38: [ 4253]: SEND FAILED: JOB 61 DEST 0766022007 ERR
>> Busy signal detected {E001}
>> Oct 09 16:48:07.38: [ 4253]: SEND FAILED: JOB 61 DEST 0766022007 ERR
>> Busy signal detected {E001}; too many attempts to dial
>> Oct 09 16:48:08.39: [ 4253]: <-- [5:ATH0\r]
>> Oct 09 16:48:08.39: [ 4253]: <-- <4:41 54 48 30>
>> Oct 09 16:48:08.39: [ 4253]: <-- <1:0D>
>> Oct 09 16:48:08.39: [ 4253]: --> <2:0D 0A>
>> Oct 09 16:48:08.39: [ 4253]: --> <4:4F 4B 0D 0A>
>> Oct 09 16:48:08.39: [ 4253]: --> [2:OK]
>> Oct 09 16:48:08.39: [ 4253]: MODEM set DTR OFF
>> Oct 09 16:48:08.39: [ 4253]: MODEM set baud rate: 0 baud (flow control
>> unchanged)
>> Oct 09 16:48:08.39: [ 4253]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
>> Oct 09 16:48:08.39: [ 4253]: SESSION END
>> -----------------------------------------------------------------------
>>
>> Then, if I try to submit a fax for an international call like such:
>>
>> sendfax -n -T 3 -d 004417531112222
>>
>> Then it strips the leading 0's off of the dial-string
>>
>> -----------------------------------------------------------------------
>> Oct 09 17:15:34.70: [ 9338]: SESSION BEGIN 000000128 +004417531112222
>> Oct 09 17:15:34.70: [ 9338]: HylaFAX (tm) Version 5.1.8
>> Oct 09 17:15:34.70: [ 9338]: SEND FAX: JOB 63 DEST 004417531112222
>> COMMID 000000128 DEVICE '/etc/iaxmodem/devices/ttyIAX002' FROM
>> 'Super-User <root@host>' USER root
>> Oct 09 17:15:34.70: [ 9338]: STATE CHANGE: RUNNING -> SENDING
>> Oct 09 17:15:34.70: [ 9338]: <-- [12:AT+FCLASS=1\r]
>> Oct 09 17:15:34.70: [ 9338]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
>> Oct 09 17:15:34.70: [ 9338]: <-- <1:0D>
>> Oct 09 17:15:34.70: [ 9338]: --> <2:0D 0A>
>> Oct 09 17:15:34.70: [ 9338]: --> <4:4F 4B 0D 0A>
>> Oct 09 17:15:34.70: [ 9338]: --> [2:OK]
>> Oct 09 17:15:34.70: [ 9338]: MODEM set XON/XOFF/FLUSH: input ignored,
>> output disabled
>> Oct 09 17:15:34.70: [ 9338]: DIAL 4417531112222
>> Oct 09 17:15:34.70: [ 9338]: <-- [18:ATDT4417531112222\r]
>> Oct 09 17:15:34.70: [ 9338]: <-- <17:41 54 44 54 34 34 31 37 35 33 31 31
>> 31 32 32 32 32>
>> Oct 09 17:15:34.70: [ 9338]: <-- <1:0D>
>> Oct 09 17:15:35.72: [ 9338]: --> <2:0D 0A>
>> Oct 09 17:15:35.72: [ 9338]: --> <6:42 55 53 59 0D 0A>
>> Oct 09 17:15:35.72: [ 9338]: --> [4:BUSY]
>> Oct 09 17:15:35.72: [ 9338]: SEND FAILED: JOB 63 DEST 004417531112222
>> ERR Busy signal detected {E001}
>> Oct 09 17:15:36.73: [ 9338]: <-- [5:ATH0\r]
>> Oct 09 17:15:36.73: [ 9338]: <-- <4:41 54 48 30>
>> Oct 09 17:15:36.73: [ 9338]: <-- <1:0D>
>> Oct 09 17:15:36.73: [ 9338]: --> <2:0D 0A>
>> Oct 09 17:15:36.73: [ 9338]: --> <4:4F 4B 0D 0A>
>> Oct 09 17:15:36.73: [ 9338]: --> [2:OK]
>> Oct 09 17:15:36.73: [ 9338]: MODEM set DTR OFF
>> Oct 09 17:15:36.73: [ 9338]: MODEM set baud rate: 0 baud (flow control
>> unchanged)
>> Oct 09 17:15:36.73: [ 9338]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
>> Oct 09 17:15:36.73: [ 9338]: SESSION END
>> -----------------------------------------------------------------------
>>
>> My question is, where is it getting these dialrules from? Is there some
>> default set of dialrules that sendfax et al use? The dialrules file I
>> have defined does not strip the 0's off of an international call (or at
>> least I think it doesnt, dialtest seemed to imply it didnt). So, I can
>> only assume that sendfax is using a built in set of rules to manipulate
>> the dialstring which is not the dialrules file I have defined, or, is it
>> some other application that modifies the dial-string, and not sendfax
>> itself?
>>
>> Any pointers/tips/trick would be much appreciated, I'm slowly going
>> insane here, I'm not too sure where else to look :/
>>
>> Thanks
>> Bruce
>>
>> Bruce McAlister wrote:
>>> Sorry for top posting, but, a little more info on the problem. I read
>>> the man page for sendfax and it looks like I can put a "DialRules"
>>> parameter into <install_dir>/lib/fax/sendfax.conf. Which I have now
>>> done. The contents of this file are as follows:
>>>
>>> ----------------------------------------------------------------------
>>> root@host:/opt/hylafax-5.1.8/lib/fax # cat ./sendfax.conf
>>> DialRules: /opt/hylafax-5.1.8/var/spool/etc/dialrules
>>> ----------------------------------------------------------------------
>>>
>>> I then run the dtrace script "opensnoop.d" which returns a list of files
>>> opened for reading by a process and any error codes if any. The entire
>>> output for this run is attached, it's easier to read in the attached file.
>>>
>>> I've highlighted the 2 lines where you can see sendfax opening the
>>> sendfax.conf file and the line where it attempts to open the dialrules
>>> file. In previous run's sendfax did not try to open that particular
>>> dialrules file, previously it attempted to open
>>> <install_dir>/lib/fax/dialrules, which does not exist in my case.
>>>
>>> Sooo, now I'm wondering if sendfax is applying the dialrules to my
>>> number, by the looks of things, sendfax does open the dialrules file,
>>> but, based on the session log (as illustrated below), it looks like
>>> sendfax is not actually applying the dialrules to the number passed on
>>> the commandline ("-d 1112222").
>>>
>>> Could it be that my dialrules file has a typ0 in it? Does the dialrules
>>> have to be tab delimitered, would there be any problem with the "^\+"
>>> parameter? I know the plus is a metacharacter in regex, so I'm just
>>> wondering if there is anything that does not look right in my dialrules
>>> file (I've attached it aswell, just in case).
>>>
>>> This is a weird one for me, I'm no guru with HylaFAX+, but dialtest
>>> works, but any application using the dialrules does not :/
>>>
>>> Bruce McAlister wrote:
>>>> Lee Howard wrote:
>>>>> Bruce McAlister wrote:
>>>>>
>>>>>> dialtest -a 01 -c 353 -i 00 -l 0 ./dialrules
>>>>>>
>>>>> If dialtest is giving proper results, but the actual number being dialed
>>>>> or displayed is not in agreement with what you see from dialtest, then...
>>>>>
>>>>> 1) check the permissions on your dialrules and make sure that the faxq
>>>>> and faxsend processes are able to read it.
>>>> The permissions on my dialrules file is as follows:
>>>>
>>>> root@host:/opt/hylafax-5.1.8/var/spool/etc # ls -l dialrules
>>>> -r--r--r--   1 root     root        2252 Oct  8 22:54 dialrules
>>>>
>>>>
>>>>> 2) be aware that DialStringRules is a config option that applies both to
>>>>> etc/config as well as etc/config.<devid>.  Thus it is possible to have
>>>>> faxq and faxsend disagree with each other (and there are reasons why you
>>>>> may *want* this).  So if you're using a non-default dialrules file name
>>>>> you'll want to take special notice of this.
>>>>>
>>>> Just as a precaution, I verified that the modem config files also have
>>>> the dialrules defined in them, but the problem still appears to be the same:
>>>>
>>>> <spool_dir>/etc/config:
>>>>
>>>> ----------------------------------------------------------------------------
>>>> root@host:/opt/hylafax-5.1.8/var/spool/etc # cat config
>>>> LogFacility:            daemon
>>>> CountryCode:            353
>>>> AreaCode:               01
>>>> LongDistancePrefix:     0
>>>> InternationalPrefix:    00
>>>> DialStringRules:        "etc/dialrules"
>>>> ServerTracing:          1
>>>> MaxConcurrentCalls:     6
>>>> ----------------------------------------------------------------------------
>>>>
>>>> <spool_dir>/etc/config._etc_iaxmodem_devices_ttyIAX000
>>>>
>>>> PS: The config.<dev_modem> files are symlinked back to ../config/iaxmodem.
>>>>
>>>> ----------------------------------------------------------------------------
>>>> root@host:/opt/hylafax-5.1.8/var/spool/etc # cat
>>>> config._etc_iaxmodem_devices_ttyIAX000
>>>> # $Id: iaxmodem,v 1.6 2007/08/07 18:22:39 faxguy Exp $
>>>>
>>>> #
>>>> # prototype config for the IAXmodem softmodem which uses
>>>> # the spandsp soft-DSP library
>>>> #
>>>>
>>>> # CONFIG:CLASS1:spandsp:.*:.*: Manufacturer=spandsp Model=IAXmodem
>>>> # CONFIG:CLASS1.0:spandsp:.*:.*: Manufacturer=spandsp Model=IAXmodem
>>>> #
>>>> # BEGIN-SERVER
>>>> # END-SERVER
>>>>
>>>> #
>>>> #
>>>> # Modem-related stuff: should reflect modem command interface
>>>> # and hardware connection/cabling (e.g. flow control).
>>>> #
>>>> ModemType:              Class1          # use this to supply a hint
>>>>
>>>> #
>>>> #             *** Caller-ID settings ***
>>>> #
>>>> # 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
>>>> #
>>>> # You'll likely want Caller*ID display (also displays DID) enabled.
>>>> #
>>>> ModemResetCmds:         AT+VCID=1       # enables CallID display
>>>> #
>>>> # 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: 2
>>>> #ModemRingResponse: AT+VRID=1
>>>>
>>>> # The pty apparently does not support changing parity.
>>>> PagerTTYParity:         none
>>>>
>>>> Class1AdaptRecvCmd:     AT+FAR=1
>>>> Class1TMConnectDelay:   400             # counteract quick CONNECT response
>>>> Class1RMQueryCmd:       "!24,48,72,96"  # V.17 fast-train recv doesn't
>>>> work well
>>>>
>>>> CallIDPattern:          "NMBR="
>>>> CallIDPattern:          "NAME="
>>>> CallIDPattern:          "ANID="
>>>> CallIDPattern:          "NDID="
>>>> #CallIDAnswerLength:    4
>>>> # Uncomment these if you really want them, but you probably don't.
>>>> #CallIDPattern:          "DATE="
>>>> #CallIDPattern:          "TIME="
>>>>
>>>> Class1ColorJPEGSupport: yes
>>>> Class1JBIGSupport:      yes
>>>>
>>>> TagLineFont:            etc/lutRS18.pcf
>>>> TagLineFormat:          "From: %%n|%c|Page %%p of %%t"
>>>>
>>>> DialStringRules:        "etc/dialrules"
>>>> ----------------------------------------------------------------------------
>>>>
>>>> <spool_dir>/etc/dialrules
>>>>
>>>> ----------------------------------------------------------------------------
>>>> ! $Id: dialrules,v 1.2 2006/10/17 22:34:42 faxguy Exp $
>>>> !
>>>> ! HylaFAX (tm) Dialing String Processing Rules.
>>>> !
>>>> ! This file describes how to process user-specified dialing strings
>>>> ! to create two items:
>>>> !
>>>> ! CanonicalNumber: a unique string that is derived from all dialing
>>>> ! strings to the same destination phone number.  This string is used
>>>> ! by the fax server for ``naming'' the destination.
>>>> !
>>>> ! DialString: the string passed to the modem for use in dialing the
>>>> ! telephone.  This string should be void of any characters that might
>>>> ! confuse the modem.
>>>> !
>>>> Area=${AreaCode}                ! local area code
>>>> Country=${CountryCode}          ! local country code
>>>> IDPrefix=${InternationalPrefix} ! prefix for placing an international call
>>>> LDPrefix=${LongDistancePrefix}  ! prefix for placing a long distance call
>>>> !
>>>> WS="    "                       ! our notion of white space
>>>> !
>>>> ! Convert a phone number to a canonical format:
>>>> !
>>>> !    +<country><areacode><rest>
>>>> !
>>>> ! by (possibly) stripping off leading dialing prefixes for
>>>> ! long distance and/or international dialing.
>>>> !
>>>> CanonicalNumber := [
>>>> %.*                     =                       ! strip calling card stuff
>>>> [abcABC]                = 2                     ! these convert alpha to
>>>> numbers
>>>> [defDEF]                = 3
>>>> [ghiGHI]                = 4
>>>> [jklJKL]                = 5
>>>> [mnoMNO]                = 6
>>>> [prsPRS]                = 7
>>>> [tuvTUV]                = 8
>>>> [wxyWXY]                = 9
>>>> [^+0-9]+                =                       ! strip white space etc.
>>>> ^${IDPrefix}            = +                     ! replace int. dialing code
>>>> ^${LDPrefix}            = +${Country}           ! replace l.d. dialing code
>>>> ^[^+]                   = +${Country}${Area}&   ! otherwise, insert
>>>> canon form
>>>> ]
>>>> !
>>>> ! Process a dialing string according to local requirements.
>>>> ! These rules do only one transformation: they convert in-country
>>>> ! international calls to long-distance calls.
>>>> !
>>>> DialString := [
>>>> [-${WS}.]+              =                       ! strip syntactic sugar
>>>> \(                      =
>>>> \)                      =
>>>> [abcABC]                = 2                     ! these convert alpha to
>>>> numbers
>>>> [defDEF]                = 3
>>>> [ghiGHI]                = 4
>>>> [jklJKL]                = 5
>>>> [mnoMNO]                = 6
>>>> [prsPRS]                = 7
>>>> [tuvTUV]                = 8
>>>> [wxyWXY]                = 9
>>>> !
>>>> ! Added by Bruce McAlister
>>>> !
>>>> ^00                          = +
>>>> ^[1-9][0-9]{6}$              = ${Area}&
>>>> ^0                           =
>>>> ^[1-9]                       = ${IDPrefix}${Country}&
>>>> ^\+                          = ${IDPrefix}
>>>> ]
>>>> ----------------------------------------------------------------------------
>>>>
>>>> When I submit the fax I submit it as follows:
>>>>
>>>> sendfax -n -T 3 -d 1112222 /etc/hosts
>>>>
>>>> The "faxstat -rs" looks like this
>>>>
>>>> ----------------------------------------------------------------------------
>>>> HylaFAX scheduler on host: Running
>>>> Modem /etc/iaxmodem/devices/ttyIAX001 (): Waiting for modem to come ready
>>>> Modem /etc/iaxmodem/devices/ttyIAX000 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX005 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX002 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX007 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX003 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX004 (): Running and idle
>>>> Modem /etc/iaxmodem/devices/ttyIAX006 (): Running and idle
>>>>
>>>> Protect Page  Owner        Sender/TSI  Recvd@ Filename
>>>> -rw----    8  5                       Sat11PM fax000000001.tif
>>>> -rw----    8  5                       Sat11PM fax000000002.tif
>>>> -rw----    1  5                       Sun10AM fax000000003.tif
>>>> -rw----    2  5                       Sun11AM fax000000004.tif
>>>> -rw----    2  5                       Sun12PM fax000000005.tif
>>>> -rw----    1  5                         09:16 fax000000006.tif
>>>> -rw----    1  5                         10:16 fax000000007.tif
>>>> -rw----    1  5                         10:22 fax000000008.tif
>>>> -rw----    1  5                         16:37 fax000000009.tif
>>>> -rw----    1  5                         16:41 fax000000010.tif
>>>>
>>>> JID  Pri S  Owner Number       Pages Dials     TTS Status
>>>> 41   126 S   root 1112222       0:1   1:3    23:47 No local dialtone
>>>> ----------------------------------------------------------------------------
>>>>
>>>> The session log looks as follows:
>>>>
>>>> ----------------------------------------------------------------------------
>>>> Oct 09 00:42:47.79: [22686]: SESSION BEGIN 000000068 +1112222
>>>> Oct 09 00:42:47.79: [22686]: HylaFAX (tm) Version 5.1.8
>>>> Oct 09 00:42:47.79: [22686]: SEND FAX: JOB 41 DEST 1112222 COMMID
>>>> 000000068 DEVICE '/etc/iaxmodem/devices/ttyIAX001' FROM 'Super-Use
>>>> r <root@host>' USER root
>>>> Oct 09 00:42:47.79: [22686]: STATE CHANGE: RUNNING -> SENDING
>>>> Oct 09 00:42:47.79: [22686]: <-- [12:AT+FCLASS=1\r]
>>>> Oct 09 00:42:47.79: [22686]: <-- <11:41 54 2B 46 43 4C 41 53 53 3D 31>
>>>> Oct 09 00:42:47.79: [22686]: <-- <1:0D>
>>>> Oct 09 00:42:47.79: [22686]: --> <2:0D 0A>
>>>> Oct 09 00:42:47.79: [22686]: --> <4:4F 4B 0D 0A>
>>>> Oct 09 00:42:47.79: [22686]: --> [2:OK]
>>>> Oct 09 00:42:47.79: [22686]: MODEM set XON/XOFF/FLUSH: input ignored,
>>>> output disabled
>>>> Oct 09 00:42:47.79: [22686]: DIAL 1112222
>>>> Oct 09 00:42:47.79: [22686]: <-- [12:ATDT1112222\r]
>>>> Oct 09 00:42:47.79: [22686]: <-- <11:41 54 44 54 31 31 31 32 32 32 32>
>>>> Oct 09 00:42:47.79: [22686]: <-- <1:0D>
>>>> Oct 09 00:42:47.80: [22686]: --> <2:0D 0A>
>>>> Oct 09 00:42:47.80: [22686]: --> <13:4E 4F 20 44 49 41 4C 54 4F 4E 45 0D 0A>
>>>> Oct 09 00:42:47.80: [22686]: --> [11:NO DIALTONE]
>>>> Oct 09 00:42:47.80: [22686]: SEND FAILED: JOB 41 DEST 1112222 ERR No
>>>> local dialtone {E004}
>>>> Oct 09 00:42:48.81: [22686]: <-- [5:ATH0\r]
>>>> Oct 09 00:42:48.81: [22686]: <-- <4:41 54 48 30>
>>>> Oct 09 00:42:48.81: [22686]: <-- <1:0D>
>>>> Oct 09 00:42:48.81: [22686]: --> <2:0D 0A>
>>>> Oct 09 00:42:48.81: [22686]: --> <4:4F 4B 0D 0A>
>>>> Oct 09 00:42:48.81: [22686]: --> [2:OK]
>>>> Oct 09 00:42:48.81: [22686]: MODEM set DTR OFF
>>>> Oct 09 00:42:48.81: [22686]: MODEM set baud rate: 0 baud (flow control
>>>> unchanged)
>>>> Oct 09 00:42:48.81: [22686]: STATE CHANGE: SENDING -> MODEMWAIT (timeout 5)
>>>> Oct 09 00:42:48.81: [22686]: SESSION END
>>>> ----------------------------------------------------------------------------
>>>>
>>>> The asterisk server we are using for relaying does it's routing on the
>>>> destination number, this number must be of the
>>>> <IDPrefix><CountryCode><AreaCode><Number>, hence the configuration of
>>>> the dialrules. If Asterisk does not see a number of this form it hangs
>>>> up the line, i assume this is why we get no dialtone when the modem
>>>> tries to dial that number.
>>>>
>>>> Any additional tips or suggestions would be appreciated.
>>>>
>>>>> Thanks,
>>>>>
>>>>> Lee.
>>>>>
>>>>>
>>>>> ____________________ HylaFAX(tm) Users Mailing List _______________________
>>>>>  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
>>>>> On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
>>>>>  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*
>>>>>
>>>>>
>>>> ____________________ HylaFAX(tm) Users Mailing List _______________________
>>>>   To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
>>>>  On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
>>>>   *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*
>>>>
>>>>
>>
>> ____________________ HylaFAX(tm) Users Mailing List _______________________
>>   To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
>>  On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
>>   *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*
>>
>>
> 
> 
> ____________________ HylaFAX(tm) Users Mailing List _______________________
>   To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
>  On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
>   *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*
> 
> 


____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions