![]() |
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*