@vgroup/dialbox 0.7.35 → 0.7.36

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.
@@ -3011,7 +3011,7 @@ class CallProgressComponent {
3011
3011
  }
3012
3012
  this.intervalId = setInterval(() => {
3013
3013
  seconds++;
3014
- this.timer = this.formatTime(seconds);
3014
+ // this.timer = this.formatTime(seconds);
3015
3015
  this.cdr.detectChanges();
3016
3016
  }, 1000);
3017
3017
  }
@@ -3156,7 +3156,7 @@ class CallProgressComponent {
3156
3156
  }
3157
3157
  // Set selection immediately so the highlight appears before the API responds.
3158
3158
  this.selectedUserInfo = userInfo;
3159
- let participantID = userInfo?.businessParticipantId || userInfo?.participantId;
3159
+ let participantID = userInfo?.businessParticipantId || userInfo?.participantId || userInfo?.id;
3160
3160
  if (!this.C2ConfoList[userInfo?.participantId] && !this.C2ConfoList[userInfo?.businessParticipantId]) {
3161
3161
  this.extensionService.getUserInformation(participantID).subscribe({
3162
3162
  next: (resInfo) => {
@@ -3179,35 +3179,65 @@ class CallProgressComponent {
3179
3179
  // await this.getAllParticipants(this.currentCall.conferenceId);
3180
3180
  this.filteredParticipentList = this.allParticipentList;
3181
3181
  }
3182
+ // async waitingCallAccept(incomingCallInfo:any) {
3183
+ // let ourNumberInfo: any = {}
3184
+ // this.newIncomingCallsList.forEach((callInfo: any, i: number) => {
3185
+ // // this.currentCall?.conferenceId == callInfo.conferenceId
3186
+ // ourNumberInfo = callInfo.participants.find((resData: any) =>
3187
+ // ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
3188
+ // );
3189
+ // if (ourNumberInfo?.id && ourNumberInfo?.conferenceId !== incomingCallInfo?.conferenceId) {
3190
+ // this.isUnholdConferenceCall = true;
3191
+ // let holdInfo: any = await this.onholdOrUnholdParticipant({
3192
+ // participantId: [ourNumberInfo?.id],
3193
+ // conferenceId: ourNumberInfo?.conferenceId,
3194
+ // hold: true,
3195
+ // mute: ourNumberInfo?.mute || false
3196
+ // });
3197
+ // if(holdInfo?.status != 200) {
3198
+ // console.error('holdInfo 1091', holdInfo)
3199
+ // }
3200
+ // this.isConferenceCallHold = true;
3201
+ // }
3202
+ // })
3203
+ // // if (callInfo?.participants?.length) {
3204
+ // // ourNumberInfo = callInfo.participants.find((resData: any) =>
3205
+ // // ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
3206
+ // // );
3207
+ // // }
3208
+ // const capturedCall = this.twilioService.getIncomingCallById(incomingCallInfo?.clientSid) || this.twilioService.incomingCallDetail;
3209
+ // this.twilioService.acceptedCallList.forEach((call: any) => {
3210
+ // call.mute(true);
3211
+ // });
3212
+ // this.add(incomingCallInfo, ourNumberInfo, capturedCall);
3213
+ // }
3182
3214
  async waitingCallAccept(incomingCallInfo) {
3183
3215
  let ourNumberInfo = {};
3184
- this.newIncomingCallsList.forEach((callInfo, i) => {
3185
- // this.currentCall?.conferenceId == callInfo.conferenceId
3216
+ let callInfo = this.newIncomingCallsList.find((callInfo, i) => this.currentCall?.conferenceId == callInfo.conferenceId);
3217
+ if (callInfo?.participants?.length) {
3186
3218
  ourNumberInfo = callInfo.participants.find((resData) => ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData));
3187
- if (ourNumberInfo?.id && ourNumberInfo?.conferenceId !== incomingCallInfo?.conferenceId) {
3188
- this.isUnholdConferenceCall = true;
3189
- let holdInfo = this.onholdOrUnholdParticipant({
3190
- participantId: [ourNumberInfo?.id],
3191
- conferenceId: ourNumberInfo?.conferenceId,
3192
- hold: true,
3193
- mute: ourNumberInfo?.mute || false
3194
- });
3195
- if (holdInfo?.status != 200) {
3196
- console.error('holdInfo 1091', holdInfo);
3197
- }
3198
- this.isConferenceCallHold = true;
3199
- }
3200
- });
3201
- // if (callInfo?.participants?.length) {
3202
- // ourNumberInfo = callInfo.participants.find((resData: any) =>
3203
- // ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
3204
- // );
3205
- // }
3219
+ }
3206
3220
  const capturedCall = this.twilioService.getIncomingCallById(incomingCallInfo?.clientSid) || this.twilioService.incomingCallDetail;
3207
3221
  this.twilioService.acceptedCallList.forEach((call) => {
3208
3222
  call.mute(true);
3209
3223
  });
3210
- this.add(incomingCallInfo, ourNumberInfo, capturedCall);
3224
+ if (ourNumberInfo?.id && ourNumberInfo?.conferenceId !== incomingCallInfo?.conferenceId) {
3225
+ this.isUnholdConferenceCall = true;
3226
+ let holdInfo = await this.onholdOrUnholdParticipant({
3227
+ participantId: [ourNumberInfo?.id],
3228
+ conferenceId: ourNumberInfo?.conferenceId,
3229
+ hold: true,
3230
+ mute: ourNumberInfo?.mute || false
3231
+ });
3232
+ if (holdInfo?.status != 200) {
3233
+ console.error('holdInfo 1091', holdInfo);
3234
+ }
3235
+ this.isConferenceCallHold = true;
3236
+ this.add(incomingCallInfo, ourNumberInfo, capturedCall);
3237
+ }
3238
+ else {
3239
+ this.add(incomingCallInfo, ourNumberInfo, capturedCall);
3240
+ }
3211
3241
  }
3212
3242
  async add(data, ourNumberInfo, capturedCall) {
3213
3243
  this.isConnecting = true;
@@ -4038,10 +4068,10 @@ class CallProgressComponent {
4038
4068
  }
4039
4069
  onCloseC2CInfoPanel() {
4040
4070
  // this.isClickExpand = false;
4041
- let businessInfo = this.currentConferenceCall?.participants.find((item) => !!item?.businessNumber && this.deviceNumberList.includes(item?.to) && item?.host);
4071
+ let businessInfo = this.currentConferenceCall?.participants.find((item) => !!item?.businessNumber && this.deviceNumberList.includes(item?.to) && !item?.host);
4042
4072
  if (businessInfo) {
4043
- this.selectedUserInfo = businessInfo;
4044
- this.toggleC2CInfoPanel(businessInfo);
4073
+ this.selectedUserInfo = this.currentCallList.find(res => businessInfo?.id == res?.id);
4074
+ this.toggleC2CInfoPanel(this.selectedUserInfo);
4045
4075
  }
4046
4076
  else {
4047
4077
  this.isClickExpand = false;