2 #---------------------------------------------------------------------------
4 # tell called and calling numbers answer script for i4b isdnd
5 # -----------------------------------------------------------
9 # last edit-date: [Thu May 20 11:45:15 1999]
11 #---------------------------------------------------------------------------
14 #FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS
15 #LIBDIR=/usr/local/lib/isdn
17 LIBDIR=/usr/share/isdn
19 LOGFILE=/tmp/answer.log
20 NCALLFILE=$VARDIR/ncall
26 set -- `getopt D:d:s: $*`
30 echo 'Usage: answer -D device -d destination -s source'
65 if [ $DF -eq 0 -o $dF -eq 0 -o $sF -eq 0 ]
67 echo 'Usage: answer -D device -d destination -s source'
71 echo "answer: device $DEVICE destination $DEST source $SRC " >>$LOGFILE
73 if [ -f $LIBDIR/beep.al ]
75 dd of=$DEVICE if=$LIBDIR/beep.al bs=2k >/dev/null 2>&1
78 # tell the caller the number he is calling from
81 LENGTH=`expr $SRC : '.*'`
85 DIGIT=`echo $SRC | cut -c $POS`
86 /bin/dd of=$DEVICE if=$LIBDIR/$DIGIT.al bs=2k >/dev/null 2>&1
88 if [ $POS -gt $LENGTH ]
94 if [ -f $LIBDIR/beep.al ]
96 dd of=$DEVICE if=$LIBDIR/beep.al bs=2k >/dev/null 2>&1