system IPs works on x86 and IP04
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 01:04:05 +0000 (01:04 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 01:04:05 +0000 (01:04 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@154 01035d8c-6547-0410-b346-abe4f91aad63

mini-asterisk-gui/README.txt
mini-asterisk-gui/cgi-bin/ipphones.sh
mini-asterisk-gui/cgi-bin/phones.sh

index b0b988a7f7074e281318807efdd6913e0198546c..fcff925d243bb55ba21a40a3946775ac0d58fe29 100644 (file)
@@ -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
 -------
index f0bf1bd5344b74f5474bc7035cc3b3d4fde5dde2..e8a593dcee24935ca42290174283b6d750e430f1 100644 (file)
@@ -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/ /<br>/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 <<EOF
       <tr onMouseOver="popUp(event,'phone_ipaddress')" onmouseout="popUp(event,'phone_ipaddress')">
          <td colspan="3">Phone System IP Address:</td>
 EOF
-echo "<td>"
-echo $ipaddress | sed -n 's/ /<br>/p'
-echo "</td>"
-
-# make nice tooltips for multiple ip interfaces on some x86 boxes
-ipaddress=`echo $ipaddress | sed -n 's/ / or /p'`
+echo "<td>$ipaddress_system</td>"
 
     # 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 <<EOF
     </table>
index f433be96193e7c14bec083a5d3ae0aa1d27295f6..859f2de5f1173d5cea3096c222523c1d4183904a 100644 (file)
@@ -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/ /<br>/p'`
 fi
 
 # Construct the web page -------------------------------
@@ -80,9 +82,7 @@ cat <<EOF
       <tr onMouseOver="popUp(event,'phone_ipaddress')" onmouseout="popUp(event,'phone_ipaddress')">
          <td colspan="4">Phone System IP Address:</td>
 EOF
-echo "<td>"
-echo $ipaddress | sed -n 's/ /<br>/p'
-echo "</td>"
+echo "<td>$ipaddress</td>"
 cat <<EOF
       </tr>
       <tr><td>&nbsp</td></tr>