Section 3 : Running a Server

Q315: Help with etc/dialrules?

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

Help with etc/dialrules?

At our University, we can dial 4 digit numbers to reach internal lines, and must dial 9 to get an external line.

I'd like to be able to use the same rules for sending faxes, and I've read (but not understood) the dialrules manpage, but I'm not sure what I have to change for this to work.

If anyone else has already done this, could you please share the changes with us?

Right now, I'm using something like: sendfax -d Jack@9,9787320 /etc/fstab But I'd like to be able to use: sendfax -d Jack@7320 /etc/fstab (for internal faxes), and: sendfax -d Pizza@9671111 /etc/pizza (for external calls).

You perhaps want to match numbers with more than 7 digits and automatically preprend "9,". If so, then something like
^[0-9]{7,}$	= 9,&
would do the trick I think (use the dialtest program to debug your rules).

 Back to FAQ Index FAQ Index  Next question in List Q316: How these dialrules work? Last updated $Date: 2000/01/06 00:22:04 $.