HylaFAX The world's
most advanced open source fax server
|
Michael Hallager wrote:
Each modem can have their own, independent DialStringRules (dialruels).I would like all outgoing national-only calls on one-only of my lines to dial a prefix.
National calls are identified in the batch file by a leading '0' then 3, 4, 6, 7 or 9 - before the 7 digit phone number.
Remember, I only want this to apply to one of my modems.
I have read the relevant man page and I can't find anything useful-
http://hylafax.sourceforge.net/man/dialrules.php
I want any number starting with 03, 04, 06, 07 or 09 (followed by the 7 digit phone number) going through ttyD000 to dial a prefix.
! $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
^03 = 001103
^04 = 001104
^06 = 001106
^07 = 001107
^09 = 001109
]