From ee0283416a448559ceac002e24188b7686e73a9e Mon Sep 17 00:00:00 2001 From: drowe67 Date: Wed, 6 Jan 2010 21:16:16 +0000 Subject: [PATCH] testing About page revision git-svn-id: https://svn.code.sf.net/p/freetel/code@100 01035d8c-6547-0410-b346-abe4f91aad63 --- easy-asterisk-gui/Makefile | 15 +- easy-asterisk-gui/about.sh | 81 +++++++ easy-asterisk-gui/ajamindex.html | 379 ------------------------------ easy-asterisk-gui/at-530.html | 4 +- easy-asterisk-gui/extensions.conf | 7 + easy-asterisk-gui/faq.html | 11 + easy-asterisk-gui/ipphones.sh | 14 +- easy-asterisk-gui/login.sh | 2 +- easy-asterisk-gui/menu.html | 19 +- easy-asterisk-gui/network.sh | 14 +- easy-asterisk-gui/phones.pl | 14 +- easy-asterisk-gui/phones.sh | 14 +- easy-asterisk-gui/sip.conf | 2 +- easy-asterisk-gui/tooltips.html | 14 +- 14 files changed, 178 insertions(+), 412 deletions(-) create mode 100644 easy-asterisk-gui/about.sh delete mode 100644 easy-asterisk-gui/ajamindex.html create mode 100644 easy-asterisk-gui/faq.html diff --git a/easy-asterisk-gui/Makefile b/easy-asterisk-gui/Makefile index 2543554b..746b380b 100644 --- a/easy-asterisk-gui/Makefile +++ b/easy-asterisk-gui/Makefile @@ -1,13 +1,12 @@ # Makefile # David Rowe 1 Jan 2010 -# Makefile for easy Asterisk GUI - -TESTIP=192.168.1.150 - -#test: -# rcp set_network.sh get_network.sh root@$(TESTIP):/var/lib/asterisk/scripts -# rcp index.html root@$(TESTIP):/var/lib/asterisk/static-http/ +# +# Makefile for Easy Asterisk GUI +# +# usage: make TESTIP=test.machine.ip|hostname test +# make TESTIP=192.168.1.150 test +# make TESTIP=boris test test: - rcp at-530.html ipphones.pl ipphones.sh ipphones.js voipline.jpg anphone.png phoneline.jpg ipphone.png phones.pl tooltips.html phones.sh phones.js tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin + rcp about.sh at-530.html ipphones.pl ipphones.sh ipphones.js voipline.jpg anphone.png phoneline.jpg ipphone.png phones.pl tooltips.html phones.sh phones.js tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin rcp sip.conf extensions.conf root@$(TESTIP):/etc/asterisk diff --git a/easy-asterisk-gui/about.sh b/easy-asterisk-gui/about.sh new file mode 100644 index 00000000..36d06c50 --- /dev/null +++ b/easy-asterisk-gui/about.sh @@ -0,0 +1,81 @@ +#!/bin/sh -x +# about.sh +# David Rowe 7 Jan 2010 +# About screen for Easy Asterisk GUI + +# check we are logged in + +echo $HTTP_COOKIE | grep "loggedin" > /dev/null +if [ $? -eq 1 ]; then + echo "" + echo "" + echo '' + echo "" + echo "" + exit +fi + +# Construct the web page ------------------------------- + +cat < + + + +EOF + +cat << EOF + +Easy Asterisk - About +EOF + +cat tooltips.html +echo '' +cat banner.html +echo " " +cat menu.html +cat < + +
+ + + +EOF +echo " " +echo " " +cat /proc/version +echo " " +echo " " +ipkg list_installed +echo " " +echo " " +cat /proc/loadav +echo " " +echo " " +uptime +echo " " +echo " " +cat /proc/meminfo +echo " " +echo " " +cat /proc/cmdline +echo " " +echo " " +cat /proc/cpuinfo +echo " " +echo " " +cat /proc/mtd + +

About

 
Easy Asterisk $Revision$
 

cat /proc/version

 

ipkg list_installed

 

cat /proc/loadav

 

uptime

 

cat /proc/meminfo

 

cat /proc/cmdline

 

cat /proc/cpuinfo

 

cat /proc/mtd

+ + + + + + + + +EOF + diff --git a/easy-asterisk-gui/ajamindex.html b/easy-asterisk-gui/ajamindex.html deleted file mode 100644 index e6e078d5..00000000 --- a/easy-asterisk-gui/ajamindex.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - -Easy Asterisk™ GUI - - - - - - - - - - - - - - - - - - -
- - - - - - - - -

Easy Asterisk™ GUI

