@vgroup/dialbox 0.6.56 → 0.6.58
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 +42 -43
- package/fesm2015/vgroup-dialbox.mjs +42 -43
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +41 -42
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2092,7 +2092,7 @@ class CallProgressComponent {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
getStatus(res) {
|
|
2094
2094
|
if ((res === null || res === void 0 ? void 0 : res.direction) == "incoming-call") {
|
|
2095
|
-
return (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-join" || (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-hold" || (res === null || res === void 0 ? void 0 : res.callStatus) == 'connected' ? true : this.incomeingCallSocketService.isCurrentIncomingCallList.includes(res.id);
|
|
2095
|
+
return (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-join" || (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-mute" || (res === null || res === void 0 ? void 0 : res.callStatus) == "participant-hold" || (res === null || res === void 0 ? void 0 : res.callStatus) == 'connected' ? true : this.incomeingCallSocketService.isCurrentIncomingCallList.includes(res.id);
|
|
2096
2096
|
}
|
|
2097
2097
|
else {
|
|
2098
2098
|
if (res.status == 'answered' && res.direction == "incoming-call") {
|
|
@@ -2185,44 +2185,8 @@ class CallProgressComponent {
|
|
|
2185
2185
|
// this.getUserInformation(callAuthId)
|
|
2186
2186
|
this.recordCall = recordCall; // Store the recordCall value
|
|
2187
2187
|
// const tokenData: any = await this.getOutgoingCallToken(callAuthId);
|
|
2188
|
-
yield this.connectToDevice(callAuthId, callData, tokenData);
|
|
2188
|
+
yield this.connectToDevice(callAuthId, callData, tokenData, response);
|
|
2189
2189
|
yield this.pollCallStatus(callAuthId);
|
|
2190
|
-
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
2191
|
-
var _b, _c, _d, _e, _f;
|
|
2192
|
-
try {
|
|
2193
|
-
// **************need to update*******************
|
|
2194
|
-
let addClientParticipantRes = this.addClientParticipant({
|
|
2195
|
-
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2196
|
-
route: "OUTGOING",
|
|
2197
|
-
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2198
|
-
conferenceId: (_b = response === null || response === void 0 ? void 0 : response.callauth) === null || _b === void 0 ? void 0 : _b.id,
|
|
2199
|
-
userId: this.userId || localStorage.getItem('userId'),
|
|
2200
|
-
proxy: '',
|
|
2201
|
-
countrycode: '',
|
|
2202
|
-
deviceId: this.deviceId,
|
|
2203
|
-
clientSid: (_c = this.call) === null || _c === void 0 ? void 0 : _c.parameters['CallSid']
|
|
2204
|
-
});
|
|
2205
|
-
console.log('addClientParticipantRes', addClientParticipantRes);
|
|
2206
|
-
this.addRes = yield this.addParticipantToCall({
|
|
2207
|
-
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2208
|
-
route: "OUTGOING",
|
|
2209
|
-
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2210
|
-
conferenceId: (_d = response === null || response === void 0 ? void 0 : response.callauth) === null || _d === void 0 ? void 0 : _d.id,
|
|
2211
|
-
userId: this.userId || localStorage.getItem('userId'),
|
|
2212
|
-
proxy: '',
|
|
2213
|
-
countrycode: '',
|
|
2214
|
-
deviceId: this.deviceId,
|
|
2215
|
-
});
|
|
2216
|
-
this.isNewAddedCall = false;
|
|
2217
|
-
this.extensionService.isLoadershow.next(false);
|
|
2218
|
-
this.isLoadershown.emit(false);
|
|
2219
|
-
yield this.getAllParticipants((_e = this.addRes) === null || _e === void 0 ? void 0 : _e.conferenceSid);
|
|
2220
|
-
console.log('Initial participantId:', (_f = this.addRes) === null || _f === void 0 ? void 0 : _f.participantId);
|
|
2221
|
-
}
|
|
2222
|
-
catch (e) {
|
|
2223
|
-
console.error('Error adding initial participant:', e);
|
|
2224
|
-
}
|
|
2225
|
-
}), 1000);
|
|
2226
2190
|
// Poll the status for 30-45 seconds
|
|
2227
2191
|
}
|
|
2228
2192
|
else if (response.status == 201) {
|
|
@@ -2348,7 +2312,7 @@ class CallProgressComponent {
|
|
|
2348
2312
|
return yield this.extensionService.getConferenceCallToken({ authId: callAuthId }).toPromise();
|
|
2349
2313
|
});
|
|
2350
2314
|
}
|
|
2351
|
-
connectToDevice(token, callData, tokenData) {
|
|
2315
|
+
connectToDevice(token, callData, tokenData, response) {
|
|
2352
2316
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2353
2317
|
const options = {
|
|
2354
2318
|
codecPreferences: ['opus', 'pcmu'],
|
|
@@ -2366,12 +2330,51 @@ class CallProgressComponent {
|
|
|
2366
2330
|
rtcConstraints: { audio: true },
|
|
2367
2331
|
});
|
|
2368
2332
|
this.twilioService.call = this.call;
|
|
2333
|
+
this.setUpParticipent(callData, response);
|
|
2369
2334
|
console.log('test98998111111', this.call);
|
|
2370
2335
|
console.log('testdevice', this.twilioService.device);
|
|
2371
2336
|
// this.call['callInfo'] = JSON.parse(JSON.stringify(callData));
|
|
2372
2337
|
this.setupEventListeners();
|
|
2373
2338
|
});
|
|
2374
2339
|
}
|
|
2340
|
+
setUpParticipent(callData, response) {
|
|
2341
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
2342
|
+
var _a, _b, _c, _d, _e;
|
|
2343
|
+
try {
|
|
2344
|
+
// **************need to update*******************
|
|
2345
|
+
let addClientParticipantRes = this.addClientParticipant({
|
|
2346
|
+
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2347
|
+
route: "OUTGOING",
|
|
2348
|
+
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2349
|
+
conferenceId: (_a = response === null || response === void 0 ? void 0 : response.callauth) === null || _a === void 0 ? void 0 : _a.id,
|
|
2350
|
+
userId: this.userId || localStorage.getItem('userId'),
|
|
2351
|
+
proxy: '',
|
|
2352
|
+
countrycode: '',
|
|
2353
|
+
deviceId: this.deviceId,
|
|
2354
|
+
clientSid: (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['CallSid']
|
|
2355
|
+
});
|
|
2356
|
+
console.log('addClientParticipantRes', addClientParticipantRes);
|
|
2357
|
+
this.addRes = yield this.addParticipantToCall({
|
|
2358
|
+
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2359
|
+
route: "OUTGOING",
|
|
2360
|
+
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2361
|
+
conferenceId: (_c = response === null || response === void 0 ? void 0 : response.callauth) === null || _c === void 0 ? void 0 : _c.id,
|
|
2362
|
+
userId: this.userId || localStorage.getItem('userId'),
|
|
2363
|
+
proxy: '',
|
|
2364
|
+
countrycode: '',
|
|
2365
|
+
deviceId: this.deviceId,
|
|
2366
|
+
});
|
|
2367
|
+
this.isNewAddedCall = false;
|
|
2368
|
+
this.extensionService.isLoadershow.next(false);
|
|
2369
|
+
this.isLoadershown.emit(false);
|
|
2370
|
+
yield this.getAllParticipants((_d = this.addRes) === null || _d === void 0 ? void 0 : _d.conferenceSid);
|
|
2371
|
+
console.log('Initial participantId:', (_e = this.addRes) === null || _e === void 0 ? void 0 : _e.participantId);
|
|
2372
|
+
}
|
|
2373
|
+
catch (e) {
|
|
2374
|
+
console.error('Error adding initial participant:', e);
|
|
2375
|
+
}
|
|
2376
|
+
}), 1300);
|
|
2377
|
+
}
|
|
2375
2378
|
setupEventListeners() {
|
|
2376
2379
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2377
2380
|
this.startTimer();
|
|
@@ -3127,13 +3130,9 @@ class CallProgressComponent {
|
|
|
3127
3130
|
}
|
|
3128
3131
|
else if (this.callStatus === 'completed') {
|
|
3129
3132
|
clearInterval(intervalId);
|
|
3130
|
-
console.log('test1');
|
|
3131
3133
|
this.endCall();
|
|
3132
3134
|
this.stopRecording();
|
|
3133
3135
|
}
|
|
3134
|
-
else if (this.callStatus === 'ringing') {
|
|
3135
|
-
// Continue polling; do not clear the interval yet
|
|
3136
|
-
}
|
|
3137
3136
|
}
|
|
3138
3137
|
}
|
|
3139
3138
|
catch (error) {
|