@vgroup/dialbox 0.8.10 → 0.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/call-progress/call-progress.component.mjs +32 -4
- package/esm2020/lib/environments/environments.mjs +15 -12
- package/fesm2015/vgroup-dialbox.mjs +49 -18
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +45 -14
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/lib/environments/environments.d.ts +3 -0
- package/package.json +1 -1
- package/vgroup-dialbox-0.8.11.tgz +0 -0
|
@@ -62,23 +62,23 @@ const keypad = [
|
|
|
62
62
|
];
|
|
63
63
|
|
|
64
64
|
const environment = {
|
|
65
|
-
abb: "
|
|
66
|
-
production:
|
|
65
|
+
abb: "u",
|
|
66
|
+
production: false,
|
|
67
67
|
secureCookies: true,
|
|
68
|
-
feUrl: 'https://
|
|
69
|
-
apiUrl: 'https://
|
|
70
|
-
websocketUrl: 'wss://
|
|
68
|
+
feUrl: 'https://c2c-uat.contexttocall.com:85/',
|
|
69
|
+
apiUrl: 'https://c2c-uatapi-t10.contexttocall.com/uat_softphone',
|
|
70
|
+
websocketUrl: 'wss://c2c-uatapi-t10.contexttocall.com/uat_softphone/',
|
|
71
71
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
72
|
-
stripePublishableKey: "
|
|
72
|
+
stripePublishableKey: "pk_live_51NbMVaA3guus6fhl85gdcvAWHzfHba5LdGlsnV7DxBT9spHghn4IHT9rDCjSRgFh2ijTiZn9qeazdciY1PbreOuB00t1GdQAZJ",
|
|
73
73
|
sessionTimeout: 15,
|
|
74
74
|
deviceType: "web",
|
|
75
|
-
appVersion: "
|
|
75
|
+
appVersion: "2.9",
|
|
76
76
|
channelId: '6511738039ee10367cbde2e9',
|
|
77
77
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
78
|
-
c2c_support_channel_id: '
|
|
78
|
+
c2c_support_channel_id: '677f68fcbe93ab507fbbfe0b',
|
|
79
79
|
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
80
|
-
c2c_call_label_id: '
|
|
81
|
-
c2c_email_label_id: '
|
|
80
|
+
c2c_call_label_id: '5M4taT8xzAg9pPIUADOW',
|
|
81
|
+
c2c_email_label_id: 'MUUC4NV5bLqHixXyhmok',
|
|
82
82
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
83
83
|
firebase: {
|
|
84
84
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -90,7 +90,10 @@ const environment = {
|
|
|
90
90
|
measurementId: "G-NGXTSV9SH3",
|
|
91
91
|
vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
|
|
92
92
|
},
|
|
93
|
-
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
|
|
93
|
+
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
|
|
94
|
+
keycloakURL: 'https://test-keycloak.vgroupinc.com/',
|
|
95
|
+
keycloakRealm: 'vgroup-test',
|
|
96
|
+
keycloakClientId: 'c2c-softphone-app'
|
|
94
97
|
};
|
|
95
98
|
|
|
96
99
|
class IpAddressService {
|
|
@@ -3012,8 +3015,15 @@ class CallProgressComponent {
|
|
|
3012
3015
|
await this.connectToDevice(callAuthId, callData, tokenData);
|
|
3013
3016
|
await this.pollCallStatus(callAuthId);
|
|
3014
3017
|
console.log('Call initiated successfully:', response);
|
|
3015
|
-
|
|
3018
|
+
(async () => {
|
|
3016
3019
|
try {
|
|
3020
|
+
const clientSid = await this.waitForClientCallSid();
|
|
3021
|
+
if (!clientSid) {
|
|
3022
|
+
console.error('CallSid not available within 10 seconds, skipping addClientParticipant');
|
|
3023
|
+
this.isNewCallLoader = false;
|
|
3024
|
+
this.showRingAnimation = false;
|
|
3025
|
+
return;
|
|
3026
|
+
}
|
|
3017
3027
|
let addClientParticipantRes = await this.addClientParticipant({
|
|
3018
3028
|
from: callData?.from,
|
|
3019
3029
|
route: "OUTGOING",
|
|
@@ -3023,7 +3033,7 @@ class CallProgressComponent {
|
|
|
3023
3033
|
proxy: '',
|
|
3024
3034
|
countrycode: '',
|
|
3025
3035
|
deviceId: this.deviceId,
|
|
3026
|
-
clientSid:
|
|
3036
|
+
clientSid: clientSid,
|
|
3027
3037
|
});
|
|
3028
3038
|
if (addClientParticipantRes?.status != 200) {
|
|
3029
3039
|
swal("Error", addClientParticipantRes?.message, "error");
|
|
@@ -3054,7 +3064,7 @@ class CallProgressComponent {
|
|
|
3054
3064
|
catch (e) {
|
|
3055
3065
|
console.error('Error adding initial participant:', e);
|
|
3056
3066
|
}
|
|
3057
|
-
}
|
|
3067
|
+
})();
|
|
3058
3068
|
// Poll the status for 30-45 seconds
|
|
3059
3069
|
}
|
|
3060
3070
|
else if (response.status == 201) {
|
|
@@ -3232,6 +3242,26 @@ class CallProgressComponent {
|
|
|
3232
3242
|
async addParticipantToCall(payload) {
|
|
3233
3243
|
return await this.extensionService.addParticipant(payload).toPromise();
|
|
3234
3244
|
}
|
|
3245
|
+
// Polls for the Twilio client CallSid until it's available or the timeout expires
|
|
3246
|
+
waitForClientCallSid(timeoutMs = 10000, intervalMs = 500) {
|
|
3247
|
+
const getSid = () => this.call?.parameters?.['CallSid'] || this.twilioService.call?.parameters?.['CallSid'];
|
|
3248
|
+
return new Promise((resolve) => {
|
|
3249
|
+
const startTime = Date.now();
|
|
3250
|
+
const check = () => {
|
|
3251
|
+
const sid = getSid();
|
|
3252
|
+
if (sid) {
|
|
3253
|
+
resolve(sid);
|
|
3254
|
+
}
|
|
3255
|
+
else if (Date.now() - startTime >= timeoutMs) {
|
|
3256
|
+
resolve(null);
|
|
3257
|
+
}
|
|
3258
|
+
else {
|
|
3259
|
+
setTimeout(check, intervalMs);
|
|
3260
|
+
}
|
|
3261
|
+
};
|
|
3262
|
+
check();
|
|
3263
|
+
});
|
|
3264
|
+
}
|
|
3235
3265
|
addClientParticipant(payload) {
|
|
3236
3266
|
return this.extensionService.addClientParticipant(payload).toPromise();
|
|
3237
3267
|
}
|
|
@@ -3267,6 +3297,7 @@ class CallProgressComponent {
|
|
|
3267
3297
|
},
|
|
3268
3298
|
rtcConstraints: { audio: true },
|
|
3269
3299
|
});
|
|
3300
|
+
console.log('call object', this.call);
|
|
3270
3301
|
this.twilioService.call = this.call;
|
|
3271
3302
|
this.setupEventListeners();
|
|
3272
3303
|
}
|