@vgroup/dialbox 0.7.39 → 0.7.41

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