# rcp index.html root@$(TESTIP):/var/lib/asterisk/static-http/
test:
- rcp voipline.jpg anphone.png phoneline.jpg ipphone.png phone.pl 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 ipphones.sh ipphones.js voipline.jpg anphone.png phoneline.jpg ipphone.png phone.pl tooltips.html phone.sh phone.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
+++ /dev/null
-function localInit() {
- if (init_internet == "yes")
- $('internet').innerHTML = '<img src="tick.png" alt="tick" />';
- else
- $('internet').innerHTML = '<img src="cross.png" alt="tick" />';
-}
-
+++ /dev/null
-#!/bin/sh -x
-# dashboard.sh
-# David Rowe 4 Jan 2010
-# CGI for Easy Asterisk dashboard GUI
-
-# 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}'`
-dns_packet_loss=`ping $dns -c 1 -q | sed -n 's/.*received, \(.*\)% packet loss/\1/p'`
-internet="no";
-if [ $dns_packet_loss == "0" ]; then
- packet_loss=`ping google.com -c 1 -q | sed -n 's/.*received, \(.*\)% packet loss/\1/p'`
- if [ $packet_loss == "0" ]; then
- internet="yes";
- fi
-fi
-
-# 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 dashboard.js
-echo "</script>"
-
-cat << EOF
-<html>
-<title>Easy Asterisk - Dashboard</title>
-<body onload="localInit()">
-EOF
-
-cat tooltips.html
-echo '<table align="center" width=800 border=0>'
-cat banner.html
-echo " <tr>"
-cat menu.html
-cat <<EOF
-
- <td valign="top">
-
- <form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
- <table align="right" width=600 border=0>
- <tr><td colspan="3" 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>
-
- </td>
-
- </tr>
-
-</table>
-</body>
-</html>
-EOF
-
--- /dev/null
+function localInit() {
+ if (init_internet == "yes")
+ $('internet').innerHTML = '<img src="tick.png" alt="tick" />';
+ else
+ $('internet').innerHTML = '<img src="cross.png" alt="tick" />';
+}
+
--- /dev/null
+#!/bin/sh -x
+# dashboard.sh
+# David Rowe 6 Jan 2010
+# Dashboard screen for Easy Asterisk 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 ipphones.js
+echo "</script>"
+
+cat << EOF
+<html>
+<title>Easy Asterisk - IP Phones</title>
+<body onload="localInit()">
+EOF
+
+cat tooltips.html
+echo '<table align="center" width=800 border=0>'
+cat banner.html
+echo " <tr>"
+cat menu.html
+cat <<EOF
+
+ <td valign="top">
+
+ <form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
+ <table align="right" width=600 border=0>
+ <tr><td colspan="3" 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>
+
+ </td>
+
+ </tr>
+
+</table>
+</body>
+</html>
+EOF
+
<div id="admin_tip" class="tip">Change your password, Time & time zone, 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>
+ <div id="phones_tip" class="tip">Set up your phones, phone lines and phone calls</div>
+ <div id="ipphones_tip" class="tip">Set up your IP phones</div>
<td valign="top" >
<table align="right" width=200>
<tr><td><h2> </h2></td></tr>
<tr onMouseOver="popUp(event,'admin_tip')" onmouseout="popUp(event,'admin_tip')">
<td><a href="admin.sh">Admin</a></td>
</tr>
- <tr onMouseOver="popUp(event,'dashboard_tip')" onmouseout="popUp(event,'dashboard_tip')">
- <td><a href="dashboard.sh">Dashboard</a></td>
- </tr>
<tr onMouseOver="popUp(event,'network_tip')" onmouseout="popUp(event,'network_tip')">
<td><a href="network.sh">Network</a></td>
</tr>
- <tr onMouseOver="popUp(event,'phone_tip')" onmouseout="popUp(event,'phone_tip')">
- <td><a href="phone.sh">Phones</a></td>
+ <tr onMouseOver="popUp(event,'ipphones_tip')" onmouseout="popUp(event,'ipphones_tip')">
+ <td><a href="network.sh">IP Phones</a></td>
+ </tr>
+ <tr onMouseOver="popUp(event,'phones_tip')" onmouseout="popUp(event,'phones_tip')">
+ <td><a href="phones.sh">Phones</a></td>
</tr>
<tr>
<td><a href="logout.sh">Logout</a></td>
<td valign="top">
<table align="right" width=600>
- <tr onMouseOver="popUp(event,'phone_system')" onmouseout="popUp(event,'phone_system')">
- <td colspan="4" align="left" valign="top" ><h2>Phone System</h2></td>
+ <tr>
+ <td onMouseOver="popUp(event,'phone_system')" onmouseout="popUp(event,'phone_system')" colspan="3" align="left" valign="top"><h2>Phone System</h2></td>
+ <td onMouseOver="popUp(event,'phone_addipphone')" onmouseout="popUp(event,'phone_addipphone')"><a href="addipphone.sh">Add IP Phone</a></td>
</tr>
<tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
<td colspan="3">Internet Connection:</td>
<div id="phone_voipline_ip" class="tip">
IP Address of the VOIP Internet Service Telephone Provider</div>
+
+<div id="phone_addipphone" class="tip">
+ Instructions and help on adding a new IP phone</div>