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] Dialrules



Quoting Thom Paine <thom@darksaber.com>:

> Currently any job submitted from a client addressed to the 519 area
> code is considered local and it is stripping off the +1519. 

Which is the default setup.

> How would I tell it that 294 is long distance and to not remove that?
> Also, can I make a list of long distance codes in the same area code?

If most numbers in this area code are local, it makes sense to (re-)add 
the LD and area code to the number, OTOH, if most calls are LD, you better 
give it a list of numbers to call as local...

> I tried a long distance fax to another area code and it went smooth as
> silk.

Of course, that's also it's default.. :)

Here is one of my setups where two area codes contain local numbers one of 
which is mostly locals while the other is mostly LD. These rules won't 
work with internal 4 digits calls (or anything similar). Also, these rules 
will treat xxx-xxx-xxxx numbers as NA calls and add the missing Country 
code to them. (CanonicalNumber is the same as the beginning of DialString)

DialString := [
[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
^[0-9]{7}$           = +${Country}${Area}& ! otherwise, insert canon form
^[^+]                = +${Country}&  ! otherwise, insert canon form
!
! Now we have the canonical form...
!
^[+]${Country}          = ${LDPrefix}           ! long distance call
^${LDPrefix}514         = 514                   ! Most 514 are local
!
! Long-distance numbers in 514
!
^(51442[568])                   = ${LDPrefix}\1
^(51445[37])                    = ${LDPrefix}\1
^(51455[089])                   = ${LDPrefix}\1
^(51462[046])                   = ${LDPrefix}\1
^(514630)                       = ${LDPrefix}\1
^(51469[4-7])                   = ${LDPrefix}\1
!
! Local numbers in 450
!
^${LDPrefix}(450419)            = \1
^${LDPrefix}(45043[03-57])      = \1
^${LDPrefix}(45047[1-8])        = \1
^${LDPrefix}(45049[12])         = \1
[...more numbers here...]
^${LDPrefix}(45098[08])         = \1
^[+]                    = ${IDPrefix}           ! international call
]


-- 
Patrice Fournier
pfournier@loups.net

____________________ 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@hylafax.org < /dev/null




Project hosted by iFAX Solutions