(RADIATOR) PreClientHook

Michael michael at swtch.com.au
Mon Oct 1 06:42:25 CDT 2001


Hi all,

I am trying to work out how to use the PreClientHook to check that the
customer
is dialling the correct number, the idea being to prevent them accidentally
dialling
the wrong number and incurring hefty call charges.

here is what I am thinking of (I know bugger all about Perl).


#Perl Script
my $dialled = ${$_[0]}->get_attr(`Called-Station-Id');
my $callfrom = ${$_[0]}->get_attr(`Calling-Station-Id');
#Compare numbers to list and allow or deny logon

The way I was thinking to do this would be to have a file that is named as
the dial
up number for the region.
So we would have a buch of files named the number the customer should
call. So the script could simply go and check in a file called $dialled for
a
partial number $callfrom (first 4 digits) if it is not there deny logon and
log it. This
should make it easy to add more dial up locations later. If we go into a new
area
we simply need more files named for $dialled.

Would this work? What does the script need to return to prevent or allow
logon?

Michael



===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list