1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,71 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver, |
|
40 |
+ "Tracesipmsg" : settingsdb.tracesipmsg, |
|
41 |
+ "Voicenumbers" : settingsdb.voicenumbers, |
|
42 |
+ "Defaultvoicenumber" : settingsdb.defaultvoicenumber |
|
43 |
+ }; |
|
44 |
+ |
|
45 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
46 |
+ |
|
47 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
48 |
+ |
|
49 |
+ $.ajax({ |
|
50 |
+ method: 'GET', |
|
51 |
+ url: baseUrl + '/' + userid, |
|
52 |
+ contentType: 'text', |
|
53 |
+ success: function(sippassword) { |
|
54 |
+ |
|
55 |
+ var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
56 |
+ |
|
57 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
58 |
+ |
|
59 |
+ window.open(url, "SipTripPhone", "width=354,height=572,menubar=no,scrollbars=no,status=no,addressbar=no,resizable=no"); |
|
60 |
+ window.sipUserPasswd = sippassword; |
|
61 |
+ |
|
62 |
+ } else { |
|
63 |
+ window.alert('The phone is already open !'); |
|
64 |
+ } |
|
65 |
+ } |
|
66 |
+ |
|
67 |
+ }); |
|
68 |
+ } |
|
69 |
+ }); |
|
70 |
+}); |
|
71 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,71 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver, |
|
40 |
- "Tracesipmsg" : settingsdb.tracesipmsg, |
|
41 |
- "Voicenumbers" : settingsdb.voicenumbers, |
|
42 |
- "Defaultvoicenumber" : settingsdb.defaultvoicenumber |
|
43 |
- }; |
|
44 |
- |
|
45 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
46 |
- |
|
47 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
48 |
- |
|
49 |
- $.ajax({ |
|
50 |
- method: 'GET', |
|
51 |
- url: baseUrl + '/' + userid, |
|
52 |
- contentType: 'text', |
|
53 |
- success: function(sippassword) { |
|
54 |
- |
|
55 |
- var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
56 |
- |
|
57 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
58 |
- |
|
59 |
- window.open(url, "SipTripPhone", "width=354,height=572,menubar=no,scrollbars=no,status=no,addressbar=no,resizable=no"); |
|
60 |
- window.sipUserPasswd = sippassword; |
|
61 |
- |
|
62 |
- } else { |
|
63 |
- window.alert('The phone is already open !'); |
|
64 |
- } |
|
65 |
- } |
|
66 |
- |
|
67 |
- }); |
|
68 |
- } |
|
69 |
- }); |
|
70 |
-}); |
|
71 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,71 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver, |
|
40 |
+ "Tracesipmsg" : settingsdb.tracesipmsg, |
|
41 |
+ "Voicenumbers" : settingsdb.voicenumbers, |
|
42 |
+ "Defaultvoicenumber" : settingsdb.defaultvoicenumber |
|
43 |
+ }; |
|
44 |
+ |
|
45 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
46 |
+ |
|
47 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
48 |
+ |
|
49 |
+ $.ajax({ |
|
50 |
+ method: 'GET', |
|
51 |
+ url: baseUrl + '/' + userid, |
|
52 |
+ contentType: 'text', |
|
53 |
+ success: function(sippassword) { |
|
54 |
+ |
|
55 |
+ var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
56 |
+ |
|
57 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
58 |
+ |
|
59 |
+ window.open(url, "SipTripPhone", "width=354,height=572,menubar=no,scrollbars=no,status=no,addressbar=no,resizable=no"); |
|
60 |
+ window.sipUserPasswd = sippassword; |
|
61 |
+ |
|
62 |
+ } else { |
|
63 |
+ window.alert('The phone is already open !'); |
|
64 |
+ } |
|
65 |
+ } |
|
66 |
+ |
|
67 |
+ }); |
|
68 |
+ } |
|
69 |
+ }); |
|
70 |
+}); |
|
71 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,71 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver |
|
40 |
- }; |
|
41 |
- |
|
42 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
- |
|
44 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
- |
|
46 |
- $.ajax({ |
|
47 |
- method: 'GET', |
|
48 |
- url: baseUrl + '/' + userid, |
|
49 |
- contentType: 'text', |
|
50 |
- success: function(sippassword) { |
|
51 |
- |
|
52 |
- var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
53 |
- |
|
54 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
55 |
- |
|
56 |
- window.open(url, "SipTripPhone", "width=320,height=490,menubar=no,scrollbars=no,status=no,addressbar=no,resizable=no"); |
|
57 |
- |
|
58 |
- window.sipUserPasswd = sippassword; |
|
59 |
- |
|
60 |
- } else { |
|
61 |
- |
|
62 |
- window.alert('The phone is already open !'); |
|
63 |
- |
|
64 |
- } |
|
65 |
- } |
|
66 |
- |
|
67 |
- }); |
|
68 |
- } |
|
69 |
- }); |
|
70 |
-}); |
|
71 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,71 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver |
|
40 |
+ }; |
|
41 |
+ |
|
42 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
+ |
|
44 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
+ |
|
46 |
+ $.ajax({ |
|
47 |
+ method: 'GET', |
|
48 |
+ url: baseUrl + '/' + userid, |
|
49 |
+ contentType: 'text', |
|
50 |
+ success: function(sippassword) { |
|
51 |
+ |
|
52 |
+ var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
53 |
+ |
|
54 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
55 |
+ |
|
56 |
+ window.open(url, "SipTripPhone", "width=320,height=490,menubar=no,scrollbars=no,status=no,addressbar=no,resizable=no"); |
|
57 |
+ |
|
58 |
+ window.sipUserPasswd = sippassword; |
|
59 |
+ |
|
60 |
+ } else { |
|
61 |
+ |
|
62 |
+ window.alert('The phone is already open !'); |
|
63 |
+ |
|
64 |
+ } |
|
65 |
+ } |
|
66 |
+ |
|
67 |
+ }); |
|
68 |
+ } |
|
69 |
+ }); |
|
70 |
+}); |
|
71 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,69 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver |
|
40 |
- }; |
|
41 |
- |
|
42 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
- |
|
44 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
- |
|
46 |
- $.ajax({ |
|
47 |
- method: 'GET', |
|
48 |
- url: baseUrl + '/' + userid, |
|
49 |
- contentType: 'text', |
|
50 |
- success: function(sippassword) { |
|
51 |
- |
|
52 |
- var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
53 |
- |
|
54 |
- var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
- |
|
56 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
- var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
- window.sipUserPasswd = sippassword; |
|
59 |
- return false; |
|
60 |
- } else { |
|
61 |
- window.alert('The phone is already open !'); |
|
62 |
- } |
|
63 |
- } |
|
64 |
- }); |
|
65 |
- |
|
66 |
- } |
|
67 |
- }); |
|
68 |
-}); |
|
69 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,69 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver |
|
40 |
+ }; |
|
41 |
+ |
|
42 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
+ |
|
44 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
+ |
|
46 |
+ $.ajax({ |
|
47 |
+ method: 'GET', |
|
48 |
+ url: baseUrl + '/' + userid, |
|
49 |
+ contentType: 'text', |
|
50 |
+ success: function(sippassword) { |
|
51 |
+ |
|
52 |
+ var url = OC.generateUrl('/apps/sip_trip_phone/phone/index.html'); |
|
53 |
+ |
|
54 |
+ var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
+ |
|
56 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
+ var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
+ window.sipUserPasswd = sippassword; |
|
59 |
+ return false; |
|
60 |
+ } else { |
|
61 |
+ window.alert('The phone is already open !'); |
|
62 |
+ } |
|
63 |
+ } |
|
64 |
+ }); |
|
65 |
+ |
|
66 |
+ } |
|
67 |
+ }); |
|
68 |
+}); |
|
69 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,69 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver |
|
40 |
- }; |
|
41 |
- |
|
42 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
- |
|
44 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
- |
|
46 |
- $.ajax({ |
|
47 |
- method: 'GET', |
|
48 |
- url: baseUrl + '/' + userid, |
|
49 |
- contentType: 'text', |
|
50 |
- success: function(sippassword) { |
|
51 |
- |
|
52 |
- var url = window.location.href + 'phone/index.html'; |
|
53 |
- |
|
54 |
- var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
- |
|
56 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
- var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
- window.sipUserPasswd = sippassword; |
|
59 |
- return false; |
|
60 |
- } else { |
|
61 |
- window.alert('The phone is already open !'); |
|
62 |
- } |
|
63 |
- } |
|
64 |
- }); |
|
65 |
- |
|
66 |
- } |
|
67 |
- }); |
|
68 |
-}); |
|
69 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,69 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver |
|
40 |
+ }; |
|
41 |
+ |
|
42 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
+ |
|
44 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
+ |
|
46 |
+ $.ajax({ |
|
47 |
+ method: 'GET', |
|
48 |
+ url: baseUrl + '/' + userid, |
|
49 |
+ contentType: 'text', |
|
50 |
+ success: function(sippassword) { |
|
51 |
+ |
|
52 |
+ var url = window.location.href + 'phone/index.html'; |
|
53 |
+ |
|
54 |
+ var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
+ |
|
56 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
+ var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
+ window.sipUserPasswd = sippassword; |
|
59 |
+ return false; |
|
60 |
+ } else { |
|
61 |
+ window.alert('The phone is already open !'); |
|
62 |
+ } |
|
63 |
+ } |
|
64 |
+ }); |
|
65 |
+ |
|
66 |
+ } |
|
67 |
+ }); |
|
68 |
+}); |
|
69 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,69 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver |
|
40 |
- }; |
|
41 |
- |
|
42 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
- |
|
44 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
- |
|
46 |
- $.ajax({ |
|
47 |
- method: 'GET', |
|
48 |
- url: baseUrl + '/' + userid, |
|
49 |
- contentType: 'text', |
|
50 |
- success: function(sippassword) { |
|
51 |
- |
|
52 |
- var url = window.location.href + 'phone/index.html'; |
|
53 |
- |
|
54 |
- var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
- |
|
56 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
- var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
- window.sipUserPasswd = sippassword; |
|
59 |
- return false; |
|
60 |
- } else { |
|
61 |
- window.alert('The phone is already open !'); |
|
62 |
- } |
|
63 |
- } |
|
64 |
- }); |
|
65 |
- |
|
66 |
- } |
|
67 |
- }); |
|
68 |
-}); |
|
69 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,69 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver |
|
40 |
+ }; |
|
41 |
+ |
|
42 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
+ |
|
44 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
+ |
|
46 |
+ $.ajax({ |
|
47 |
+ method: 'GET', |
|
48 |
+ url: baseUrl + '/' + userid, |
|
49 |
+ contentType: 'text', |
|
50 |
+ success: function(sippassword) { |
|
51 |
+ |
|
52 |
+ var url = window.location.href + 'phone/index.html'; |
|
53 |
+ |
|
54 |
+ var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
+ |
|
56 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
+ var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
+ window.sipUserPasswd = sippassword; |
|
59 |
+ return false; |
|
60 |
+ } else { |
|
61 |
+ window.alert('The phone is already open !'); |
|
62 |
+ } |
|
63 |
+ } |
|
64 |
+ }); |
|
65 |
+ |
|
66 |
+ } |
|
67 |
+ }); |
|
68 |
+}); |
|
69 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,69 +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 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
- var userid = "<?php p($userId); ?>"; |
|
27 |
- |
|
28 |
- $.ajax({ |
|
29 |
- method: 'GET', |
|
30 |
- url: baseUrl + '/' + userid, |
|
31 |
- contentType: 'application/json', |
|
32 |
- success: function(settingsdb) { |
|
33 |
- |
|
34 |
- var connectData = { |
|
35 |
- "User" : settingsdb.sipusername, |
|
36 |
- "Realm" : settingsdb.siprealm, |
|
37 |
- "Display" : settingsdb.pdisplayname, |
|
38 |
- "WSServer" : settingsdb.stphwssurl, |
|
39 |
- "Stun" : settingsdb.stunserver |
|
40 |
- }; |
|
41 |
- |
|
42 |
- localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
- |
|
44 |
- var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
- |
|
46 |
- $.ajax({ |
|
47 |
- method: 'GET', |
|
48 |
- url: baseUrl + '/' + userid, |
|
49 |
- contentType: 'text', |
|
50 |
- success: function(sippassword) { |
|
51 |
- |
|
52 |
- var url = 'https://' + window.location.host + '/apps/sip_trip_phone/phone/index.html'; |
|
53 |
- |
|
54 |
- var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
- |
|
56 |
- if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
- var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
- window.sipUserPasswd = sippassword; |
|
59 |
- return false; |
|
60 |
- } else { |
|
61 |
- window.alert('The phone is already open !'); |
|
62 |
- } |
|
63 |
- } |
|
64 |
- }); |
|
65 |
- |
|
66 |
- } |
|
67 |
- }); |
|
68 |
-}); |
|
69 |
- |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,69 @@ |
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 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsettings'); |
|
26 |
+ var userid = "<?php p($userId); ?>"; |
|
27 |
+ |
|
28 |
+ $.ajax({ |
|
29 |
+ method: 'GET', |
|
30 |
+ url: baseUrl + '/' + userid, |
|
31 |
+ contentType: 'application/json', |
|
32 |
+ success: function(settingsdb) { |
|
33 |
+ |
|
34 |
+ var connectData = { |
|
35 |
+ "User" : settingsdb.sipusername, |
|
36 |
+ "Realm" : settingsdb.siprealm, |
|
37 |
+ "Display" : settingsdb.pdisplayname, |
|
38 |
+ "WSServer" : settingsdb.stphwssurl, |
|
39 |
+ "Stun" : settingsdb.stunserver |
|
40 |
+ }; |
|
41 |
+ |
|
42 |
+ localStorage.setItem('SIPCreds', JSON.stringify(connectData)); |
|
43 |
+ |
|
44 |
+ var baseUrl = OC.generateUrl('/apps/sip_trip_phone/user/getsippass'); |
|
45 |
+ |
|
46 |
+ $.ajax({ |
|
47 |
+ method: 'GET', |
|
48 |
+ url: baseUrl + '/' + userid, |
|
49 |
+ contentType: 'text', |
|
50 |
+ success: function(sippassword) { |
|
51 |
+ |
|
52 |
+ var url = 'https://' + window.location.host + '/apps/sip_trip_phone/phone/index.html'; |
|
53 |
+ |
|
54 |
+ var features = 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,addressbar=no,width=320,height=490'; |
|
55 |
+ |
|
56 |
+ if (!localStorage.getItem('SipTripPhone')) { |
|
57 |
+ var newPopUpWindow = window.open(url, 'SipTripPhone', features); |
|
58 |
+ window.sipUserPasswd = sippassword; |
|
59 |
+ return false; |
|
60 |
+ } else { |
|
61 |
+ window.alert('The phone is already open !'); |
|
62 |
+ } |
|
63 |
+ } |
|
64 |
+ }); |
|
65 |
+ |
|
66 |
+ } |
|
67 |
+ }); |
|
68 |
+}); |
|
69 |
+ |