fixed reporting voip lines in phones and neatened colums on phones screen a little
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 9 Feb 2010 00:42:47 +0000 (00:42 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 9 Feb 2010 00:42:47 +0000 (00:42 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@143 01035d8c-6547-0410-b346-abe4f91aad63

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

index ec9e4e93dfb56789199bebc2aee238a191076bc3..e2e9cb079584b66b1b3180f9f92e19f0f3d7c140 100644 (file)
@@ -136,8 +136,13 @@ probably OK an on IP0X but not a good idea on an x86.  I am not happy
 with this security model and would appreciate any suggestions on how
 to improve it.
 
-Mini Asterisk uses HTML, CSS, Javascript, CGI, Shell scripting, and
-Perl.
+Mini Asterisk uses the following technologies: HTML, CSS, Javascript,
+CGI, Shell scripting, Perl, Asterisk.  But most of the work is done in
+shell script and HTML, with a little Perl for the text processing.
+
+The msh shell on the IP0X is fairly basic (no functions, several
+quirks).  The shell script has been coded so that it runs OK on the
+IP0X, which is upwards compatable to x86.
 
 [[install]]
 Installation
index 56f3534c9b7f5098167118e459372f913ee75775..6f874a8a783926001b423486a01ce40878ed6fa9 100644 (file)
@@ -87,8 +87,12 @@ my %sip = ();  # SIP IP phone status keyed on sip.conf names (6011,6012 etc)
 my %ipad = (); # IP address of SIP device keyed on sip.conf names
 
 open SIP, "sipshowpeers.txt";
-while (<SIP>) { 
-    if (/^([0-9]*)[\s\/].*(OK)/) {
+while (<SIP>) {
+
+    # just look for 4 digit extensions starting with 6 so we don't
+    # confuse with Voip Line
+    if (/^(6[0-9][0-9][0-9])[\s\/].*(OK)/) {
         $sip{$1} = $2;
        #print "'$1' '$2' $sip{$1}\n";
        $e = $1;
@@ -174,8 +178,8 @@ foreach $s (sort keys %sip) {
 }
 
 print '<tr><td>&nbsp;</td></tr>';
-print "<tr><td onMouseOver=\"popUp(event,'phone_addipphone')\" onmouseout=\"popUp(event,'phone_addipphone')\">";
-print "<a href=\"ipphones.sh\">Add IP Phone</a></td><td></td><td></td><td><input type=\"submit\" value=\"Update Reception\"></td></tr>";
+print "<tr><td colspan=\"2\" onMouseOver=\"popUp(event,'phone_addipphone')\" onmouseout=\"popUp(event,'phone_addipphone')\">";
+print "<a href=\"ipphones.sh\">Add IP Phone</a></td><td></td><td><input type=\"submit\" value=\"Update Reception\"></td></tr>";
 
 $tool_tip = "onMouseOver=\"popUp(event,'phone_lines')\" onmouseout=\"popUp(event,'phone_lines')\"";
 
index 06d3b92cd5dc30cf092c69dd4e18174b442d0b6d..8439124dc5642e93d06b5641d9a7116ee0ff39ce 100644 (file)
@@ -58,6 +58,7 @@ cat <<EOF
     <td valign="top">
 
     <table align="right" width=600>
+    <col width="50" /><col width="150" />
       <tr>
           <td onMouseOver="popUp(event,'phone_system')" onmouseout="popUp(event,'phone_system')" colspan="4" align="left" valign="top"><h2>Phone System</h2></td>
       </tr>