Local Dial Prefixes

So, we have 16 local dial prefixes. We not only have our PBX, but we also have Hylafax+ for the desktop to send faxes.

Often, someone will fax a local number, but not realize that it’s a local number, so they put the area code in… and it fails. 10 times.

So, I built a dialplan for both my PBX and for my Hylafax (instructions below), and I found a nifty site that lists all my local prefixes here: Local calling guide: Search

So, first, in my dialplan for my outbound route, I made the following entries in my dialplan:

(Note: My area code is 931… so 200 is a local prefix…)

… notice that I did BOTH the patterns… 1931200 and 931200 (so as to cover both 10- and 11-digit dialing)

Next… off to Hylafax to fix the dialplan there.
The file that I’m looking for is called “dialrules” and on my system it is in /var/spool/hylafax/etc
Here is a snip of the file (down to the 200 rule)

! 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
^[0-9]{10}$ = ${Country}& ! add 1 if they dialed 10 digits - gb 1-24-17
^[+]${Country}${AreaCode}200[0-9]{4}$ = 200& ! Local call, strip area code

… the last line there essentially says "If you see a country code (added above), followed by my area code, followed by 200 and 4 more digits, then replace it with just 200 & the 4 digits.

… this will turn 9312001234 into 19312001234 then strip it down with the last line to 2001234

Enjoy! I hope this helps someone!