-
Notifications
You must be signed in to change notification settings - Fork 187
/
index.html
267 lines (238 loc) · 12.5 KB
/
index.html
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/gif" href="img/favicon.ico" />
<title>ctxSip - Javascript SIP client</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<style>
body {
margin-top : 20px;
background-image : url('img/bg.jpg');
}
.navbar {
margin-bottom : 40px;
}
.content {
margin-top : 40px;
padding-top : 40px;
background-color : #fff;
box-shadow : 0px -10px 20px rgba(0,0,0,0.03);
}
.content img {
padding : 0 30px 10px 0;
}
.page-header {
border-bottom : 1px solid #aaa;
margin-bottom : 40px;
}
.content > .container > .row {
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><i class="fa fa-fw fa-phone-square text-muted"></i> ctxPhone</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/Collecttix/ctxSip"><i class="fa fa-github"></i> GitHub Project</a></li>
<li><a href="https://collecttix.com"><i class="fa fa-asterisk text-success"></i> Collecttix</a></li>
</ul>
</div>
</div>
</div>
<h1 class="page-header text-center"><i class="fa fa-fw fa-phone-square text-success fa-2x"></i><br> ctxPhone <small><br>A simple, open source, javascript SIP phone for web applications.</small></h1>
<div class="text-center">
<p class="text-center lead">Already have a sip account? Try our demo.</p>
<a href="#mdlDemo" class="btn btn-lg btn-primary" id="btnDemo" data-toggle="modal"><i class="fa fa-fw fa-phone-square"></i> Try the Demo</a>
</div>
</div>
<div class="content">
<div class="container">
<div class="row">
<div class="col-md-4 clearfix">
<h2>Simple UI</h2>
<img src="img/screenshots/1.png" class="pull-left img-responsive" width="160" height="240" alt="Simple UI">
<p class="text-left">ctxSip is a Javascript based SIP client that uses WebRTC and WebSockets to connect to your SIP server.</p>
<p class="text-left">The UI is designed to be launched as a popup from within your application.</p>
<p class="text-left"></p>
</div>
<div class="col-md-4 clearfix">
<h2>Features</h2>
<img src="img/screenshots/2.png" class="pull-left img-responsive" width="160" height="240" alt="Strong Featureset">
<ul class="text-left">
<li><p>Hold / Resume, Mute, multiple call support.</p></li>
<li><p>No plugins required.</p></li>
<li><p>Intuitive interface makes it easy for users.</p></li>
<li><p>Designed for a business environment, features are limited to what is needed.</p></li>
</ul>
</div>
<div class="col-md-4 clearfix">
<h2>Easy to Implement</h2>
<img src="img/screenshots/3.png" class="pull-left img-responsive" width="160" height="240" alt="Easy to Implement">
<ul class="text-left">
<li><p>Call logs are saved to localStorage</p></li>
<li><p>Easy to configure and integrate into your project.</p></li>
<li><p>Uses SIP.js, Bootstrap, jQuery, and other common tools of the trade.</p></li>
</ul>
</div>
</div>
<div class="well">
<div class="row">
<div class="col-md-3">
<h3>Browser Support</h3>
<p>Standards based browsers will just work. No plugins-necessary. Support requires: WebSockets & WebRTC.</p>
<p>Supported Browsers</p>
<ul>
<li><p>Google Chrome</p></li>
<li><p>Mozilla Firefox</li>
</ul>
</div>
<div class="col-md-3">
<h3>Use It</h3>
<p>Get started with ctxSip.</p>
<ul>
<li><p>Download or clone the repo: <a href="https://collecttix.github.com/ctxPhone">https://collecttix.github.com/ctxPhone</a></p></li>
<li><p>Copy <code>scripts/config-sample.js</code> to <code>scripts/config.js</code> and edit with your SIP account details.</p></li>
<li><p>Launch the phone.</p></li>
</ul>
</div>
<div class="col-md-3">
<h3>Code</h3>
<ul>
<li><p><a href="http://sipjs.com/">SIP.js</a> Does all the heavy lifting.</p></li>
<li><p><code>/scripts/app.js</code> is where the client code resides.</p></li>
<li><p>When the client is launched, the user's configuration can be in a JS variable called <code>user</code> or it will look in localStorage for a JSON encoded object <code>SIPCreds</code></p></li>
</ul>
</div>
<div class="col-md-3">
<h3>Contribute</h3>
<ul>
<li><p>Have an idea or find a bug? <a href="https://github.com/collecttix/ctxSip/issues">Submit an Issue.</a></p></li>
<li><p>Have a new feature? <a href="https://github.com/collecttix/ctxSip/pulls">Submit a Pull Request.</a></p></li>
</ul>
</div>
</div>
</div>
</div>
<div class="text-center text-muted clearfix">
<p> © 2018 Collecttix</p>
</div>
</div>
<form class="modal fade" id="mdlDemo" tabindex="-1" role="dialog" aria-labelledby="btnDemo" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Enter SIP Credenitals</h4>
</div>
<div class="modal-body">
<p>To use our demo you will need your SIP credentials from your account. All fields are required.</p>
<div class="form-group">
<label>Display Name:</label>
<input type="text" name="Display" class="form-control" placeholder="i.e. Ben Franklin" required>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Sip User:</label>
<input type="text" name="User" class="form-control" placeholder="i.e. sipuser" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>WS URL:</label>
<input type="text" name="WSServer" class="form-control" placeholder="i.e. wss://sip.example.com:5060/" required>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Sip Pass:</label>
<input type="password" name="Pass" class="form-control" placeholder="i.e. supaSekret!" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Sip Realm:</label>
<input type="text" name="Realm" class="form-control" placeholder="i.e. sip.example.com" required>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="btnConfig">Launch Phone</button>
</div>
</div>
</div>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
// When the demo modal is launched, load the values from localStorage
$('#mdlDemo').on('show.bs.modal', function() {
var user = JSON.parse(localStorage.getItem('SIPCreds'));
if (user) {
$.each(user, function(k, v) {
$('input[name="'+k+'"]').val(v);
});
}
});
// Save form to localStorage and validate
$('#btnConfig').click(function(event) {
var user = {},
valid = true;
event.preventDefault();
// validate the form
$('#mdlDemo input').each(function(i) {
if ($(this).val() === '') {
$(this).closest('.form-group').addClass('has-error');
valid = false;
} else {
$(this).closest('.form-group').removeClass('has-error');
}
user[$(this).attr('name')] = $(this).val();
});
// launch the phone window.
if (valid) {
localStorage.setItem('SIPCreds', JSON.stringify(user));
var url = 'https://' + window.location.host + window.location.pathname + 'phone/',
features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=480';
if (!localStorage.getItem('ctxPhone')) {
window.open(url, 'ctxPhone', features);
$('#mdlDemo').modal('hide');
return false;
} else {
window.alert('Phone already open.');
}
}
});
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47777318-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>