2 #---------------------------------------------------------------------------
4 # tell called and calling numbers answer script for i4b isdnd
5 # -----------------------------------------------------------
7 # $FreeBSD: src/etc/isdn/tell,v 1.4 1999/09/13 15:44:20 sheldonh Exp $
8 # $DragonFly: src/etc/isdn/tell,v 1.2 2003/06/17 04:24:47 dillon Exp $
10 # last edit-date: [Thu May 20 11:45:15 1999]
12 #---------------------------------------------------------------------------
15 #FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS
16 #LIBDIR=/usr/local/lib/isdn
18 LIBDIR
=/usr
/share
/isdn
20 LOGFILE
=/tmp
/answer.log
21 NCALLFILE
=${VARDIR}/ncall
27 if ! set -- `getopt D:d:s: $*`; then
28 echo 'Usage: answer -D device -d destination -s source'
61 if [ "${DF}" -eq 0 -o "${dF}" -eq 0 -o "${sF}" -eq 0 ]; then
62 echo 'Usage: answer -D device -d destination -s source'
66 echo "answer: device ${DEVICE} destination ${DEST} source ${SRC} " >>${LOGFILE}
68 if [ -r "${LIBDIR}/beep.al
" ]; then
69 dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1
72 # tell the caller the number he is calling from
75 LENGTH=`expr ${SRC} : '.*'`
78 DIGIT=`echo ${SRC} | cut -c ${POS}`
79 /bin/dd of=${DEVICE} if=${LIBDIR}/${DIGIT}.al bs=2k >/dev/null 2>&1
81 if [ "${POS}" -gt "${LENGTH}" ]; then
86 if [ -r "${LIBDIR}/beep.al
" ]; then
87 dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1