2 #---------------------------------------------------------------------------
4 # unknown_incoming - script for isdnd
5 # -----------------------------------
9 # last edit-date: [Wed Jan 10 13:40:36 2001]
11 # This script may be configured to be called by isdnd when an
12 # unknown incoming call is received. In case the destination
13 # telephone number is available, it sends mail with the time,
14 # source and destination numbers to a configurable address.
16 # For this to work, and entry like this:
18 # regexpr = "<unknown> incoming call from"
19 # regprog = unknown_incoming
21 # is needed in the system section of /etc/isdn/isdnd.rc.
23 # This script has to be configured to the sites needs, look
24 # for the comment lines start with "configure:"
26 #---------------------------------------------------------------------------
28 # configure: who shall receive the mail
31 from=`echo $* | awk '{print $6}'`
32 to=`echo $* | awk '{print $8}'`
33 test=`echo $* | awk '{print $9}'`
34 ctrl=`echo $* | awk '{print $10}'`
39 # configure: list of destination numbers to ignore
41 "NotAvailable" ) exit 0 ;;
42 "00401234567"* ) exit 0 ;;
43 "00407654321" ) exit 0 ;;
46 # configure: how to name the line on which this was received
57 line="controller is $ctrl"
61 line="test is $test, controller is $ctrl"
64 cat << ENDOFDATA | mail -s "isdnd: unknown incoming telephone call" $mailaddr
66 Unknown incoming telephone call recognized: