@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.
@@ -2524,7 +2524,7 @@ class CallProgressComponent {
2524
2524
  }
2525
2525
  }
2526
2526
  }
2527
- const rejoinParticipentInfo = callInfo?.participants.find((resData) => (this.deviceNumberList.includes(resData?.from) && resData?.client));
2527
+ const rejoinParticipentInfo = callInfo?.participants.find((resData) => (this.deviceNumberList.includes(resData?.from) && resData?.client && resData?.host));
2528
2528
  this.showRingAnimation = true;
2529
2529
  // 1️⃣ Get new token for same conference
2530
2530
  const tokenData = await this.getOutgoingCallToken(callInfo?.conferenceId);
@@ -2557,7 +2557,8 @@ class CallProgressComponent {
2557
2557
  proxy: '',
2558
2558
  countrycode: '',
2559
2559
  deviceId: this.deviceId,
2560
- clientSid: this.call?.parameters['CallSid']
2560
+ clientSid: this.call?.parameters['CallSid'],
2561
+ recordId: rejoinParticipentInfo?.id
2561
2562
  });
2562
2563
  this.conferenceCallIDForParticipantList = rejoinParticipentInfo?.conferenceId;
2563
2564
  this.setupEventListeners();
@@ -3049,7 +3050,7 @@ class CallProgressComponent {
3049
3050
  else {
3050
3051
  if (conf?.conferenceId) {
3051
3052
  let participentInfo = conference?.participants?.find((participant) => ((this.deviceNumberList.includes(participant?.from)
3052
- && participant?.client) || (this.deviceNumberList.includes(participant?.to) && participant?.direction == 'incoming-call' && !participant?.businessNumber) && !participant?.businessNumber) && !participant?.isLeft);
3053
+ && participant?.client && participant?.direction == 'outgoing-call') || (this.deviceNumberList.includes(participant?.to) && participant?.direction == 'incoming-call' && !participant?.businessNumber) && !participant?.businessNumber) && !participant?.isLeft);
3053
3054
  if (participentInfo?.id) {
3054
3055
  if (this.isInMultipleConferences()) {
3055
3056
  this.leaveConfParticipant = participentInfo;
@@ -3995,7 +3996,7 @@ class CallProgressComponent {
3995
3996
  if (this.selectedConf?.conferenceId) {
3996
3997
  let conference = this.newIncomingCallsList?.find((res) => res?.conferenceId == this.selectedConf?.conferenceId);
3997
3998
  let participentInfo = conference?.participants?.find((participant) => ((this.deviceNumberList.includes(participant?.from)
3998
- && participant?.client) || (this.deviceNumberList.includes(participant?.to) && participant?.direction == 'incoming-call' && !participant?.businessNumber) && participant?.client) && !participant?.isLeft);
3999
+ && participant?.client && participant?.direction == 'outgoing-call') || (this.deviceNumberList.includes(participant?.to) && participant?.direction == 'incoming-call' && !participant?.businessNumber && participant?.host) && participant?.client) && !participant?.isLeft);
3999
4000
  if (participentInfo?.id) {
4000
4001
  if (this.isInMultipleConferences()) {
4001
4002
  // Show popup instead of directly leaving
@@ -4346,21 +4347,23 @@ class DialboxComponent {
4346
4347
  // the conference participants using a keepalive request so it survives the
4347
4348
  // page being torn down (a normal HttpClient call would be cancelled).
4348
4349
  if (this.isCallInProgress || this.incomingCallsList?.length) {
4349
- this.removeParticipantsOnUnload();
4350
- }
4351
- }
4352
- removeParticipantsOnUnload() {
4353
- const conferenceId = this.incomingCallsList?.[0]?.conferenceId;
4354
- if (!conferenceId) {
4355
- return;
4356
- }
4357
- try {
4358
- fetch(`${environment.apiUrl}/utilities/ext/ur/remove/participant/all/${conferenceId}`, { method: 'GET', keepalive: true });
4359
- }
4360
- catch {
4361
- // Best-effort cleanup during unload; nothing else we can do here.
4350
+ // this.removeParticipantsOnUnload();
4362
4351
  }
4363
4352
  }
4353
+ // private removeParticipantsOnUnload() {
4354
+ // const conferenceId = this.incomingCallsList?.[0]?.conferenceId;
4355
+ // if (!conferenceId) {
4356
+ // return;
4357
+ // }
4358
+ // try {
4359
+ // fetch(
4360
+ // `${environment.apiUrl}/utilities/ext/ur/remove/participant/all/${conferenceId}`,
4361
+ // { method: 'GET', keepalive: true }
4362
+ // );
4363
+ // } catch {
4364
+ // // Best-effort cleanup during unload; nothing else we can do here.
4365
+ // }
4366
+ // }
4364
4367
  constructor(twilioService, extService, ipService, extensionService, cdk, router, incomeingCallSocketService) {
4365
4368
  this.twilioService = twilioService;
4366
4369
  this.extService = extService;