@vgroup/dialbox 0.6.3-0.11 → 0.6.3-0.12

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.
@@ -3899,11 +3899,16 @@ class DialboxComponent {
3899
3899
  // so we can auto-open on incoming calls.
3900
3900
  this.initializeTwilio();
3901
3901
  this.incomeingCallSocketService.connect(this.deviceId);
3902
+ let deviceNumberList = this.callerIdList.map((res) => res.number);
3902
3903
  try {
3903
3904
  this.incomeingCallSocketService.listen().subscribe(async (incomingCallData) => {
3904
3905
  this.twilioService.conferenceCallInfo = incomingCallData;
3905
3906
  incomingCallData = incomingCallData?.length > 0 ? incomingCallData.filter((item) => item.participants?.length > 0) : [];
3906
- if (!!incomingCallData?.length) {
3907
+ let ourNumber = {};
3908
+ this.incomingCallData.forEach((callInfo, i) => {
3909
+ ourNumber = callInfo.participants.find((resData) => ((deviceNumberList.includes(resData?.from) && resData?.to == 'c2c_softphone_client') || (deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call')) && !resData?.isLeft);
3910
+ });
3911
+ if (!!incomingCallData?.length && ourNumber?.id) {
3907
3912
  // this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
3908
3913
  this.incomingCallsList = incomingCallData || [];
3909
3914
  let parentCall = [];