From c007fcfa0320c9a741494d8ffeb6a4afe6e0f5f6 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 4 Jan 2010 11:39:03 +0000 Subject: [PATCH] started phone GUI git-svn-id: https://svn.code.sf.net/p/freetel/code@94 01035d8c-6547-0410-b346-abe4f91aad63 --- easy-asterisk-gui/Makefile | 3 +- easy-asterisk-gui/banner.html | 2 +- easy-asterisk-gui/check_network.sh | 0 easy-asterisk-gui/dashboard.sh | 20 ++++------ easy-asterisk-gui/extensions.conf | 54 +++++++++++++++++++++++++++ easy-asterisk-gui/menu.html | 2 +- easy-asterisk-gui/network.sh | 23 ++++-------- easy-asterisk-gui/phone.js | 3 ++ easy-asterisk-gui/phone.sh | 59 ++++++++++++++++++++++++++++++ easy-asterisk-gui/tooltips.html | 10 +++++ 10 files changed, 145 insertions(+), 31 deletions(-) delete mode 100644 easy-asterisk-gui/check_network.sh create mode 100644 easy-asterisk-gui/extensions.conf create mode 100644 easy-asterisk-gui/phone.js create mode 100644 easy-asterisk-gui/phone.sh create mode 100644 easy-asterisk-gui/tooltips.html diff --git a/easy-asterisk-gui/Makefile b/easy-asterisk-gui/Makefile index e34e6d0a..9c0e4bfd 100644 --- a/easy-asterisk-gui/Makefile +++ b/easy-asterisk-gui/Makefile @@ -9,4 +9,5 @@ TESTIP=192.168.1.150 # rcp index.html root@$(TESTIP):/var/lib/asterisk/static-http/ test: - rcp check_network.sh tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh dashboard.sh dashboard.js network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin + rcp tooltips.html phone.sh phone.js tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh dashboard.sh dashboard.js network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin + rcp extensions.conf root@$(TESTIP):/etc/asterisk diff --git a/easy-asterisk-gui/banner.html b/easy-asterisk-gui/banner.html index c582d25b..02889097 100644 --- a/easy-asterisk-gui/banner.html +++ b/easy-asterisk-gui/banner.html @@ -1 +1 @@ -

+

 

diff --git a/easy-asterisk-gui/check_network.sh b/easy-asterisk-gui/check_network.sh deleted file mode 100644 index e69de29b..00000000 diff --git a/easy-asterisk-gui/dashboard.sh b/easy-asterisk-gui/dashboard.sh index db8d3b69..0b56f36e 100644 --- a/easy-asterisk-gui/dashboard.sh +++ b/easy-asterisk-gui/dashboard.sh @@ -31,26 +31,24 @@ cat << EOF Easy Asterisk - Dashboard -
Tells you if I can reach the Internet. If not "Good" check your network settings, in particular Gateway and DNS.
- - EOF + +cat tooltips.html +echo "
" cat banner.html echo " " cat menu.html cat < +
- - - - +

Dashboard

+ + -

Dashboard

Internet Connection:
 
