Changeset 42836 for ipk/source.sh4/tools_callmonitor
- Timestamp:
- Sep 27, 2018, 9:37:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/tools_callmonitor/_path_/usr/local/share/titan/plugins/callmonitor1/fritzbox_msg_new.sh
r42829 r42836 206 206 207 207 loadXML(){ 208 #ID="$1"208 209 209 echo "Lese ID: $1" 210 210 $CURL --data "sid=$SID&pbid=$1" http://$FRITZBOXIP:49000/phonebook.lua > /tmp/curlhelp7.tmp … … 213 213 if [[ $E = realName ]]; then 214 214 name=$C 215 #exit216 215 fi 217 216 if [[ $E = number* ]]; then … … 225 224 226 225 loadXMLsh4(){ 227 echo "Lese ID: $1" 226 local IFS=\> 227 echo "Lese ID: $1" 228 228 $CURL --data "sid=$SID&pbid=$1" http://$FRITZBOXIP:49000/phonebook.lua > /tmp/curlhelp7.tmp 229 while read line; do230 X=`echo $line | grep realName | wc -c`231 if [[ $X -gt 0 ]]; then232 #E=`echo $line | cut -d'<' -f2 | cut -d'>' -f1`233 C=`echo $line | cut -d'>' -f2 | cut -d'<' -f1`234 name=$C235 #echo $name229 grep "realName\|number " /tmp/curlhelp7.tmp > /tmp/curlhelp7a.tmp 230 231 while read line E; do 232 C=`echo $E | cut -d'/' -f2` 233 234 if [[ $C = realName ]]; then 235 name=`echo $E | cut -d'<' -f1` 236 236 fi 237 238 X=`echo $line | grep "number type" | wc -c` 239 if [[ $X -gt 0 ]]; then 237 if [[ $C = number ]]; then 240 238 type=`echo $line| cut -d'"' -f2 | sed s/" "//g | sed s/"home"/"privat"/g | sed s/"work"/"geschaeftl."/g | sed s/"mobile"/"mobil"/g ` 241 tel=`echo $ line | cut -d'>' -f2 | cut -d'<' -f1`239 tel=`echo $E | cut -d'<' -f1 | sed s/"+49"/"0"/g| sed s/" "//g` 242 240 echo "$tel#$name->$type" >> $FRITZBUCH 243 241 fi 244 242 245 done < /tmp/curlhelp7 .tmp243 done < /tmp/curlhelp7a.tmp 246 244 }; 247 245 … … 285 283 loadFritzBook () { 286 284 if [ $usePhoneBook = "1" ]; then 287 rm $FRITZBUCH285 if [ -f $FRITZBUCH ]; then rm $FRITZBUCH; fi 288 286 if [ ! -f $FRITZBUCH ]; then 289 287 echo "FritzBook new -> $FRITZBUCH" … … 291 289 loadFritzBook70 292 290 293 rm /tmp/curlhelp1.tmp294 rm /tmp/curlhelp7.tmp 295 291 if [ -f /tmp/curlhelp1.tmp ]; then rm /tmp/curlhelp1.tmp; fi 292 if [ -f /tmp/curlhelp7.tmp ]; then rm /tmp/curlhelp7.tmp; fi 293 if [ -f /tmp/curlhelp7a.tmp ]; then rm /tmp/curlhelp7a.tmp; fi 296 294 fi 297 295 fi
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)