Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] how to block Outgoing Fax based on phone numbers



On Saturday 07 June 2003 12:51 am, you wrote:
> Hi all,
>
> I want to block the outgoing fax based on some numbers. For example , I
> want to block the outgoing fax with phone numbers starting with 911
>

....

> Contents of /var/spool/hylafax/etc/destctrls
> ** Start
> .*911$    RejectNotice = "Calls to emergency numbers are not permitted"
> ** End
>
> If a try to send a fax to a  number like 91123456765, the outgoing fax is
> not getting blocked.
>
> Any pointers would be great help.

I checked 'man destctrls' and saw where you got the example from.  However, 
there is a flaw in the regex you (and the manpage) are using.

Your regex says to match any characters ".*" followed by "911" immediately 
followed by the end of the line.

What say you want is "match 911 at the start of a string, followed by any 
numbers".  That would be:

^911.*$  (actually, the $ is optional in this one)

Given what the manpage says  though, you really want this:
^[+]?911.*$

That says "ignore the leading '+' on canonical numbers if it's there" and then 
match 911 at the start of the string.

So your line (for cut/paste would be:)

^[+]?911.*$    RejectNotice = "Calls to emergency numbers are not permitted"

Hope that helps,
Bill
-- 
Bill Binko
bill@binko.net 

SPAM protected by TMDA (http://tmda.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
  *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services