Browse code

added changes to implement the From number drop-down list, the available numbers and default number fields and the debug logging checkbox, etc.

DoubleBastionAdmin authored on 08/01/2024 19:33:20
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,86 @@
1
+/**
2
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
+ *
4
+ * @author Double Bastion LLC
5
+ *
6
+ * @license GNU AGPL version 3 or any later version
7
+ *
8
+ * This program is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
+ * License as published by the Free Software Foundation; either
11
+ * version 3 of the License, or any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
+ *
18
+ * You should have received a copy of the GNU Affero General Public
19
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+$(document).ready(function() {
24
+
25
+  $('#save_sipph_settings').on('click', function(event){
26
+
27
+    event.preventDefault();
28
+    OC.msg.startAction('#sip_trip_phone_save_msg', t('sip_trip_phone', 'Saved'));
29
+
30
+    var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/updatesettings');
31
+    var userid = "<?php p($userId); ?>";
32
+    var checkedornot = 0;
33
+    if ($("#tracesipmsg").is(":checked")) { checkedornot = 1; }
34
+
35
+    var datatobesaved = {
36
+                          userId: userid,
37
+                          pdisplayname: $('#pdisplayname').val(),
38
+                          sipusername: $('#sipusername').val(),
39
+                          sipuserpassword: $('#sipuserpassword').val(),
40
+                          stphwssurl: $('#stphwssurl').val(),
41
+                          siprealm: $('#siprealm').val(),
42
+                          stunserver: $('#stunserver').val(),
43
+                          tracesipmsg: checkedornot,
44
+                          voicenumbers: $('#voicenumbers').val(),
45
+                          defaultvoicenumber: $('#defaultvoicenumber').val()
46
+    };
47
+
48
+    $.ajax({
49
+       method: 'PUT',
50
+       url: baseUrl + '/' + userid,
51
+       contentType: 'application/json',
52
+       data: JSON.stringify(datatobesaved),
53
+       error: function(resp) {
54
+            alert('Error ! Please check your settings !');
55
+       }
56
+
57
+    });
58
+
59
+  });
60
+
61
+  var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings');
62
+  var userid = "<?php p($userId); ?>";
63
+
64
+  $.ajax({
65
+       method: 'GET',
66
+       url: baseUrl + '/' + userid,
67
+       contentType: 'application/json',
68
+       success: function(settingsdb) {
69
+          $("#pdisplayname").val(settingsdb.pdisplayname);
70
+          $("#sipusername").val(settingsdb.sipusername);
71
+          $("#sipuserpassword").val(settingsdb.sipuserpassword);
72
+          $("#stphwssurl").val(settingsdb.stphwssurl);
73
+          $("#siprealm").val(settingsdb.siprealm);
74
+          $("#stunserver").val(settingsdb.stunserver);
75
+          $('#voicenumbers').val(settingsdb.voicenumbers);
76
+          $('#defaultvoicenumber').val(settingsdb.defaultvoicenumber);
77
+
78
+	  if (settingsdb.tracesipmsg == 1) {
79
+	      $('#tracesipmsg').attr('checked', true);
80
+	  } else {
81
+	      $('#tracesipmsg').attr('checked', false);
82
+	  }
83
+       }
84
+  });
85
+
86
+});
Browse code

removed appinfo/info.xml appinfo/signature.json CHANGELOG.txt README.md js/settings.js js/launchphone.js css/style.css phone/scripts/app.js templates/settings.php l10n/en_GB.js l10n/en_GB.json phone/css/ctxSip.css phone/index.html lib/Controller/SphoneController.php lib/Service/SphoneService.php phone/sounds/dtmf.mp3 phone/sounds/incoming.mp3 phone/sounds/outgoing.mp3 img/sip_trip_phone_screenshot.png img/sip_trip_phone_transfer_call.png img/sip_trip_phone_making_calls.png img/sip_trip_phone_initial_screen.png img/sip_trip_phone_dialpad.png

DoubleBastionAdmin authored on 08/01/2024 19:00:48
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,73 +0,0 @@
1
-/**
2
- * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
- *
4
- * @author Double Bastion LLC
5
- *
6
- * @license GNU AGPL version 3 or any later version
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
- * License as published by the Free Software Foundation; either
11
- * version 3 of the License, or any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
- *
18
- * You should have received a copy of the GNU Affero General Public
19
- * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-$(document).ready(function() {
24
-
25
-  $('#save_sipph_settings').on('click', function(event){
26
-
27
-    event.preventDefault();
28
-    OC.msg.startAction('#sip_trip_phone_save_msg', t('sip_trip_phone', 'Saved'));
29
-
30
-    var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/updatesettings');
31
-    var userid = "<?php p($userId); ?>";
32
-
33
-    var datatobesaved = {
34
-                          userId: userid,
35
-                          pdisplayname: $('#pdisplayname').val(),
36
-                          sipusername: $('#sipusername').val(),
37
-                          sipuserpassword: $('#sipuserpassword').val(),
38
-                          stphwssurl: $('#stphwssurl').val(),
39
-                          siprealm: $('#siprealm').val(),
40
-                          stunserver: $('#stunserver').val()
41
-    };
42
-
43
-    $.ajax({
44
-       method: 'PUT',
45
-       url: baseUrl + '/' + userid,
46
-       contentType: 'application/json',
47
-       data: JSON.stringify(datatobesaved),
48
-       error: function(resp) {
49
-            alert('Error ! Please check your settings !');
50
-       }
51
-
52
-    });
53
-
54
-  });
55
-
56
-  var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings');
57
-  var userid = "<?php p($userId); ?>";
58
-
59
-  $.ajax({
60
-       method: 'GET',
61
-       url: baseUrl + '/' + userid,
62
-       contentType: 'application/json',
63
-       success: function(settingsdb) {
64
-          $("#pdisplayname").val(settingsdb.pdisplayname);
65
-          $("#sipusername").val(settingsdb.sipusername);
66
-          $("#sipuserpassword").val(settingsdb.sipuserpassword);
67
-          $("#stphwssurl").val(settingsdb.stphwssurl);
68
-          $("#siprealm").val(settingsdb.siprealm);
69
-          $("#stunserver").val(settingsdb.stunserver);
70
-       }
71
-  });
72
-
73
-});
Browse code

Created repository.

DoubleBastionAdmin authored on 02/03/2022 00:26:46
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,73 @@
1
+/**
2
+ * @copyright 2021 Double Bastion LLC <www.doublebastion.com>
3
+ *
4
+ * @author Double Bastion LLC
5
+ *
6
+ * @license GNU AGPL version 3 or any later version
7
+ *
8
+ * This program is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
10
+ * License as published by the Free Software Foundation; either
11
+ * version 3 of the License, or any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
17
+ *
18
+ * You should have received a copy of the GNU Affero General Public
19
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+$(document).ready(function() {
24
+
25
+  $('#save_sipph_settings').on('click', function(event){
26
+
27
+    event.preventDefault();
28
+    OC.msg.startAction('#sip_trip_phone_save_msg', t('sip_trip_phone', 'Saved'));
29
+
30
+    var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/updatesettings');
31
+    var userid = "<?php p($userId); ?>";
32
+
33
+    var datatobesaved = {
34
+                          userId: userid,
35
+                          pdisplayname: $('#pdisplayname').val(),
36
+                          sipusername: $('#sipusername').val(),
37
+                          sipuserpassword: $('#sipuserpassword').val(),
38
+                          stphwssurl: $('#stphwssurl').val(),
39
+                          siprealm: $('#siprealm').val(),
40
+                          stunserver: $('#stunserver').val()
41
+    };
42
+
43
+    $.ajax({
44
+       method: 'PUT',
45
+       url: baseUrl + '/' + userid,
46
+       contentType: 'application/json',
47
+       data: JSON.stringify(datatobesaved),
48
+       error: function(resp) {
49
+            alert('Error ! Please check your settings !');
50
+       }
51
+
52
+    });
53
+
54
+  });
55
+
56
+  var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings');
57
+  var userid = "<?php p($userId); ?>";
58
+
59
+  $.ajax({
60
+       method: 'GET',
61
+       url: baseUrl + '/' + userid,
62
+       contentType: 'application/json',
63
+       success: function(settingsdb) {
64
+          $("#pdisplayname").val(settingsdb.pdisplayname);
65
+          $("#sipusername").val(settingsdb.sipusername);
66
+          $("#sipuserpassword").val(settingsdb.sipuserpassword);
67
+          $("#stphwssurl").val(settingsdb.stphwssurl);
68
+          $("#siprealm").val(settingsdb.siprealm);
69
+          $("#stunserver").val(settingsdb.stunserver);
70
+       }
71
+  });
72
+
73
+});