so. wäre das so richtig eingefügt? (das fette ist reinkopiert)
zumindest hab ich das so verstanden.
möchte jetz nur nochmal auf nummer sicher gehen bevor ich weitermache.
rot ist mein provider.
wozu soll der eigentlich gut sein?? also die angabe zum provider.
hier die debug.cfg:
#!/bin/sh
# start telnet deamon with password of web gui
/usr/sbin/telnetd -l /sbin/ar7login
# set hostname to fritz.box
hostname fritz.box
major=`grep tffs /proc/devices`
tffs_major=${major%%tffs}
#write calllog
cat > /var/calllog << 'ENDCALLLOG'
#!/bin/sh
CALLER=${1}
LINE=${3}
if [ -z "${LINE}" ]
then
LINE=${2}
fi
if [ "${LINE}" = "ISDN" ]
then
LINE=${2}
fi
if [ -z "${LINE}" ]
then
LINE=${1}
CALLER=""
fi
sh /var/tmp/parse_telefon.sh "${LINE}" "${CALLER}" &
ENDCALLLOG
# save /var/calllog
mknod /var/flash/calllog c $tffs_major $((0x77))
cp /var/calllog /var/flash/calllog
#CONTACTS
#contact=:anonym;
#contact=0123456:Ich selber;
#contact=0123456:Meine zweite Nummer;
#CONTACTSEND
#LINES
#line=:anonym;
#line=12345:1;
#line=12345:2;
#line=12345:Fax;
#LINESEND
# write send script to file
cat > /var/tmp/callmessage.sh << 'ENDCALLMESSAGE'
#!/bin/sh
caller=${2}
called=${1}
# search name in contact list
name=`cat /var/flash/debug.cfg 2>/dev/null | fgrep "#contact=${caller}:" | sed "s/#contact=${caller}://"`
name=${name%%\;*}
# name not found?
if [ -z "${name}" ]
then
name=${caller}
fi
httpname=`echo "${name}" | sed -e '{s/ /%20/g;s/?/Ae/g;s/÷/Oe/g;s/?/Ue/g;s/?/ae/g;s/?/oe/g;s/?/ue/g;s/?/ss/g;s/&/%26/g;}'`
# search line in line list
theline=`cat /var/flash/debug.cfg 2>/dev/null | fgrep "#line=${called}:" | sed "s/#line=${called}://"`
theline=${theline%%\;*}
# line not found?
if [ -z "${theline}" ]
then
theline=${called}
fi
httptheline=`echo "${theline}" | sed -e '{s/ /%20/g;s/?/Ae/g;s/÷/Oe/g;s/?/Ue/g;s/?/ae/g;s/?/oe/g;s/?/ue/g;s/?/ss/g;s/&/%26/g;}'`
# send information to DBoxes -> TV screen
wget -O /dev/null "http://root:
[email protected]/control/message?nmsg=Eingehender%20Anruf%0AAnrufer%3A%20${httpname}%0ALeitung%3A%20${httptheline}" >/dev/null 2>&1 &
# write log
date +"%d.%m.%y %H:%M:%S | ${caller} ${name}" > /var/tmp/anrufliste.tmp
sed '50,10d' /var/tmp/anrufliste.txt >> /var/tmp/anrufliste.tmp
mv /var/tmp/anrufliste.tmp /var/tmp/anrufliste.txt
sleep 3
killall wget
ENDCALLMESSAGE
# make it executable
chmod +x /var/tmp/callmessage.sh
# write dummy WakeOnCall script
echo "#!/bin/sh" > /var/tmp/woc.sh
make it executable
chmod +x /var/tmp/woc.sh
# write parse_telefon script to file
cat > /var/tmp/parse_telefon.sh << 'ENDPARSETEL'
#!/bin/sh
trap "" SIGCHLD
prefix=1234
caller="$2"
called="$1"
# normalize caller
case ${caller} in
0049*)
caller=0${caller#*0049}
;;
49????????*)
caller=0${caller#*49}
;;
[1-9]????????*)
caller=0${caller}
;;
[1-9]*)
caller=${prefix}${caller}
;;
esac
# exec woc.sh
/var/tmp/woc.sh ${called} ${caller} &
# exec callmessage.sh
/var/tmp/callmessage.sh ${called} ${caller} &
# write anrufliste script to file
mkdir /var/tmp/cgi-bin
cp /usr/www/Arcor/cgi-bin/???* /var/tmp/cgi-bin
mount -o bind /var/tmp/cgi-bin /usr/www/Arcor/cgi-bin
# write anrufliste script to file
cat > /var/tmp/cgi-bin/anrufliste << 'ENDANRUFLISTE'
#!/bin/sh
echo -e "Content-type: text/html; charset=iso-8859-1\n"
echo -e "<html><body>"
echo -e "`cat /var/tmp/anrufliste.txt`"
echo -e "</body></html>"
ENDPARSETEL
# make it executable
chmod +x /var/tmp/parse_telefon.sh