Index: ipk/source.sh4/titanswaptools_callmonitor/var/swap/titanplugins/callmonitor1/fritzbox_msg_new.sh
===================================================================
--- ipk/source.sh4/titanswaptools_callmonitor/var/swap/titanplugins/callmonitor1/fritzbox_msg_new.sh	(revision 18425)
+++ ipk/source.sh4/titanswaptools_callmonitor/var/swap/titanplugins/callmonitor1/fritzbox_msg_new.sh	(revision 18474)
@@ -201,4 +201,5 @@
 loadFritzBook () {
  if [ $usePhoneBook = "1" ]; then
+	 	rm $FRITZBUCH
 	 	if [ ! -f $FRITZBUCH ]; then
 	 	 	# Challenge abholen
@@ -219,6 +220,6 @@
 			SID=`wget -O - --post-data="$POSTDATA" "http://$FRITZBOXIP/cgi-bin/webcm" 2>/dev/null| grep "name=\"sid\"" | head -1 | awk '{match($0,/value="[^"]+"/); print substr($0,RSTART+7,RLENGTH-8)}'`
 			echo "login aufbauen und hashen ende"
+
 			$CURL --data "telcfg:settings/Phonebook/Books/Select=0&getpage=../html/de/menus/menu2.html&var:pagename=fonbuch&sid=$SID&var:menu=fon&var:lang=de" http://$FRITZBOXIP/cgi-bin/webcm  | grep ">TrFon" | sed s/'<script type="text\/javascript">'// | sed s/';<\/script>'// | sed s/'('/'"'/ | sed s/')'/'"'/ > /tmp/curlhelp.tmp
-
 			while read line 
 				do
@@ -232,4 +233,21 @@
 			done < /tmp/curlhelp.tmp
 			rm /tmp/curlhelp.tmp
+
+			if [ ! -f $FRITZBUCH ]; then
+				#testen ob neues Telefonbuch
+				#$CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua > /tmp/test.curl
+				$CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua | grep "<td class=\"tname\">" | sed s/"<td class=\"tname\">"/"\nfritztele<"/ | sed s/">"/"<"/g | sed s/"'"//g | sed s/'"'//g > /tmp/curlhelp.tmp
+				while read line 
+					do
+						art=`echo $line | cut -d'<' -f1`
+						if [ $art == "fritztele" ]; then
+							name=`echo $line | cut -d'<' -f2`
+							nummer=`echo $line | cut -d'<' -f8`
+							echo "$nummer#$name" >> $FRITZBUCH 
+						fi
+					done < /tmp/curlhelp.tmp
+				rm /tmp/curlhelp.tmp
+			fi
+
 		fi
 		cp $FRITZBUCH $FRITZCACHE
