# 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
- <tr><td colspan="2"><h1></h1></td></tr>
+ <tr><td colspan="2"><h2> </h2></td></tr>
<html>
<title>Easy Asterisk - Dashboard</title>
<body onload="localInit()">
-<div id="t1" class="tip">Tells you if I can reach the Internet. If not "Good" check your network settings, in particular Gateway and DNS.</div>
-
-<table align="center" width=800>
EOF
+
+cat tooltips.html
+echo "<table align="center" width=800 border=0>"
cat banner.html
echo " <tr>"
cat menu.html
cat <<EOF
- <td>
+ <td valign="top">
<form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
- <table align="right" width=600>
- <tr>
- <tr><td colspan="2" align="left" valign="top" ><h2>Dashboard</h2></td>
- <tr onMouseOver="popUp(event,'t1')" onmouseout="popUp(event,'t1')">
+ <table align="right" width=600 border=0>
+ <tr><td colspan="2" align="left" valign="top" ><h2>Dashboard</h2></td></tr>
+ <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
<td>Internet Connection:</td>
<td><div id="internet" >
<span style="margin-left: 4px;font-weight:bold"> </span></div></td>
-
</tr>
</table>
</form>
</tr>
</table>
-EOF
-
-echo $HTTP_COOKIE
-cat<<EOF
</body>
</html>
EOF
--- /dev/null
+; 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)
+
- <div id="admin_tip" class="tip">Change your password</div>
+ <div id="admin_tip" class="tip">Change your password, Reset the defaults, Install new software</div>
<div id="dashboard_tip" class="tip">Monitor the status of your phone system</div>
<div id="network_tip" class="tip">Connect the phone system to your network and the Internet</div>
<div id="phone_tip" class="tip">Set up your phones and phone calls</div>
<html>
<title>Easy Asterisk - Network</title>
<body onload="localInit()">
-<div id="t1" class="tip">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.</div>
-<div id="t2" class="tip">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!</div>
-
-<table align="center" width=800>
EOF
+
+cat tooltips.html
+echo "<table align="center" width=800 border=0>"
cat banner.html
echo " <tr>"
cat menu.html
cat <<EOF
- <td>
+ <td valign="top">
<form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
- <table align="center" width=600>
- <tr>
- <tr><td colspan="2" align="left" valign="top"><h2>Network</h2></td>
+ <table align="center" width=600 border=0>
+ <tr><td colspan="2" align="left" valign="top"><h2>Network</h2></td></tr>
<tr>
<td><input type="radio" id="static" name="dhcp" value="no" onClick="doStatic()">Static</td>
<td><input type="radio" id="dhcp" name="dhcp" value="yes" onClick="doDHCP()">DHCP</td>
<tr><td>Netmask:</td><td><input type="text" name="netmask" id="netmask" onBlur="isIP(this)"></td></tr>
<tr><td>Gateway:</td><td><input type="text" name="gateway" id="gateway" onBlur="isIP(this)"></td></tr>
<tr><td>DNS:</td><td><input type="text" name="dns" id="dns" onBlur="isIP(this)"></td></tr>
- <tr onMouseOver="popUp(event,'t2')" onmouseout="popUp(event,'t2')">
+ <tr onMouseOver="popUp(event,'network_backdoor')" onmouseout="popUp(event,'network_backdoor')">
<td>Emergency IP:</td><td><input type="text" name="backdoor" id="backdoor" onBlur="isIP(this)"></td>
</tr>
- <tr onMouseOver="popUp(event,'t1')" onmouseout="popUp(event,'t1')">
+ <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
<td>Internet Connection:</td>
<td><div id="internet" >
<span style="margin-left: 4px;font-weight:bold"> </span></div></td>
</tr>
<tr><td><input id="networkapply" type="submit" value="Apply"></td></tr>
- </tr>
</table>
</form>
--- /dev/null
+function localInit() {
+}
+
--- /dev/null
+#!/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
+<script src="prototype.js"></script>
+<link href="astman.css" media="all" rel="Stylesheet" type="text/css" />
+<script type="text/javascript" src="tooltip.js"></script>
+<link rel="stylesheet" href="tooltip.css" type="text/css" />
+EOF
+
+echo "<script>"
+echo 'var init_internet="'$internet'";'
+cat phone.js
+echo "</script>"
+
+cat << EOF
+<html>
+<title>Easy Asterisk - Phones</title>
+<body onload="localInit()">
+<div id="t1" class="tip">Tells you if I can reach the Internet. If
+ not "Good" check your network settings, in
+ particular Gateway and DNS.</div>
+
+<table align="center" width=800>
+EOF
+cat banner.html
+echo " <tr>"
+cat menu.html
+cat <<EOF
+
+ <td>
+
+ <form action="/cgi-bin/set_phone.sh" onsubmit="return validate_form(this)" method="get">
+ <table align="right" width=600>
+ <tr>
+ <tr><td colspan="2" align="left" valign="top" ><h2>Phones</h2></td>
+ <tr onMouseOver="popUp(event,'t1')" onmouseout="popUp(event,'t1')">
+ <td>Internet Connection:</td>
+ <td><div id="internet" >
+ <span style="margin-left: 4px;font-weight:bold"> </span></div></td>
+ </tr>
+ </table>
+ </form>
+
+ </td>
+
+ </tr>
+
+</table>
+</body>
+</html>
+EOF
+
--- /dev/null
+<div id="network_internet" class="tip">
+ 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.</div>
+
+<div id="network_backdoor" class="tip">
+ 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!</div>