@vgroup/dialbox 0.7.39 → 0.7.40

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.
@@ -2475,7 +2475,7 @@ class CallProgressComponent {
2475
2475
  }
2476
2476
  }
2477
2477
  }
2478
- const rejoinParticipentInfo = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants.find((resData) => (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.client)));
2478
+ const rejoinParticipentInfo = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants.find((resData) => (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.client) && (resData === null || resData === void 0 ? void 0 : resData.host)));
2479
2479
  this.showRingAnimation = true;
2480
2480
  // 1️⃣ Get new token for same conference
2481
2481
  const tokenData = yield this.getOutgoingCallToken(callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId);
@@ -2509,7 +2509,8 @@ class CallProgressComponent {
2509
2509
  proxy: '',
2510
2510
  countrycode: '',
2511
2511
  deviceId: this.deviceId,
2512
- clientSid: (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['CallSid']
2512
+ clientSid: (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['CallSid'],
2513
+ recordId: rejoinParticipentInfo === null || rejoinParticipentInfo === void 0 ? void 0 : rejoinParticipentInfo.id
2513
2514
  });
2514
2515
  this.conferenceCallIDForParticipantList = rejoinParticipentInfo === null || rejoinParticipentInfo === void 0 ? void 0 : rejoinParticipentInfo.conferenceId;
2515
2516
  this.setupEventListeners();
@@ -3036,7 +3037,7 @@ class CallProgressComponent {
3036
3037
  else {
3037
3038
  if (conf === null || conf === void 0 ? void 0 : conf.conferenceId) {
3038
3039
  let participentInfo = (_d = conference === null || conference === void 0 ? void 0 : conference.participants) === null || _d === void 0 ? void 0 : _d.find((participant) => ((this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.from)
3039
- && (participant === null || participant === void 0 ? void 0 : participant.client)) || (this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.to) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'incoming-call' && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber)) && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber)) && !(participant === null || participant === void 0 ? void 0 : participant.isLeft));
3040
+ && (participant === null || participant === void 0 ? void 0 : participant.client) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'outgoing-call') || (this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.to) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'incoming-call' && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber)) && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber)) && !(participant === null || participant === void 0 ? void 0 : participant.isLeft));
3040
3041
  if (participentInfo === null || participentInfo === void 0 ? void 0 : participentInfo.id) {
3041
3042
  if (this.isInMultipleConferences()) {
3042
3043
  this.leaveConfParticipant = participentInfo;
@@ -4021,7 +4022,7 @@ class CallProgressComponent {
4021
4022
  if ((_c = this.selectedConf) === null || _c === void 0 ? void 0 : _c.conferenceId) {
4022
4023
  let conference = (_d = this.newIncomingCallsList) === null || _d === void 0 ? void 0 : _d.find((res) => { var _a; return (res === null || res === void 0 ? void 0 : res.conferenceId) == ((_a = this.selectedConf) === null || _a === void 0 ? void 0 : _a.conferenceId); });
4023
4024
  let participentInfo = (_e = conference === null || conference === void 0 ? void 0 : conference.participants) === null || _e === void 0 ? void 0 : _e.find((participant) => ((this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.from)
4024
- && (participant === null || participant === void 0 ? void 0 : participant.client)) || (this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.to) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'incoming-call' && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber)) && (participant === null || participant === void 0 ? void 0 : participant.client)) && !(participant === null || participant === void 0 ? void 0 : participant.isLeft));
4025
+ && (participant === null || participant === void 0 ? void 0 : participant.client) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'outgoing-call') || (this.deviceNumberList.includes(participant === null || participant === void 0 ? void 0 : participant.to) && (participant === null || participant === void 0 ? void 0 : participant.direction) == 'incoming-call' && !(participant === null || participant === void 0 ? void 0 : participant.businessNumber) && (participant === null || participant === void 0 ? void 0 : participant.host)) && (participant === null || participant === void 0 ? void 0 : participant.client)) && !(participant === null || participant === void 0 ? void 0 : participant.isLeft));
4025
4026
  if (participentInfo === null || participentInfo === void 0 ? void 0 : participentInfo.id) {
4026
4027
  if (this.isInMultipleConferences()) {
4027
4028
  // Show popup instead of directly leaving
@@ -4381,22 +4382,23 @@ class DialboxComponent {
4381
4382
  // the conference participants using a keepalive request so it survives the
4382
4383
  // page being torn down (a normal HttpClient call would be cancelled).
4383
4384
  if (this.isCallInProgress || ((_a = this.incomingCallsList) === null || _a === void 0 ? void 0 : _a.length)) {
4384
- this.removeParticipantsOnUnload();
4385
- }
4386
- }
4387
- removeParticipantsOnUnload() {
4388
- var _a, _b;
4389
- const conferenceId = (_b = (_a = this.incomingCallsList) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.conferenceId;
4390
- if (!conferenceId) {
4391
- return;
4392
- }
4393
- try {
4394
- fetch(`${environment.apiUrl}/utilities/ext/ur/remove/participant/all/${conferenceId}`, { method: 'GET', keepalive: true });
4395
- }
4396
- catch (_c) {
4397
- // Best-effort cleanup during unload; nothing else we can do here.
4385
+ // this.removeParticipantsOnUnload();
4398
4386
  }
4399
4387
  }
4388
+ // private removeParticipantsOnUnload() {
4389
+ // const conferenceId = this.incomingCallsList?.[0]?.conferenceId;
4390
+ // if (!conferenceId) {
4391
+ // return;
4392
+ // }
4393
+ // try {
4394
+ // fetch(
4395
+ // `${environment.apiUrl}/utilities/ext/ur/remove/participant/all/${conferenceId}`,
4396
+ // { method: 'GET', keepalive: true }
4397
+ // );
4398
+ // } catch {
4399
+ // // Best-effort cleanup during unload; nothing else we can do here.
4400
+ // }
4401
+ // }
4400
4402
  constructor(twilioService, extService, ipService, extensionService, cdk, router, incomeingCallSocketService) {
4401
4403
  this.twilioService = twilioService;
4402
4404
  this.extService = extService;