Username:
Secret:
-
-   -
-
-
- -
- -
- - - - - - - - -
-
StaticDHCP
IP Address:
Netmask:
Gateway:
DNS:
-
-
-
- - Copyright (C) 2006 Digium, Inc. Asterisk and Digium are trademarks of Digium, Inc. - -
- diff --git a/easy-asterisk-gui/at-530.html b/easy-asterisk-gui/at-530.html index 4ae7e08e..686fb703 100644 --- a/easy-asterisk-gui/at-530.html +++ b/easy-asterisk-gui/at-530.html @@ -9,7 +9,7 @@
  • Set Register Username to the phone number (e.g. 6011).
  • Also set Register Password to the phone number (e.g. 6011) and the Phone Number to the phone number (e.g. 6011). -
  • Check the *Enable Register* box. +
  • Check the Enable Register box.
  • Then click on Apply. -
  • Refresh this page to see if the phone is connected to your Phone system. +
  • On your browser refresh this page to see if the phone is connected to your phone system. diff --git a/easy-asterisk-gui/extensions.conf b/easy-asterisk-gui/extensions.conf index 48c59c1f..30aa83d2 100644 --- a/easy-asterisk-gui/extensions.conf +++ b/easy-asterisk-gui/extensions.conf @@ -52,3 +52,10 @@ exten => 6028,1,Dial(SIP/6028) exten => 6029,1,Dial(SIP/6029) exten => 6030,1,Dial(SIP/6030) +;; Pre-configured outgoing Analog group + +exten => _0.,1,Dial(Zap/g1/${EXTEN:1}) + +;; Pre-configured outgoing VOIP line + +exten => _1.,1,Dial(SIP/voip/${EXTEN:1}) diff --git a/easy-asterisk-gui/faq.html b/easy-asterisk-gui/faq.html new file mode 100644 index 00000000..7f146b20 --- /dev/null +++ b/easy-asterisk-gui/faq.html @@ -0,0 +1,11 @@ + +

    FAQ

    +
      +
    1. Transfer a Call

      +
    + +

    Resources and Links

    +A good book on Asterisk is Asterisk - The Future of +Telephony + diff --git a/easy-asterisk-gui/ipphones.sh b/easy-asterisk-gui/ipphones.sh index fccfb08a..6894b941 100644 --- a/easy-asterisk-gui/ipphones.sh +++ b/easy-asterisk-gui/ipphones.sh @@ -3,13 +3,23 @@ # David Rowe 6 Jan 2010 # Dashboard screen for Easy Asterisk GUI +# check we are logged in + +echo $HTTP_COOKIE | grep "loggedin" > /dev/null +if [ $? -eq 1 ]; then + echo "" + echo "" + echo '' + echo "" + echo "" + exit +fi + more=`echo "$QUERY_STRING" | grep -oe "more=[^&?]*" | sed -n "s/more=//p"` ipaddress=`ifconfig eth0 | sed -n 's/.*inet addr:\(.*\) Bcast.*/\1/p'` # Construct the web page ------------------------------- -sh check_loggedin.sh - cat < diff --git a/easy-asterisk-gui/login.sh b/easy-asterisk-gui/login.sh index 3213d685..f1afcd26 100644 --- a/easy-asterisk-gui/login.sh +++ b/easy-asterisk-gui/login.sh @@ -27,7 +27,7 @@ EOF Password: - Default is root/uClinux + Default user/password is root/uClinux diff --git a/easy-asterisk-gui/menu.html b/easy-asterisk-gui/menu.html index d56b597d..ff0bb66a 100644 --- a/easy-asterisk-gui/menu.html +++ b/easy-asterisk-gui/menu.html @@ -1,24 +1,33 @@
    Change your password, Time & time zone, Reset the defaults, Install new software
    Connect the phone system to your network and the Internet
    -
    Set up your phones, phone lines and phone calls
    +
    Lists your phones and phone lines
    Set up your IP phones
    +
    Boring information like software version numbers
    +
    Frequently asked questions and links to further information
    +
    I think you can work this one out....
    + + + - - + + + + + - - + +

     

    About
    Admin
    Network
    FAQ
    IP Phones
    Logout
    Phones
    Logout
    Network
    diff --git a/easy-asterisk-gui/network.sh b/easy-asterisk-gui/network.sh index d57854cb..41853ec0 100644 --- a/easy-asterisk-gui/network.sh +++ b/easy-asterisk-gui/network.sh @@ -3,6 +3,18 @@ # David Rowe 4 Jan 2010 # CGI for Easy Asterisk network GUI +# check we are logged in + +echo $HTTP_COOKIE | grep "loggedin" > /dev/null +if [ $? -eq 1 ]; then + echo "" + echo "" + echo '' + echo "" + echo "" + exit +fi + echo `date` " get_network.sh" >> /tmp/easy_gui.log if [ -f /etc/rc.d/S10network ]; then @@ -39,8 +51,6 @@ fi # Construct the web page ------------------------------- -sh check_loggedin.sh - cat < diff --git a/easy-asterisk-gui/phones.pl b/easy-asterisk-gui/phones.pl index 3b3262c2..538c7eaf 100755 --- a/easy-asterisk-gui/phones.pl +++ b/easy-asterisk-gui/phones.pl @@ -85,7 +85,7 @@ $tooltip_port = "onMouseOver=\"popUp(event,'phone_port_phone')\" onmouseout=\"po foreach $a (sort keys %analog) { if ($zap{$a} eq "fxs") { - $icon = "\"Analog"; + $icon = "\"Analog"; print "$analog{$a}Analog PhonePort $a$icon\n"; } } @@ -97,7 +97,7 @@ $tooltip_ipphone_ip = "onMouseOver=\"popUp(event,'phone_ipphone_ip')\" onmouseou foreach $s (sort keys %sip) { if ($sip{$s} eq "OK") { - $icon = "\"IP"; + $icon = "\"IP"; print "$sIP Phone$ipad{$s}$icon\n"; } } @@ -115,11 +115,12 @@ print "

    Phone $tooltip_phoneline = "onMouseOver=\"popUp(event,'phone_phoneline')\" onmouseout=\"popUp(event,'phone_phoneline')\""; $tooltip_port = "onMouseOver=\"popUp(event,'phone_port_line')\" onmouseout=\"popUp(event,'phone_port_line')\""; +$tooltip_line_prefix = "onMouseOver=\"popUp(event,'phone_line_prefix')\" onmouseout=\"popUp(event,'phone_line_prefix')\""; foreach $a (sort keys %analog) { if ($zap{$a} eq "fxo") { - $icon = "\"Phone"; - print "$analog{$a}AnalogPort $a$icon\n"; + $icon = "\"Phone"; + print "0Analog LinePort $a$icon\n"; } } @@ -127,11 +128,12 @@ foreach $a (sort keys %analog) { $tooltip_voipline = "onMouseOver=\"popUp(event,'phone_voipline')\" onmouseout=\"popUp(event,'phone_voipline')\""; $tooltip_voipline_ip = "onMouseOver=\"popUp(event,'phone_voipline_ip')\" onmouseout=\"popUp(event,'phone_voipline_ip')\""; +$tooltip_voipline_prefix = "onMouseOver=\"popUp(event,'phone_voipline_prefix')\" onmouseout=\"popUp(event,'phone_voipline_prefix')\""; foreach $s (sort keys %voip) { if ($voip{$s} eq "OK") { - $icon = "\"VOIP"; - print "$sVOIP$ipad{$s}$icon\n"; + $icon = "\"VOIP"; + print "1VOIP Line$ipad{$s}$icon\n"; } } diff --git a/easy-asterisk-gui/phones.sh b/easy-asterisk-gui/phones.sh index ea0a8cb7..2482c6e7 100644 --- a/easy-asterisk-gui/phones.sh +++ b/easy-asterisk-gui/phones.sh @@ -3,6 +3,18 @@ # David Rowe 4 Jan 2010 # Phones screen for Easy Asterisk GUI +# check we are logged in + +echo $HTTP_COOKIE | grep "loggedin" > /dev/null +if [ $? -eq 1 ]; then + echo "" + echo "" + echo '' + echo "" + echo "" + exit +fi + # See if we have Internet connectivity, first check dns as time outs can be very slow dns=`cat /etc/resolv.conf | awk '/^nameserver/ {print $2}'` @@ -19,8 +31,6 @@ ipaddress=`ifconfig eth0 | sed -n 's/.*inet addr:\(.*\) Bcast.*/\1/p'` # Construct the web page ------------------------------- -sh check_loggedin.sh - cat < diff --git a/easy-asterisk-gui/sip.conf b/easy-asterisk-gui/sip.conf index 3cd56ed3..2b39f560 100644 --- a/easy-asterisk-gui/sip.conf +++ b/easy-asterisk-gui/sip.conf @@ -533,7 +533,7 @@ allow=ulaw,g729 ; Pre-configured SIP trunks -[voip1] +[voip] type=friend context=default user=user diff --git a/easy-asterisk-gui/tooltips.html b/easy-asterisk-gui/tooltips.html index 41e067ba..523d761f 100644 --- a/easy-asterisk-gui/tooltips.html +++ b/easy-asterisk-gui/tooltips.html @@ -44,8 +44,8 @@ List of phone lines available. Phone lines are used to make and receive outside calls. You can use regular Analog phone lines or - VOIP. VOIP Phone lines require an account - with an Internet Telephone Service provider. + VOIP. VOIP phone lines require an account + with an Internet Telephone Service Provider. Analog phone lines require hardware to be installed in your Phone System. @@ -60,11 +60,17 @@ Port on the rear of your Phone System for this phone line. Plug the phone line into this Port. +
    + Dial 0 for an Analog outside line. For example to call 5551234 dial 05551234
    +
    IP Address of this phone on your network
    - IP Address of the VOIP Internet Service Telephone Provider
    + IP Address of the VOIP Internet Telephone Service Provider + +
    + Dial 1 for a VOIP outside line. For example to call 5551234 dial 15551234
    Instructions and help on adding a new IP phone
    @@ -72,7 +78,7 @@
    List of possible IP phones. For a new phone choose any Available number. Refresh this - page tp update
    + page to update
    The IP phone is connected to your phone system and ready to use
    -- 2.25.1