@@ -60,10 +58,6 @@ cat <
-EOF - -echo $HTTP_COOKIE -cat< EOF diff --git a/easy-asterisk-gui/extensions.conf b/easy-asterisk-gui/extensions.conf new file mode 100644 index 00000000..d1012ab9 --- /dev/null +++ b/easy-asterisk-gui/extensions.conf @@ -0,0 +1,54 @@ +; extensions.conf +; David Rowe 4 Jan 2010 +; + +; Designed for Easy Asterisk GUI. However you can hand modify as much +; as you like, as GUI scripts read/and write regular extensions.conf +; without messing with your custom dialplan + + +[general] +static = yes +writeprotect = no +autofallthrough = yes +clearglobalvars = no +priorityjumping = no + +[default] + +; Pre-configured analog extensions, depends on IP0X model and what modules +; are installed. Some of these may map to FXO ports + +exten => 6001,n,Dial(Zap/1) +exten => 6002,n,Dial(Zap/2) +exten => 6003,n,Dial(Zap/3) +exten => 6004,n,Dial(Zap/4) +exten => 6005,n,Dial(Zap/5) +exten => 6006,n,Dial(Zap/6) +exten => 6007,n,Dial(Zap/7) +exten => 6008,n,Dial(Zap/8) + +; Pre-configured SIP-phone extensions. Primary use case is multiple SIP +; extensions and FXO analog Ports + +exten => 6011,n,Dial(SIP/6011) +exten => 6012,n,Dial(SIP/6012) +exten => 6013,n,Dial(SIP/6013) +exten => 6014,n,Dial(SIP/6014) +exten => 6015,n,Dial(SIP/6015) +exten => 6016,n,Dial(SIP/6016) +exten => 6017,n,Dial(SIP/6017) +exten => 6018,n,Dial(SIP/6018) +exten => 6019,n,Dial(SIP/6019) +exten => 6020,n,Dial(SIP/6020) +exten => 6021,n,Dial(SIP/6021) +exten => 6022,n,Dial(SIP/6022) +exten => 6023,n,Dial(SIP/6023) +exten => 6024,n,Dial(SIP/6024) +exten => 6025,n,Dial(SIP/6025) +exten => 6026,n,Dial(SIP/6026) +exten => 6027,n,Dial(SIP/6027) +exten => 6028,n,Dial(SIP/6028) +exten => 6029,n,Dial(SIP/6029) +exten => 6020,n,Dial(SIP/6020) + diff --git a/easy-asterisk-gui/menu.html b/easy-asterisk-gui/menu.html index 4f3a5e47..c4e6cc99 100644 --- a/easy-asterisk-gui/menu.html +++ b/easy-asterisk-gui/menu.html @@ -1,4 +1,4 @@ -
Change your password
+
Change your password, Reset the defaults, Install new software
Monitor the status of your phone system
Connect the phone system to your network and the Internet
Set up your phones and phone calls
diff --git a/easy-asterisk-gui/network.sh b/easy-asterisk-gui/network.sh index d4c0ee86..d8172a19 100644 --- a/easy-asterisk-gui/network.sh +++ b/easy-asterisk-gui/network.sh @@ -63,26 +63,20 @@ cat << EOF Easy Asterisk - Network -
A tick means I can reach the Internet. You need the Internet for VOIP calls. - If you have a problem reaching the Internet check your Network settings, in - particular Gateway and DNS.
-
Emergency backdoor IP. Useful if you get locked out of the main network connection, for - example due to DHCP problems on your network or a configuration mistake. - Write this number down somewhere!
- - EOF + +cat tooltips.html +echo "
" cat banner.html echo " " cat menu.html cat < + + + + +
- - - +

Network

+ @@ -91,17 +85,16 @@ cat < - + - + -

Network

Static DHCPNetmask:
Gateway:
DNS:
Emergency IP:
Internet Connection:
 
diff --git a/easy-asterisk-gui/phone.js b/easy-asterisk-gui/phone.js new file mode 100644 index 00000000..9c50ceac --- /dev/null +++ b/easy-asterisk-gui/phone.js @@ -0,0 +1,3 @@ +function localInit() { +} + diff --git a/easy-asterisk-gui/phone.sh b/easy-asterisk-gui/phone.sh new file mode 100644 index 00000000..1d3a5de9 --- /dev/null +++ b/easy-asterisk-gui/phone.sh @@ -0,0 +1,59 @@ +#!/bin/sh -x +# phone.sh +# David Rowe 4 Jan 2010 +# CGI for Easy Asterisk phones GUI + +# Construct the web page ------------------------------- + +sh check_loggedin.sh + +cat < + + + +EOF + +echo "" + +cat << EOF + +Easy Asterisk - Phones + +
Tells you if I can reach the Internet. If + not "Good" check your network settings, in + particular Gateway and DNS.
+ + +EOF +cat banner.html +echo " " +cat menu.html +cat < + +
+
+ + + + + + +

Phones

Internet Connection:
+  
+ + +
+ + +EOF + diff --git a/easy-asterisk-gui/tooltips.html b/easy-asterisk-gui/tooltips.html new file mode 100644 index 00000000..f89cf56a --- /dev/null +++ b/easy-asterisk-gui/tooltips.html @@ -0,0 +1,10 @@ +
+ A tick means your phone system can reach the Internet. You need the Internet for VOIP calls + and software upgrades. + If you have a problem reaching the Internet check your Network settings, in + particular Gateway and DNS.
+ +
+ Emergency backdoor IP. Useful if you get locked out of the main network connection, for + example due to DHCP problems on your network or a configuration mistake. + Write this number down somewhere!
-- 2.25.1