maximuss-kw
Neuer User
- Mitglied seit
- 7 Mrz 2006
- Beiträge
- 8
- Punkte für Reaktionen
- 0
- Punkte
- 0
# write contact list
echo ":anonym;
xxxxxxxxxxxxxxxxx;" > /var/tmp/contacts
# write lines list
echo ":anonym;" > /var/tmp/lines
# write reverse lookup script to file
cat > /var/tmp/invers.sh << 'ENDINVERS'
#!/bin/sh
number=$1
wget -q -O /var/tmp/name "http://www.dasoertliche.de/DB4Web/es/oetb2suche/home.htm?kw_invers=${number}&main=Antwort&s=2" 2>/dev/null
while read reverse
do
case ${reverse} in
*Detailansicht*)
name=${reverse#*\>\ }
name=${name%%\<*}
break
;;
esac
done < /var/tmp/name
rm /var/tmp/name
echo "${name}"
ENDINVERS
# make it executable
chmod +x /var/tmp/invers.sh
# write send script to file
cat > /var/tmp/callmessage.sh << 'ENDCALLMESSAGE'
#!/bin/sh
# init var name
name=""
# read params
caller=$2
called=$1
#read contact list
while read contact
do
case ${contact} in
${caller}*)
name=${contact#*:}
name=${name%%\;*}
break
;;
esac
done < /var/tmp/contacts
# name not found?
if [ -z "${name}" ]
then
# do reverse lookup for at www.dasoertliche.de
name=`/var/tmp/invers.sh ${caller}`
# found name?
if [ -n "${name}" ]
then
# add found contact to contacts and debug.cfg
echo "${caller}:${name};" >> /var/tmp/contacts
cat /var/flash/debug.cfg | sed -e "s/\" > \/var\/tmp\/contacts/
${caller}:${name};\" > \/var\/tmp\/contacts/g" > /var/tmp/debug.cfg
else
# add anonymous for contact to contacts and debug.cfg
echo "${caller}:${caller};" >> /var/tmp/contacts
cat /var/flash/debug.cfg | sed -e "s/\" > \/var\/tmp\/contacts/
${caller}:${caller};\" > \/var\/tmp\/contacts/g" > /var/tmp/debug.cfg
fi
cat /var/tmp/debug.cfg > /var/flash/debug.cfg
rm /var/tmp/debug.cfg
fi
# 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;}'`
#init var theline
theline=""
#read lines list
while read thelines
do
case ${thelines} in
${called}*)
theline=${thelines#*:}
theline=${theline%%\;*}
break
;;
esac
done < /var/tmp/lines
# 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;}'`
# send information to DBoxes -> LCD
wget -O /dev/null "http://root:[email protected]/control/lcd?lock=1&clear=1&xpos=5&ypos=20&size=18&font=2&text=${httpname}&update=1" >/dev/null 2>&1 &
sleep 1
wget -O /dev/null "http://root:[email protected]/control/lcd?lock=1&clear=0&xpos=5&ypos=42&size=18&font=2&text=an%20${httptheline}&update=1" >/dev/null 2>&1 &
sleep 10
wget -O /dev/null "http://root:[email protected]/control/lcd?lock=0" >/dev/null 2>&1 &
ENDCALLMESSAGE
# make it executable
chmod +x /var/tmp/callmessage.sh
# write parse_telefon script to file
cat > /var/tmp/parse_telefon.sh << 'ENDPARSETEL'
#!/bin/sh
trap "" SIGCHLD
prefix=
caller=""
called=""
# stdin: output of telefon daemon expected
while read line
do
case ${line} in
*IncomingCall:*)
caller=${line#*caller: \"}
caller=${caller%%\"*}
called=${line#*called: \"}
called=${called%%\"*}
# 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} &
;;
esac
done
ENDPARSETEL
# make it executable
chmod +x /var/tmp/parse_telefon.sh
# wait
sleep 3
# restart telefon daemon piping its output into telefon_parse.sh
if [ -x /var/tmp/parse_telefon.sh ]
then
# stop telefon daemon safely
killall -15 telefon
sleep 3
killall -9 telefon
rm -f /var/run/telefon.pid
sleep 3
telefon 1 a127.0.0.1 | /var/tmp/parse_telefon.sh &
fi
#
# # wait
# sleep 3
# # restart telefon daemon piping its output into telefon_parse.sh
# if [ -x /var/tmp/parse_telefon.sh ]
> then
> # stop telefon daemon safely
> killall -15 telefon
> sleep 3
> killall -9 telefon
> rm -f /var/run/telefon.pid
> sleep 3
> telefon 1 a127.0.0.1 | /var/tmp/parse_telefon.sh &
> fi
killall: telefon: no process killed
telefon: use clock_gettime(CLOCK_MONOTONIC)!
telefon: set initial telefon time from linux time to 10:01 10.03 2006!
# mknod: /var/flash/fx_def: File exists
telefon: WARNING No config file '/var/flash/fx_def' !
telnetd: bind: Address already in use
Mar 10 10:01:19 cltmgr[477]: Now doing actions: ActionMask is 0x100
Mar 10 10:01:21 cltmgr[477]: Now doing actions: ActionMask is 0x100
Mar 10 10:01:21 unknown[1060]:
capiotcp_server - Version 0.1.01.04
TCP/UDP Port = 5031
MaxCntrl = 4
OffsetCntrl = 1
Mar 10 10:01:21 unknown[1060]: csock: using poll
birger.h schrieb:Ist der Server down?
gallert schrieb:der von 1und1? nein
der von meiner box? auch nein
das einzige was rumblinkt ist mein powerled ansonsten is alles dunkel. auf das benutzerprofil der box komm ich ja...aber bekomme keine dsl bestätigung mehr...
wäre ja wenigstens cool wenn ich die box wieder so wie am anfang haben könnte nur hab ich keine ahnung wie?
AlexKidd schrieb:Ich glaube damit warst nicht du gemeint
Sondern http://www.the-construct.com/traymessage/
Sie dir mal die Überschrift des Postes an.
Und zur Info, die Seite kann ich auch nicht erreichen. Also ist sie wahrscheinlich gerade down, ja.