Section 3 : Running a Server

Q319: How do I automatically add a 9 to the fax number?


? Got something to say about this answer? Hit the question mark to invoke the mailer and send your comments to the HylaFAQ maintainers.

Q.
How do I automatically add a 9 to the fax number so to obtain an external line from my switchboard?

A.
Subject: Re: How do I...
From: Nico Kadel-Garcia <raoul@cirl.meei.harvard.edu>
Date: Thu, 22 May 97 19:05:47 EDT

On Thu, 22 May 1997, Joseph Possert wrote:
> Hello,
>
> My Hylafax Modem is on a phone line that requires a 9, prefix to
> dial out. How do I add this automatically. I notices that dialrules
> stuff, but that just filters parts out. How can I automatically
> add the required prefix.

One way is to change the config file for the modem line (config.tty??) -

	ModemDialCmd:      ATDT9W%s       # Dial 9 for PABX, wait for dialtone
But this is not a good solution for several reasons. First, "9W" means dial 9 and wait three seconds, not wait for dialtone. You definitely want "9," instead, to make the dialing faster.

Second, when people need to dial 9 first, they are typically in an office with local extensions. If they want to dial directly to another 3 or 4 number extension without going through the outside lines (because they are disconnected or they cost money), this becomes impossible with this ModemDialCmd. Instead, the last lines of dialrules should look like this:

   ^[+]${Country}       = ${LDPrefix}           ! long distance call
   ^[+]	                = ${IDPrefix}           ! international call
   ^[0-9]{7,}$          = 9,&                   ! add 9 for outside calls
   ]
This will add 9 for numbers with 7 or more digits.

Third, the ModemDialCmd only works for modems configured that way. Dialrules will fix the *site*, and will be there even if you reconfigure the modems.

Nico Garcia
Engineer, CIRL
Mass. Eye and Ear Infirmary
raoul@cirl.meei.harvard.edu


 Back to FAQ Index FAQ Index  Next question in List Q320: Area and Long Distance codes for UK users?
faq@hylafax.org. Last updated $Date: 2000/03/16 03:21:25 $.