2 #---------------------------------------------------------------------------
4 # unknown_incoming - script for isdnd
5 # -----------------------------------
7 # $FreeBSD: src/etc/isdn/unknown_incoming,v 1.1.2.1 2001/08/01 20:34:38 obrien Exp $
8 # $DragonFly: src/etc/isdn/unknown_incoming,v 1.2 2003/06/17 04:24:47 dillon Exp $
10 # last edit-date: [Wed Jan 10 13:40:36 2001]
12 # This script may be configured to be called by isdnd when an
13 # unknown incoming call is received. In case the destination
14 # telephone number is available, it sends mail with the time,
15 # source and destination numbers to a configurable address.
17 # For this to work, and entry like this:
19 # regexpr = "<unknown> incoming call from"
20 # regprog = unknown_incoming
22 # is needed in the system section of /etc/isdn/isdnd.rc.
24 # This script has to be configured to the sites needs, look
25 # for the comment lines start with "configure:"
27 #---------------------------------------------------------------------------
29 # configure: who shall receive the mail
32 from
=`echo $* | awk '{print $6}'`
33 to
=`echo $* | awk '{print $8}'`
34 test=`echo $* | awk '{print $9}'`
35 ctrl
=`echo $* | awk '{print $10}'`
40 # configure: list of destination numbers to ignore
42 "NotAvailable" ) exit 0 ;;
43 "00401234567"* ) exit 0 ;;
44 "00407654321" ) exit 0 ;;
47 # configure: how to name the line on which this was received
58 line
="controller is $ctrl"
62 line
="test is $test, controller is $ctrl"
65 cat << ENDOFDATA | mail -s "isdnd: unknown incoming telephone call" $mailaddr
67 Unknown incoming telephone call recognized: