From: drowe67 Date: Thu, 11 Feb 2010 01:04:05 +0000 (+0000) Subject: system IPs works on x86 and IP04 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=f2afec4fbcf6195ef27de51eca263fd7bba688b3;p=freetel-svn-tracking.git system IPs works on x86 and IP04 git-svn-id: https://svn.code.sf.net/p/freetel/code@154 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/mini-asterisk-gui/README.txt b/mini-asterisk-gui/README.txt index b0b988a7..fcff925d 100644 --- a/mini-asterisk-gui/README.txt +++ b/mini-asterisk-gui/README.txt @@ -283,6 +283,8 @@ link:mini/voiplines.sh.html[Voip Line Screen]. . Help making the web pages look nicer. +. Configuration instructions (even photos) for other IP phones. + [[support]] Support ------- diff --git a/mini-asterisk-gui/cgi-bin/ipphones.sh b/mini-asterisk-gui/cgi-bin/ipphones.sh index f0bf1bd5..e8a593dc 100644 --- a/mini-asterisk-gui/cgi-bin/ipphones.sh +++ b/mini-asterisk-gui/cgi-bin/ipphones.sh @@ -28,6 +28,14 @@ ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\) Bcast.*/\1/p'` cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null if [ $? -eq 0 ]; then ipaddress=`echo $ipaddress | awk '{ print $1 }'` + ipaddress_system=$ipaddress + ipaddress_tooltip=$ipaddress +else + ipaddress_system=`echo $ipaddress | sed -n 's/ /
/p'` + + # make nice tooltips for multiple ip interfaces on some x86 boxes + + ipaddress_tooltip=`echo $ipaddress | sed -n 's/ / or /p'` fi # Construct the web page ------------------------------- @@ -64,16 +72,11 @@ cat < Phone System IP Address: EOF -echo "" -echo $ipaddress | sed -n 's/ /
/p' -echo "" - -# make nice tooltips for multiple ip interfaces on some x86 boxes -ipaddress=`echo $ipaddress | sed -n 's/ / or /p'` +echo "$ipaddress_system" # use perl to construct list of IP phones for us asterisk "-rx sip show peers" 2>/dev/null > sipshowpeers.txt - perl ipphones.pl "$ipaddress" $more + perl ipphones.pl "$ipaddress_tooltip" $more cat < diff --git a/mini-asterisk-gui/cgi-bin/phones.sh b/mini-asterisk-gui/cgi-bin/phones.sh index f433be96..859f2de5 100644 --- a/mini-asterisk-gui/cgi-bin/phones.sh +++ b/mini-asterisk-gui/cgi-bin/phones.sh @@ -38,6 +38,8 @@ ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\) Bcast.*/\1/p'` cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null if [ $? -eq 0 ]; then ipaddress=`echo $ipaddress | awk '{ print $1 }'` +else + ipaddress=`echo $ipaddress | sed -n 's/ /
/p'` fi # Construct the web page ------------------------------- @@ -80,9 +82,7 @@ cat < Phone System IP Address: EOF -echo "" -echo $ipaddress | sed -n 's/ /
/p' -echo "" +echo "$ipaddress" cat <