-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.htm
170 lines (148 loc) · 8.22 KB
/
admin.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>click-to-call · receive calls on your SIP softphone, mobile or fixed line from your website visitors</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Doubango Telecom">
<!-- Le styles -->
<link href="./assets/css/bootstrap.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link href="./assets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="./assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="./assets/ico/favicon.png">
<script type="text/javascript">
window.onload = function () {
btnSave.disabled = !window.localStorage;
btnRevert.disabled = !window.localStorage;
settingsRevert(true);
}
function settingsSave() {
window.localStorage.setItem('org.doubango.click2dial.admin.http_server_url', txtHttpServerUrl.value);
window.localStorage.setItem('org.doubango.click2dial.admin.websocket_server_url', txtWebsocketServerUrl.value);
window.localStorage.setItem('org.doubango.click2dial.admin.sip_outboundproxy_url', txtSIPOutboundProxyUrl.value);
txtInfo.innerHTML = '<i>Saved</i>';
}
function settingsRevert(bNotUserAction) {
if(window.localStorage){
txtHttpServerUrl.value = (window.localStorage.getItem('org.doubango.click2dial.admin.http_server_url') || "");
txtWebsocketServerUrl.value = (window.localStorage.getItem('org.doubango.click2dial.admin.websocket_server_url') || "");
txtSIPOutboundProxyUrl.value = (window.localStorage.getItem('org.doubango.click2dial.admin.sip_outboundproxy_url') || "");
}
if (!bNotUserAction) {
txtInfo.innerHTML = '<i>Reverted</i>';
}
}
</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" target=_blank href="http://doubango.org">Doubango Telecom</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li class="active"><a href="#admin">Administration</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container marketing">
<div class="span7 well">
<label align="center" id="txtInfo">This administration page is for developers to allow using your own servers.</label>
<br />
<table style='width: 100%'>
<tr>
<td>
<label style="height: 100%">Http service URL<sup><a href="#aHttpServiceURL">[1]</a></sup>:</label>
</td>
<td>
<input type="text" style="width: 100%; height: 100%" id="txtHttpServerUrl" value="" placeholder="e.g. https://click2dial.org:10072" />
</td>
</tr>
<tr>
<td>
<label style="height: 100%">WebSocket server URL<sup><a href="#aWebSocketServerURL">[2]</a></sup>:</label>
</td>
<td>
<input type="text" style="width: 100%; height: 100%" id="txtWebsocketServerUrl" value="" placeholder="e.g. wss://click2dial.org:10062" />
</td>
</tr>
<tr>
<td>
<label style="height: 100%">SIP outbound Proxy URL<sup><a href="#aSIPOutboundProxyURL">[3]</a></sup>:</label>
</td>
<td>
<input type="text" style="width: 100%; height: 100%" id="txtSIPOutboundProxyUrl" value="" placeholder="e.g. udp://click2dial.org:5060" />
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="button" class="btn-success" id="btnSave" value="Save" onclick='settingsSave();' />
<input type="button" class="btn-danger" id="btnRevert" value="Revert" onclick='settingsRevert();' />
</td>
</tr>
</table>
</div>
</div><!-- /.container -->
<hr />
<footer>
<a name="aHttpServiceURL"><sup><b>[1]</b></sup></a> Host name and port of the server hosting the click-to-call service. <br />
<a name="aWebSocketServerURL"><sup><b>[2]</b></sup></a> The <b>WebSocket Server URL</b> is only required if you're a developer and using your own SIP Proxy gateway not publicly reachable. <br />
<a name="aSIPOutboundProxyURL"><sup><b>[3]</b></sup></a> The <b>SIP outbound Proxy URL</b> is used to set the destination IP address and Port to use for all outgoing requests regardless the <i>domain name</i> (a.k.a <i>realm</i>).
This is a good option for developers using a SIP domain name without valid DNS A/NAPTR/SRV records.
</footer>
<!-- ANALYTICS -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6868621-25']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="./assets/js/jquery.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-transition.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-alert.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-modal.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-scrollspy.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-tab.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-tooltip.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-popover.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-button.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-collapse.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-carousel.js" type="text/javascript"></script>
<script src="./assets/js/bootstrap-typeahead.js" type="text/javascript"></script>
<script src="./assets/js/holder/holder.js" type="text/javascript"></script>
</body>
</html>