HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
[hylafax-users] sendfax and dialrules
Hi All,
I am having a little problem with sendfax and dial rules, basically, it
appears that sendfax is not applying the dialrules to a submitted fax.
I need to ensure that any number submitted to the fax queue ends up
having a DialString of the form:
${IDPrefix}${CountryCode}${AreaCode}<number>.
I have checked the man pages and read through the newsgroup for info,
and have managed to come up with a relatively decent dialrules file that
seems to work for all instances that I have tested with. The
modifications are as follows:
DialString := [
[-${WS}.]+ =
\( =
\) =
[abcABC] = 2
[defDEF] = 3
[ghiGHI] = 4
[jklJKL] = 5
[mnoMNO] = 6
[prsPRS] = 7
[tuvTUV] = 8
[wxyWXY] = 9
^00 = +
^[1-9][0-9]{6}$ = ${Area}&
^0 =
^[1-9] = ${IDPrefix}${Country}&
^\+ = ${IDPrefix}
]
I then put the dialrules into place, and attempt to submit a fax to the
queue, with the expectation of sendfax parsing dialrules and modifying
the dialstring to what I am expecting.
For example, assuming a number of 1112222, running
dialtest -a 01 -c 353 -i 00 -l 0 ./dialrules
and testing it with 1112222, I get the following:
------------------------------------------------------------------------
./dialrules: line 4273824704: Define AreaCode = "01"
./dialrules: line 4273824704: Define CountryCode = "353"
./dialrules: line 4273824704: Define InternationalPrefix = "00"
./dialrules: line 4273824704: Define LongDistancePrefix = "0"
./dialrules: line 16: Define Area = "01"
./dialrules: line 17: Define Country = "353"
./dialrules: line 18: Define IDPrefix = "00"
./dialrules: line 19: Define LDPrefix = "0"
./dialrules: line 21: Define WS = " "
./dialrules: line 30: CanonicalNumber := [
./dialrules: line 31: "%.*" = ""
./dialrules: line 32: "[abcABC]" = "2"
./dialrules: line 33: "[defDEF]" = "3"
./dialrules: line 34: "[ghiGHI]" = "4"
./dialrules: line 35: "[jklJKL]" = "5"
./dialrules: line 36: "[mnoMNO]" = "6"
./dialrules: line 37: "[prsPRS]" = "7"
./dialrules: line 38: "[tuvTUV]" = "8"
./dialrules: line 39: "[wxyWXY]" = "9"
./dialrules: line 40: "[^+0-9]+" = ""
./dialrules: line 41: "^00" = "+"
./dialrules: line 42: "^0" = "+353"
./dialrules: line 43: "^[^+]" = "+35301&"
./dialrules: line 44: ]
./dialrules: line 50: DialString := [
./dialrules: line 51: "[- .]+" = ""
./dialrules: line 52: "\(" = ""
./dialrules: line 53: "\)" = ""
./dialrules: line 54: "[abcABC]" = "2"
./dialrules: line 55: "[defDEF]" = "3"
./dialrules: line 56: "[ghiGHI]" = "4"
./dialrules: line 57: "[jklJKL]" = "5"
./dialrules: line 58: "[mnoMNO]" = "6"
./dialrules: line 59: "[prsPRS]" = "7"
./dialrules: line 60: "[tuvTUV]" = "8"
./dialrules: line 61: "[wxyWXY]" = "9"
./dialrules: line 65: "^00" = "+"
./dialrules: line 66: "^[1-9][0-9]{6}$" = "01&"
./dialrules: line 67: "^0" = ""
./dialrules: line 68: "^[1-9]" = "00353&"
./dialrules: line 69: "^\+" = "00"
./dialrules: line 70: ]
ready> 1112222
Apply CanonicalNumber rules to "1112222"
--> match rule "^[^+]", result now "+353011112222"
--> return result "+353011112222"
Apply DialString rules to "1112222"
--> match rule "^[1-9][0-9]{6}$", result now "011112222"
--> match rule "^0", result now "11112222"
--> match rule "^[1-9]", result now "0035311112222"
--> return result "0035311112222"
Apply DisplayNumber rules to "1112222"
--> return result "1112222"
canonical = "+353011112222"
dial-string = "0035311112222"
display = "1112222"
ready>
------------------------------------------------------------------------
Which is exactly what I am expecting. I assume the "dial-string"
parameter is what is passed over to ATDT as it's dial string.
However, this does not work for me, if I then submit a fax like this:
sendfax -n -T 3 -d 1112222 /etc/hosts
The modem attempts to dial 1112222 and not 0035311112222?!
Is there something I am missing, my <spool_dir>/etc/config looks like this:
------------------------------------------------------------------------
LogFacility: daemon
CountryCode: 353
AreaCode: 01
LongDistancePrefix: 0
InternationalPrefix: 00
DialStringRules: "etc/dialrules"
ServerTracing: 1
MaxConcurrentCalls: 6
------------------------------------------------------------------------
Have I missed something somewhere, is this normal behaviour for sendfax?
How would I make sendfax apply the dialrules to user submitted fax? Is
that possible?
I am running HylaFAX+ 5.1.8, with IAXModem 0.3.2.
Thanks
Bruce
____________________ 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*