summaryrefslogtreecommitdiffstats
path: root/etc/isdn
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>1999-01-10 14:30:53 +0000
committerhm <hm@FreeBSD.org>1999-01-10 14:30:53 +0000
commit7694f216801b3a5fc116cc0959125be152f955a9 (patch)
treecad15090903cd7853ccb87800ced41e9b59a6c87 /etc/isdn
parent6f74dc01b4fb3d0b3688762c7347a90d768ac105 (diff)
downloadFreeBSD-src-7694f216801b3a5fc116cc0959125be152f955a9.zip
FreeBSD-src-7694f216801b3a5fc116cc0959125be152f955a9.tar.gz
add directory /etc/isdn and populate it
Diffstat (limited to 'etc/isdn')
-rw-r--r--etc/isdn/Makefile21
-rwxr-xr-xetc/isdn/answer103
-rw-r--r--etc/isdn/isdnd.rates.D63
-rw-r--r--etc/isdn/isdnd.rates.F152
-rw-r--r--etc/isdn/isdnd.rc257
-rw-r--r--etc/isdn/isdntel.alias21
-rwxr-xr-xetc/isdn/isdntel.sh105
-rwxr-xr-xetc/isdn/record106
-rwxr-xr-xetc/isdn/tell92
-rwxr-xr-xetc/isdn/tell-record94
10 files changed, 1014 insertions, 0 deletions
diff --git a/etc/isdn/Makefile b/etc/isdn/Makefile
new file mode 100644
index 0000000..1e33c28
--- /dev/null
+++ b/etc/isdn/Makefile
@@ -0,0 +1,21 @@
+# $Id:$
+
+I4BETCPROG= answer \
+ isdntel.sh \
+ record \
+ tell \
+ tell-record
+
+I4BETCFILE= isdnd.rates.D \
+ isdnd.rates.F \
+ isdnd.rc \
+ isdntel.alias
+
+install:
+ for i in ${I4BETCPROG} ; do \
+ ${INSTALL} -c -o root -g wheel -m 700 $$i ${DESTDIR}/etc/isdn ; \
+ done ; \
+ for i in ${I4BETCFILE} ; do \
+ ${INSTALL} -c -o root -g wheel -m 600 $$i ${DESTDIR}/etc/isdn ; \
+ done
+
diff --git a/etc/isdn/answer b/etc/isdn/answer
new file mode 100755
index 0000000..b785fc0
--- /dev/null
+++ b/etc/isdn/answer
@@ -0,0 +1,103 @@
+#!/bin/sh
+#---------------------------------------------------------------------------
+#
+# answer script for i4b isdnd
+# ---------------------------
+#
+# $Id: answer,v 1.3 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:20 1998]
+#
+#---------------------------------------------------------------------------
+VARDIR=/var/isdn
+LIBDIR=/usr/local/lib/isdn
+LOGFILE=/tmp/answer.log
+NCALLFILE=$VARDIR/ncall
+DATE=`date +%d%H`
+DF=0
+dF=0
+sF=0
+
+set -- `getopt D:d:s: $*`
+
+if test $? != 0
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+for i
+do
+ case "$i"
+ in
+ -D)
+ DEVICE=$2
+ DF=1
+ shift
+ shift
+ ;;
+ -d)
+ DEST=$2
+ dF=1
+ shift
+ shift
+ ;;
+ -s)
+ SRC=$2
+ sF=1
+ shift
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+done
+
+echo "" >>$LOGFILE
+
+if [ $DF -eq 0 -o $dF -eq 0 -o $sF -eq 0 ]
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+echo "answer: device $DEVICE destination $DEST source $SRC " >>$LOGFILE
+
+if [ -f $NCALLFILE ]
+then
+ NCALL=`cat $NCALLFILE`
+else
+ NCALL=0
+fi
+
+NCALL=`printf "%.4d" $NCALL`
+
+echo Date: `date` >> $VARDIR/I.$NCALL.$DATE
+
+if [ "$SRC" != "" ]
+then
+ echo "From: $SRC" >> $VARDIR/I.$NCALL.$DATE
+fi
+
+if [ "$DEST" != "" ]
+then
+ echo "To: $DEST" >> $VARDIR/I.$NCALL.$DATE
+fi
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k # >/dev/null 2>&1
+fi
+
+if [ -f $LIBDIR/msg.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/msg.g711a bs=2k # >/dev/null 2>&1
+ if [ -f $LIBDIR/beep.g711a ]
+ then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k # >/dev/null 2>&1
+ fi
+fi
+
+echo `expr $NCALL + 1` >$NCALLFILE
diff --git a/etc/isdn/isdnd.rates.D b/etc/isdn/isdnd.rates.D
new file mode 100644
index 0000000..63fb84e
--- /dev/null
+++ b/etc/isdn/isdnd.rates.D
@@ -0,0 +1,63 @@
+#---------------------------------------------------------------------------
+#
+# i4b - Deutsche Telekom charging rates config file
+# -------------------------------------------------
+#
+# $Id: isdnd.rates.D,v 1.4 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:48 1998]
+#
+# -hm updated to reflect last Telekom changes as of 1.7.97
+# -hm updated to reflect last Telekom changes as of 1.3.98
+#
+#---------------------------------------------------------------------------
+#
+# reference: http://www.telekom.de/aktuell/tarife98
+#
+#---------------------------------------------------------------------------
+#
+# Syntax:
+# -------
+# rate-code: ra0 = CityCall, ra1 = RegioCall, ra2 = GermanCall
+# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc.
+# Rate: start_hour.minutes-end_hour.minutes:period in seconds
+#
+#------------------------------------------------------------------------------
+#
+#=================== CityCall =========================================================================
+#
+#rate-code Day rate1 rate2 rate3 rate4 rate5
+#--------- --- --------------- --------------- --------------- --------------- ----------------
+ra0 0 00.00-05.00:240 05.00-21.00:150 21.00-24.00:240
+ra0 1 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240
+ra0 2 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240
+ra0 3 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240
+ra0 4 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240
+ra0 5 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240
+ra0 6 00.00-05.00:240 05.00-21.00:150 21.00-24.00:240
+#
+#=================== RegioCall ======================================================================================================
+#
+#rate-code Day rate1 rate2 rate3 rate4 rate5 rate6 rate7
+#--------- --- --------------- --------------- --------------- --------------- --------------- --------------- --------------
+ra1 0 00.00-05.00:60 05.00-21.00:45 21.00-24.00:60
+ra1 1 00.00-02.00:60 02.00-05.00:120 05.00-09.00:45 09.00-12.00:26 12.00-18.00:30 18.00-21.00:45 21.00-24.00:60
+ra1 2 00.00-02.00:60 02.00-05.00:120 05.00-09.00:45 09.00-12.00:26 12.00-18.00:30 18.00-21.00:45 21.00-24.00:60
+ra1 3 00.00-02.00:60 02.00-05.00:120 05.00-09.00:45 09.00-12.00:26 12.00-18.00:30 18.00-21.00:45 21.00-24.00:60
+ra1 4 00.00-02.00:60 02.00-05.00:120 05.00-09.00:45 09.00-12.00:26 12.00-18.00:30 18.00-21.00:45 21.00-24.00:60
+ra1 5 00.00-02.00:60 02.00-05.00:120 05.00-09.00:45 09.00-12.00:26 12.00-18.00:30 18.00-21.00:45 21.00-24.00:60
+ra1 6 00.00-05.00:60 05.00-21.00:45 21.00-24.00:60
+#
+#================== GermanCall ======================================================================================================
+#
+#rate-code Day rate1 rate2 rate3 rate4 rate5 rate 6 rate7
+#--------- --- --------------- --------------- -------------- --------------- -------------- --------------- ----------------
+ra2 0 00.00-05.00:36 05.00-21.00:30 21.00-24.00:36
+ra2 1 00.00-02.00:36 02.00-05.00:120 05.00-09.00:22 09.00-12.00:13 12.00-18.00:14 18.00-21.00:22 21.00-24.00:36
+ra2 2 00.00-02.00:36 02.00-05.00:120 05.00-09.00:22 09.00-12.00:13 12.00-18.00:14 18.00-21.00:22 21.00-24.00:36
+ra2 3 00.00-02.00:36 02.00-05.00:120 05.00-09.00:22 09.00-12.00:13 12.00-18.00:14 18.00-21.00:22 21.00-24.00:36
+ra2 4 00.00-02.00:36 02.00-05.00:120 05.00-09.00:22 09.00-12.00:13 12.00-18.00:14 18.00-21.00:22 21.00-24.00:36
+ra2 5 00.00-02.00:36 02.00-05.00:120 05.00-09.00:22 09.00-12.00:13 12.00-18.00:14 18.00-21.00:22 21.00-24.00:36
+ra2 6 00.00-05.00:36 05.00-21.00:30 21.00-24.00:36
+#
+#================== EOF ============================================================================================================
diff --git a/etc/isdn/isdnd.rates.F b/etc/isdn/isdnd.rates.F
new file mode 100644
index 0000000..6dc32f5
--- /dev/null
+++ b/etc/isdn/isdnd.rates.F
@@ -0,0 +1,152 @@
+#---------------------------------------------------------------------------
+#
+# i4b - Tarifs France Telecom
+# ---------------------------
+#
+# $Id: isdnd.rates.F,v 1.1 1998/03/19 19:09:28 hm Exp $
+#
+# last edit-date: [Thu Mar 19 20:05:18 1998]
+#
+# -hm got from Aurelien Bargy <dj@dial.oleane.com>
+#
+#---------------------------------------------------------------------------
+#
+# a jour au 1.10.97
+# Aurelien Bargy - 18.03.97
+#
+# I wrote a rates file for France. It is rather approximative
+# because some time ago France Telecom decided to abandon the charging
+# units system. The problem is, on ISDN lines charging units are still
+# used for the aocd system, even as it gives a completely false price
+# for a communication, so "abandoning" the msg_charging_unit system for
+# French users of i4b is not a good idea :))
+#
+#---------------------------------------------------------------------------
+#
+# Syntax:
+# -------
+# rate-code: ra0 = local ; ra1 = zone 1 ; ra2 = zone 2...
+# plus quelques tarifs internationaux
+# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc.
+# Rate: start_hour.minutes-end_hour.minutes:period in seconds
+#
+#------------------------------------------------------------------------
+#
+#========================== Communications locales ======================
+#rate-code Day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra0 0 00.00-24.00:317
+ra0 1 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317
+ra0 2 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317
+ra0 3 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317
+ra0 4 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317
+ra0 5 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317
+ra0 6 00.00-08.00:317 08.00-12.00:158 12.00-24.00:317
+#
+#
+#
+#================== Zone 1 : < 25 km ==================================
+#
+#rate-code Day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra1 0 00.00-24.00:222
+ra1 1 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222
+ra1 2 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222
+ra1 3 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222
+ra1 4 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222
+ra1 5 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222
+ra1 6 00.00-08.00:222 08.00-12.00:111 12.00-24.00:222
+#
+#
+#
+#================== Zone 2 : 25-30 km =================================
+#
+#rate-code Day rate1 rate2 rate3
+#--------- --- --------------- --------------- --------------
+ra2 0 00.00-24.00:148
+ra2 1 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148
+ra2 2 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148
+ra2 3 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148
+ra2 4 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148
+ra2 5 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148
+ra2 6 00.00-08.00:148 08.00-12.00:74 12.00-24.00:148
+#
+#=================== Zone 3 : 30-52 km ================================
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra3 0 00.00-24.00:94
+ra3 1 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94
+ra3 2 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94
+ra3 3 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94
+ra3 4 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94
+ra3 5 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94
+ra3 6 00.00-08.00:94 08.00-12.00:47 12.00-24.00:94
+#
+#
+#=================== Zone 4 : > 52 km =================================
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra4 0 00.00-24.00:78
+ra4 1 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78
+ra4 2 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78
+ra4 3 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78
+ra4 4 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78
+ra4 5 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78
+ra4 6 00.00-08.00:78 08.00-12.00:39 12.00-24.00:78
+#
+#
+#=================== INTERNATIONAL : Allemagne ========================
+# (pour appeler Hellmuth)
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra5 0 00.00-24.00:27
+ra5 1 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27
+ra5 2 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27
+ra5 3 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27
+ra5 4 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27
+ra5 5 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27
+ra5 6 00.00-08.00:27 08.00-12.00:21 12.00-24.00:27
+#
+#
+#=================== INTERNATIONAL : Pays-Bas ==========================
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra6 0 00.00-24.00:25
+ra6 1 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25
+ra6 2 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25
+ra6 3 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25
+ra6 4 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25
+ra6 5 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25
+ra6 6 00.00-08.00:25 08.00-12.00:20 12.00-24.00:25
+#
+#
+#=================== INTERNATIONAL : Portugal ===========================
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra7 0 00.00-24.00:22
+ra7 1 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22
+ra7 2 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22
+ra7 3 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22
+ra7 4 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22
+ra7 5 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22
+ra7 6 00.00-08.00:22 08.00-12.00:18 12.00-24.00:22
+#
+#
+#=================== INTERNATIONAL : USA/Canada ========================
+#
+#rate-code day rate1 rate2 rate3
+#--------- --- --------------- --------------- ---------------
+ra8 0 00.00-24.00:25
+ra8 1 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25
+ra8 2 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25
+ra8 3 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25
+ra8 4 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25
+ra8 5 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25
+ra8 6 00.00-24.00:25
+#
+#================== EOF ==============================================
diff --git a/etc/isdn/isdnd.rc b/etc/isdn/isdnd.rc
new file mode 100644
index 0000000..fa34de7
--- /dev/null
+++ b/etc/isdn/isdnd.rc
@@ -0,0 +1,257 @@
+#------------------------------------------------------------------------------
+#
+# example of a configuration file for the isdn daemon
+# ---------------------------------------------------
+#
+# $Id: isdnd.rc,v 1.11 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:57 1998]
+#
+# NOTICE:
+# =======
+# This configuration file is an EXAMPLE only and MUST be edited
+# carefully to get the desired results!
+#
+# Please read the "isdnd.rc" manual page (execute "man isdnd.rc")
+# for reference !
+#
+#------------------------------------------------------------------------------
+
+#==============================================================================
+# SYSTEM section: isdnd global configuration parameters
+#==============================================================================
+system
+
+# accounting
+# ----------
+
+acctall = on # generate info for everything
+acctfile = /var/log/isdnd.acct # name & location of accounting file
+useacctfile = yes # generate accouting info to file
+
+# monitor
+# -------
+
+monitor-allowed = yes # global switch: monitor on/off
+monitor-port = 451 # default monitor TCP port
+
+# Monitor rights are granted due to the most specific host/net spec, i.e. in
+# the example below host 192.168.1.2 will have the rights specified on that
+# line, even so it belongs to net 192.168.1.0/24 as well.
+#
+# A monitor specification may either be:
+#
+# - the name of a local (UNIX-domain) socket; this MUST start with a "/"
+monitor = "/var/run/isdn-monitor"
+monitor-access = fullcmd
+monitor-access = channelstate, logevents
+monitor-access = callin, callout
+#
+# - a dotted-quad host spec
+monitor = "192.168.1.2"
+monitor-access = restrictedcmd, channelstate, callin, callout
+#
+# - a dotted-quad net spec with "/len" (CIDR-style) netmask spec
+monitor = "192.168.1.0/24"
+monitor-access = restrictedcmd, channelstate, callin, callout
+#
+# - a resolveable host name
+monitor = "rumolt"
+monitor-access = restrictedcmd, channelstate, callin, callout
+#
+# - a resolveable net name with "/len" netmask (s.a.) appended
+monitor = "up-vision-net/24"
+monitor-access = restrictedcmd, channelstate, callin, callout
+
+# ratesfile
+# ---------
+
+ratesfile = /etc/isdn/isdnd.rates # name & location of rates file
+
+# regular expression pattern matching
+# -----------------------------------
+
+#regexpr = "connected.*KTS" # look for matches in log messages
+#regprog = connectKTS # execute program when match is found
+
+# realtime priority section
+# -------------------------
+
+rtprio = 25 # modify isdnd's process priority
+
+#==============================================================================
+# entry section: IP over ISDN example - i call back the remote end
+#==============================================================================
+entry
+
+name = I4BIP # name for reference. This name will
+ # be used in the logfile to identfy
+ # this entry.
+
+ # the network or telephone device
+ # the data traffic should be routed to:
+usrdevicename = ipr # ipr, isp, tel, rbch
+usrdeviceunit = 0 # unit number
+
+ # the ISDN controller number to be
+ # used for this entry:
+isdncontroller = 0 # contoller to use or -1 to use any
+isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any
+
+ # incoming only, outgoing only or both:
+direction = inout # in, out, inout
+
+ # numbers used to verify a DIAL IN:
+local-phone-incoming = 321 # this is my number
+remote-phone-incoming = 0123456789 # this one can call in
+
+ # numbers used at DIAL OUT time:
+local-phone-dialout = 321 # this is my number
+remote-phone-dialout = 00123456789 # i call this remote number
+
+ # in case i have several remote
+ # telephone numbers specified, this
+ # is used to specify which one is
+ # used next on dial fail or retry:
+remdial-handling = first # first, last or next
+
+ # what happenes if someone dials in:
+dialin-reaction = callback # accept, reject, ignore, answer, callback
+
+ # normal dialout or do i call back:
+dialout-type = normal # normal / calledback
+
+callbackwait = 1 # no of secs to wait before calling back
+
+ # type of protocol on the B-channel:
+ # hdlc must be specified for IP (the
+ # ipr and isp drivers), raw must be
+ # specified for telephone answering
+b1protocol = hdlc # hdlc, raw
+
+ # shorthold mode and idle time
+ # configuration:
+ratetype = 0 # ratesfile entry to use
+unitlength = 90 # unitlength to assume
+unitlengthsrc = rate # none, rate, cmdl, conf, aocd
+idletime-incoming = 120 # incoming call idle timeout
+idletime-outgoing = 60 # outgoing call idle timeout
+earlyhangup = 5 # time to hangup before an expected
+ # next charging unit will occur
+
+ # retry and recovery parameters
+dialretries = 3 # # of dial retries
+dialrandincr = off # random dial increment time
+recoverytime = 5 # time to wait between 2 dial tries
+usedown = off # set i/f down
+downtries = 5 # retry cycles before set down
+downtime = 30 # time to be in down before going up
+
+connectprog = "ip-up" # run /etc/isdn/ip-up when an interface
+ # has established its network connection.
+ # example parameters are:
+ # /etc/isdn/ip-up -d isp0 -f up -a 192.110.12.14
+disconnectprog = "ip-down" # like connectprog, but run after the connection
+ # is closed (ISDN layer down). The actual
+ # interface address might not be known
+ # any more. example parameters are:
+ # /etc/isdn/ip-up -d isp0 -f down -a 0.0.0.0
+
+#==============================================================================
+# entry section: IP over ISDN example - i am called back by the remote end
+#==============================================================================
+entry
+
+name = I4BIP1 # name for reference
+
+usrdevicename = ipr # ipr, tel, rbch
+usrdeviceunit = 1 # unit number
+
+isdncontroller = 0 # contoller to use or -1 to use any
+isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any
+
+ # numbers used to DIAL OUT
+remote-phone-dialout = 00401234567 # remote number to dial
+local-phone-dialout = 38 # our number to tell remote
+
+ # numbers used to verify at DIAL IN
+local-phone-incoming = 38 # we take calls for this local number
+remote-phone-incoming = 00401234567 # we take calls from this remote machine
+
+b1protocol = hdlc # hdlc, raw
+
+ratetype = 0 # city
+unitlength = 90 # default unit length
+earlyhangup = 5 # safety zone
+unitlengthsrc = aocd # none, rate, cmdl, conf, aocd
+
+dialin-reaction = accept # accept, reject, ignore, anwer, callback
+
+dialout-type = calledback # normal or calledback
+
+dialretries = 3
+recoverytime = 3
+calledbackwait = 20
+dialrandincr = off
+
+usedown = off
+downtries = 2
+downtime = 30
+
+idletime-incoming = 300
+idletime-outgoing = 30
+
+#==============================================================================
+# entry section: answering machine example
+#==============================================================================
+entry
+
+name = I4BTEL # name for reference
+usrdevicename = tel # ipr, tel, rbch
+usrdeviceunit = 0 # unit number
+
+isdncontroller = 0 # contoller to use or -1 to use any
+isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any
+
+ # numbers used to verify at DIAL IN
+local-phone-incoming = 456 # this is my number
+remote-phone-incoming = * # anyone can call in
+
+dialin-reaction = answer # accept, reject, ignore, answer
+
+answerprog = answer # program to run
+
+b1protocol = raw # hdlc, raw
+
+idletime-incoming = 5 # 5 seconds idle timeout
+
+#=======================================================================
+# entry section: PPP example
+#======================================================================
+entry
+name = I4BPPP
+usrdevicename = isp
+usrdeviceunit = 0
+isdncontroller = 0
+isdnchannel = -1
+local-phone-incoming = 1234
+remote-phone-incoming = 5678
+local-phone-dialout = 1234
+remote-phone-dialout = 5678
+remdial-handling = first
+dialin-reaction = accept
+dialout-type = normal
+b1protocol = hdlc
+idletime-incoming = 240
+idletime-outgoing = 30
+ratetype = 0
+unitlength = 90
+unitlengthsrc = rate
+dialretries = 3
+dialrandincr = on
+recoverytime = 25
+usedown = off
+downtries = 2
+downtime = 30
+
+# EOF #########################################################################
diff --git a/etc/isdn/isdntel.alias b/etc/isdn/isdntel.alias
new file mode 100644
index 0000000..bc1cc3c
--- /dev/null
+++ b/etc/isdn/isdntel.alias
@@ -0,0 +1,21 @@
+#---------------------------------------------------------------------------
+#
+# alias file for the isdntel(1) application
+# -----------------------------------------
+#
+# $Id: isdntel.alias,v 1.4 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:06:03 1998]
+#
+# -hm cleanup for release
+#
+#
+# the format is simple: the number beginning in column one followed
+# by one or more spaces or tabs. The rest of the line is taken as
+# and alias string for the number. Comment lines start with a "#".
+#
+#---------------------------------------------------------------------------
+123 alias for 123
+456 alias for 456
+789 alias for 789
+
diff --git a/etc/isdn/isdntel.sh b/etc/isdn/isdntel.sh
new file mode 100755
index 0000000..6179908
--- /dev/null
+++ b/etc/isdn/isdntel.sh
@@ -0,0 +1,105 @@
+#!/bin/sh
+#---------------------------------------------------------------------------
+#
+# isdn telephone answering
+# -------------------------
+#
+# $Id: isdntel.sh,v 1.7 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:26 1998]
+#
+# -hm answering script
+# -hm curses interface
+# -hm update for release
+#
+#---------------------------------------------------------------------------
+LIBDIR=/usr/local/lib/isdn
+VARDIR=/var/isdn
+DEVICE=/dev/i4btel0
+
+# sounds
+MESSAGE=$LIBDIR/msg.g711a
+BEEP=$LIBDIR/beep.g711a
+
+# dd options
+SKIP=25
+
+# max message size
+MAXMSIZ=100
+
+# src and dst telephone numbers
+src=
+dst=
+
+# current date
+DATE=`date`
+
+# check if directory exists
+if [ ! -d $VARDIR ]
+then
+ mkdir $VARDIR
+fi
+
+# get options
+set -- `/usr/bin/getopt D:d:s: $*`
+
+if [ $? != 0 ]
+then
+ echo "usage2: play -D device -d <dest-telno> -s <src-telno>"
+ exit 1
+fi
+
+# process options
+for i
+do
+ case $i in
+ -D)
+ DEVICE=$2; shift; shift;
+ ;;
+ -d)
+ dst=$2; shift; shift;
+ ;;
+ -s)
+ src=$2; shift; shift;
+ ;;
+ --)
+ shift; break;
+ ;;
+ esac
+done
+
+# this is a __MUST__ in order to use the fullscreen inteface !!!
+
+FILEDATE=`date \+%y%m%d%H%M%S`
+
+# echo message to phone
+if [ -f $MESSAGE ]
+then
+ /bin/dd of=$DEVICE if=$MESSAGE bs=2k >/dev/null 2>&1
+fi
+
+# echo beep to phone
+if [ -f $BEEP ]
+then
+ /bin/dd of=$DEVICE if=$BEEP bs=2k >/dev/null 2>&1
+fi
+
+# start time
+START=`date \+%s`
+
+# get message from caller
+/bin/dd if=$DEVICE of=$VARDIR/$FILEDATE-$dst-$src skip=$SKIP bs=2k count=$MAXMSIZ >/dev/null 2>&1
+
+# end time
+END=`date \+%s`
+
+# duration
+TIME=`expr $END - $START`
+
+# save recorded message
+if [ -f $VARDIR/$FILEDATE-$dst-$src ]
+then
+ mv $VARDIR/$FILEDATE-$dst-$src $VARDIR/$FILEDATE-$dst-$src-$TIME
+fi
+
+exit 0
diff --git a/etc/isdn/record b/etc/isdn/record
new file mode 100755
index 0000000..782f0f5
--- /dev/null
+++ b/etc/isdn/record
@@ -0,0 +1,106 @@
+#!/bin/sh
+#---------------------------------------------------------------------------
+#
+# answer and record message script for i4b isdnd
+# ----------------------------------------------
+#
+# $Id: record,v 1.3 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:31 1998]
+#
+#---------------------------------------------------------------------------
+VARDIR=/var/isdn
+LIBDIR=/usr/local/lib/isdn
+LOGFILE=/tmp/answer.log
+NCALLFILE=$VARDIR/ncall
+DATE=`date +%d%H`
+DF=0
+dF=0
+sF=0
+
+set -- `getopt D:d:s: $*`
+
+if test $? != 0
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+for i
+do
+ case "$i"
+ in
+ -D)
+ DEVICE=$2
+ DF=1
+ shift
+ shift
+ ;;
+ -d)
+ DEST=$2
+ dF=1
+ shift
+ shift
+ ;;
+ -s)
+ SRC=$2
+ sF=1
+ shift
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+done
+
+echo "" >>$LOGFILE
+
+if [ $DF -eq 0 -o $dF -eq 0 -o $sF -eq 0 ]
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+echo "answer: device $DEVICE destination $DEST source $SRC " >>$LOGFILE
+
+if [ -f $NCALLFILE ]
+then
+ NCALL=`cat $NCALLFILE`
+else
+ NCALL=0
+fi
+
+NCALL=`printf "%.4d" $NCALL`
+
+echo Date: `date` >> $VARDIR/I.$NCALL.$DATE
+
+if [ "$SRC" != "" ]
+then
+ echo "From: $SRC" >> $VARDIR/I.$NCALL.$DATE
+fi
+
+if [ "$DEST" != "" ]
+then
+ echo "To: $DEST" >> $VARDIR/I.$NCALL.$DATE
+fi
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
+
+if [ -f $LIBDIR/msg.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/msg.g711a bs=2k >/dev/null 2>&1
+fi
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
+
+dd if=$DEVICE of=$VARDIR/R.$NCALL.$DATE bs=2k >/dev/null 2>&1
+
+echo `expr $NCALL + 1` >$NCALLFILE
diff --git a/etc/isdn/tell b/etc/isdn/tell
new file mode 100755
index 0000000..4b29c22
--- /dev/null
+++ b/etc/isdn/tell
@@ -0,0 +1,92 @@
+#!/bin/sh
+#---------------------------------------------------------------------------
+#
+# tell called and calling numbers answer script for i4b isdnd
+# -----------------------------------------------------------
+#
+# $Id: tell,v 1.3 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:36 1998]
+#
+#---------------------------------------------------------------------------
+VARDIR=/var/isdn
+LIBDIR=/usr/local/lib/isdn
+LOGFILE=/tmp/answer.log
+NCALLFILE=$VARDIR/ncall
+DATE=`date +%d%H`
+DF=0
+dF=0
+sF=0
+
+set -- `getopt D:d:s: $*`
+
+if test $? != 0
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+for i
+do
+ case "$i"
+ in
+ -D)
+ DEVICE=$2
+ DF=1
+ shift
+ shift
+ ;;
+ -d)
+ DEST=$2
+ dF=1
+ shift
+ shift
+ ;;
+ -s)
+ SRC=$2
+ sF=1
+ shift
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+done
+
+echo "" >>$LOGFILE
+
+if [ $DF -eq 0 -o $dF -eq 0 -o $sF -eq 0 ]
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+echo "answer: device $DEVICE destination $DEST source $SRC " >>$LOGFILE
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
+
+# tell the caller the number he is calling from
+
+POS=1
+LENGTH=`expr $SRC : '.*'`
+
+while :
+do
+ DIGIT=`echo $SRC | cut -c $POS`
+ /bin/dd of=$DEVICE if=$LIBDIR/$DIGIT.g711a bs=2k >/dev/null 2>&1
+ POS=`expr $POS + 1`
+ if [ $POS -gt $LENGTH ]
+ then
+ break
+ fi
+done
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
diff --git a/etc/isdn/tell-record b/etc/isdn/tell-record
new file mode 100755
index 0000000..9c66c70
--- /dev/null
+++ b/etc/isdn/tell-record
@@ -0,0 +1,94 @@
+#!/bin/sh
+#---------------------------------------------------------------------------
+#
+# tell called and calling numbers answer script for i4b isdnd
+# -----------------------------------------------------------
+#
+# $Id: tell-record,v 1.3 1998/12/18 17:17:57 hm Exp $
+#
+# last edit-date: [Fri Dec 18 18:05:41 1998]
+#
+#---------------------------------------------------------------------------
+VARDIR=/var/isdn
+LIBDIR=/usr/local/lib/isdn
+LOGFILE=/tmp/answer.log
+NCALLFILE=$VARDIR/ncall
+DATE=`date +%d%H`
+DF=0
+dF=0
+sF=0
+
+set -- `getopt D:d:s: $*`
+
+if test $? != 0
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+for i
+do
+ case "$i"
+ in
+ -D)
+ DEVICE=$2
+ DF=1
+ shift
+ shift
+ ;;
+ -d)
+ DEST=$2
+ dF=1
+ shift
+ shift
+ ;;
+ -s)
+ SRC=$2
+ sF=1
+ shift
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ esac
+done
+
+echo "" >>$LOGFILE
+
+if [ $DF -eq 0 -o $dF -eq 0 -o $sF -eq 0 ]
+then
+ echo 'Usage: answer -D device -d destination -s source'
+ exit 1
+fi
+
+echo "answer: device $DEVICE destination $DEST source $SRC " >>$LOGFILE
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
+
+# tell the caller the number he is calling from
+
+POS=1
+LENGTH=`expr $SRC : '.*'`
+
+while :
+do
+ DIGIT=`echo $SRC | cut -c $POS`
+ /bin/dd of=$DEVICE if=$LIBDIR/$DIGIT.g711a bs=2k >/dev/null 2>&1
+ POS=`expr $POS + 1`
+ if [ $POS -gt $LENGTH ]
+ then
+ break
+ fi
+done
+
+if [ -f $LIBDIR/beep.g711a ]
+then
+ dd of=$DEVICE if=$LIBDIR/beep.g711a bs=2k >/dev/null 2>&1
+fi
+
+dd if=$DEVICE of=$VARDIR/recorded.msg bs=2k
OpenPOWER on IntegriCloud