From c8d8d3708c5ca9a86ca721668a91fb7cf79f7985 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 9 Feb 2010 00:42:47 +0000 Subject: [PATCH] fixed reporting voip lines in phones and neatened colums on phones screen a little git-svn-id: https://svn.code.sf.net/p/freetel/code@143 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui/README.txt | 9 +++++++-- mini-asterisk-gui/cgi-bin/phones.pl | 12 ++++++++---- mini-asterisk-gui/cgi-bin/phones.sh | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mini-asterisk-gui/README.txt b/mini-asterisk-gui/README.txt index ec9e4e93..e2e9cb07 100644 --- a/mini-asterisk-gui/README.txt +++ b/mini-asterisk-gui/README.txt @@ -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 diff --git a/mini-asterisk-gui/cgi-bin/phones.pl b/mini-asterisk-gui/cgi-bin/phones.pl index 56f3534c..6f874a8a 100644 --- a/mini-asterisk-gui/cgi-bin/phones.pl +++ b/mini-asterisk-gui/cgi-bin/phones.pl @@ -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 () { - if (/^([0-9]*)[\s\/].*(OK)/) { +while () { + + # 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 ' '; -print ""; -print "Add IP Phone"; +print ""; +print "Add IP Phone"; $tool_tip = "onMouseOver=\"popUp(event,'phone_lines')\" onmouseout=\"popUp(event,'phone_lines')\""; diff --git a/mini-asterisk-gui/cgi-bin/phones.sh b/mini-asterisk-gui/cgi-bin/phones.sh index 06d3b92c..8439124d 100644 --- a/mini-asterisk-gui/cgi-bin/phones.sh +++ b/mini-asterisk-gui/cgi-bin/phones.sh @@ -58,6 +58,7 @@ cat < + -- 2.25.1

Phone System