@vgroup/dialbox 0.7.83 → 0.7.84

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.
@@ -63,23 +63,23 @@ const keypad = [
63
63
  ];
64
64
 
65
65
  const environment = {
66
- abb: "p",
67
- production: true,
66
+ abb: "u",
67
+ production: false,
68
68
  secureCookies: true,
69
- feUrl: 'https://app-phone.contexttocall.com/',
70
- apiUrl: 'https://phone-api.contexttocall.com/softphone/',
71
- websocketUrl: 'wss://phone-api.contexttocall.com/softphone/',
69
+ feUrl: 'https://c2c-uat.contexttocall.com:85/',
70
+ apiUrl: 'https://c2c-uatapi-t10.contexttocall.com/uat_softphone',
71
+ websocketUrl: 'wss://c2c-uatapi-t10.contexttocall.com/uat_softphone/',
72
72
  captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
73
- stripePublishableKey: "pk_live_51OV9NYDjRTFWP7oMLrrgaWxCUp4nzeuwdDCCPjvwH7z6oDYUTierhavGMxBa411U0O27Yn24te7Hb43WFDwg2U7N00qbQUzTi6",
73
+ stripePublishableKey: "pk_live_51NbMVaA3guus6fhl85gdcvAWHzfHba5LdGlsnV7DxBT9spHghn4IHT9rDCjSRgFh2ijTiZn9qeazdciY1PbreOuB00t1GdQAZJ",
74
74
  sessionTimeout: 15,
75
75
  deviceType: "web",
76
- appVersion: "3.2",
76
+ appVersion: "2.9",
77
77
  channelId: '6511738039ee10367cbde2e9',
78
78
  c2c_support_point_id: '60424735f74ac306c1bfa900',
79
- c2c_support_channel_id: '67783949be93ab03faf8eea6',
79
+ c2c_support_channel_id: '677f68fcbe93ab507fbbfe0b',
80
80
  c2c_point_url: 'https://bit.ly/3blWnPv',
81
- c2c_call_label_id: 'Bn78kjz6sSottXSHgqMt',
82
- c2c_email_label_id: 'UkNer4LgzXCfFlh8u909',
81
+ c2c_call_label_id: '5M4taT8xzAg9pPIUADOW',
82
+ c2c_email_label_id: 'MUUC4NV5bLqHixXyhmok',
83
83
  radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
84
84
  firebase: {
85
85
  apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
@@ -91,7 +91,10 @@ const environment = {
91
91
  measurementId: "G-NGXTSV9SH3",
92
92
  vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
93
93
  },
94
- perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
94
+ perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
95
+ keycloakURL: 'https://test-keycloak.vgroupinc.com/',
96
+ keycloakRealm: 'vgroup-test',
97
+ keycloakClientId: 'c2c-softphone-app'
95
98
  };
96
99
 
97
100
  class IpAddressService {
@@ -1599,7 +1602,12 @@ class TwilioService {
1599
1602
  this.refreshDeviceToken();
1600
1603
  });
1601
1604
  device.on('incoming', (call) => {
1602
- var _a;
1605
+ var _a, _b;
1606
+ const incomingCallSid = (_a = call === null || call === void 0 ? void 0 : call.parameters) === null || _a === void 0 ? void 0 : _a['CallSid'];
1607
+ if (incomingCallSid && this.incomingCallsMap.has(incomingCallSid)) {
1608
+ console.log('primary device: duplicate incoming for already-tracked call, ignoring', incomingCallSid);
1609
+ return;
1610
+ }
1603
1611
  console.log('Twilio Device incoming call event:', call);
1604
1612
  const notification = this.buildIncomingNotification(call);
1605
1613
  this.incomingCallNotification.next(notification);
@@ -1614,7 +1622,7 @@ class TwilioService {
1614
1622
  this.prepareDevice2ForIncomingCall();
1615
1623
  if (this.isIncomingMuted) {
1616
1624
  try {
1617
- (_a = device.audio) === null || _a === void 0 ? void 0 : _a.incoming(false);
1625
+ (_b = device.audio) === null || _b === void 0 ? void 0 : _b.incoming(false);
1618
1626
  }
1619
1627
  catch (_) { }
1620
1628
  }
@@ -1921,8 +1929,15 @@ class TwilioService {
1921
1929
  if (spare._ownsAcceptedCall || spare._pendingIncomingCall) {
1922
1930
  return;
1923
1931
  }
1924
- spare._pendingIncomingCall = call;
1925
1932
  const callSid = (_a = call === null || call === void 0 ? void 0 : call.parameters) === null || _a === void 0 ? void 0 : _a['CallSid'];
1933
+ // Same shared-identity fan-out guard as the primary device's 'incoming' handler:
1934
+ // if another Device already claimed this CallSid, this is a duplicate leg of
1935
+ // the same call, not a genuinely new concurrent call — ignore it.
1936
+ if (callSid && this.incomingCallsMap.has(callSid)) {
1937
+ console.log('spare device: duplicate incoming for already-tracked call, ignoring', callSid);
1938
+ return;
1939
+ }
1940
+ spare._pendingIncomingCall = call;
1926
1941
  // Transition this spare from "free" → "pending": remove it as the active
1927
1942
  // spareDevice and track it by CallSid so onConcurrentCallAccepted can find it.
1928
1943
  if (this.spareDevice === spare) {
@@ -2312,7 +2327,7 @@ class CallProgressComponent {
2312
2327
  this.deviceNumberList = this.callerIdList.map((res) => res.number);
2313
2328
  }
2314
2329
  ngOnChanges(changes) {
2315
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27;
2330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28;
2316
2331
  if (this.userId) {
2317
2332
  this.extensionService.userId = this.userId;
2318
2333
  }
@@ -2333,7 +2348,7 @@ class CallProgressComponent {
2333
2348
  }
2334
2349
  console.log('newIncomingCallsList', this.newIncomingCallsList);
2335
2350
  this.newIncomingCallsList.forEach((callInfo, i) => {
2336
- var _a, _b;
2351
+ var _a, _b, _c;
2337
2352
  this.conferenceId = i == 0 ? this.newIncomingCallsList[i].conferenceId : this.conferenceId;
2338
2353
  let ourNumberInfo = (_a = this.newIncomingCallsList[i]) === null || _a === void 0 ? void 0 : _a.participants.find((resData) => { var _a; return ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'outgoing-call' && (resData === null || resData === void 0 ? void 0 : resData.client)) || (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.businessNumber) && ((_a = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _a === void 0 ? void 0 : _a.length) == 1)))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft); });
2339
2354
  if (!this.pendingMuteUpdate) {
@@ -2356,23 +2371,23 @@ class CallProgressComponent {
2356
2371
  if (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.id) {
2357
2372
  this.updatedParticipantList((_b = this.newIncomingCallsList[i]) === null || _b === void 0 ? void 0 : _b.participants);
2358
2373
  this.newIncomingCallsList[i].participants.forEach((res) => __awaiter(this, void 0, void 0, function* () {
2359
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
2374
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
2360
2375
  if (res === null || res === void 0 ? void 0 : res.host) {
2361
2376
  this.hostnumber = res;
2362
2377
  }
2363
- if ((ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isConference) || (((_c = this.hostnumber) === null || _c === void 0 ? void 0 : _c.isConference) && ((_d = this.hostnumber) === null || _d === void 0 ? void 0 : _d.conferenceId) == (res === null || res === void 0 ? void 0 : res.conferenceId)) || ((_e = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _e === void 0 ? void 0 : _e.length) > 2) {
2378
+ if ((ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isConference) || (((_d = this.hostnumber) === null || _d === void 0 ? void 0 : _d.isConference) && ((_e = this.hostnumber) === null || _e === void 0 ? void 0 : _e.conferenceId) == (res === null || res === void 0 ? void 0 : res.conferenceId)) || ((_f = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _f === void 0 ? void 0 : _f.length) > 2) {
2364
2379
  this.isConference = true;
2365
2380
  }
2366
2381
  let contact = {};
2367
- if ((_f = this.contacts) === null || _f === void 0 ? void 0 : _f.length) {
2382
+ if ((_g = this.contacts) === null || _g === void 0 ? void 0 : _g.length) {
2368
2383
  contact = this.contacts.find((resData) => { var _a; return ((_a = resData === null || resData === void 0 ? void 0 : resData.numbersList[0]) === null || _a === void 0 ? void 0 : _a.number) == ((res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to); });
2369
2384
  }
2370
- if (((_g = this.currentCallList) === null || _g === void 0 ? void 0 : _g.length) > 0) {
2385
+ if (((_h = this.currentCallList) === null || _h === void 0 ? void 0 : _h.length) > 0) {
2371
2386
  let index = this.currentCallList.findIndex((item) => (item === null || item === void 0 ? void 0 : item.id) == (res === null || res === void 0 ? void 0 : res.id));
2372
2387
  if (index == -1 && !res.isLeft && (res === null || res === void 0 ? void 0 : res.status) != 'no-answer' && (res === null || res === void 0 ? void 0 : res.status) != 'canceled') {
2373
- this.currentCallList.push(Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_h = this.newIncomingCallsList) === null || _h === void 0 ? void 0 : _h.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: false, isConference: this.isConference, isAcceptCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, participantId: res === null || res === void 0 ? void 0 : res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) }));
2388
+ this.currentCallList.push(Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_j = this.newIncomingCallsList) === null || _j === void 0 ? void 0 : _j.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: false, isConference: this.isConference, isAcceptCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, participantId: res === null || res === void 0 ? void 0 : res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) }));
2374
2389
  if (this.showContactsPanel) {
2375
- this.conferenceCallIDForParticipantList = (_j = this.currentCall) === null || _j === void 0 ? void 0 : _j.conferenceId;
2390
+ this.conferenceCallIDForParticipantList = (_k = this.currentCall) === null || _k === void 0 ? void 0 : _k.conferenceId;
2376
2391
  // this.getAllParticipants(this.currentCall?.conferenceId);
2377
2392
  this.applyFilter();
2378
2393
  }
@@ -2382,18 +2397,18 @@ class CallProgressComponent {
2382
2397
  }
2383
2398
  else if (index != -1 && ((res === null || res === void 0 ? void 0 : res.isLeft) || (res === null || res === void 0 ? void 0 : res.status) == 'no-answer' || (res === null || res === void 0 ? void 0 : res.status) == 'canceled')) {
2384
2399
  this.isClickExpand = false;
2385
- if (((_k = this.currentCallList[index]) === null || _k === void 0 ? void 0 : _k.id) == ((_l = this.currentCall) === null || _l === void 0 ? void 0 : _l.id)) {
2400
+ if (((_l = this.currentCallList[index]) === null || _l === void 0 ? void 0 : _l.id) == ((_m = this.currentCall) === null || _m === void 0 ? void 0 : _m.id)) {
2386
2401
  this.currentCallList.splice(index, 1);
2387
2402
  }
2388
2403
  else {
2389
2404
  this.currentCallList.splice(index, 1);
2390
2405
  }
2391
2406
  if (this.showContactsPanel) {
2392
- this.conferenceCallIDForParticipantList = (_m = this.currentCall) === null || _m === void 0 ? void 0 : _m.conferenceId;
2407
+ this.conferenceCallIDForParticipantList = (_o = this.currentCall) === null || _o === void 0 ? void 0 : _o.conferenceId;
2393
2408
  // this.getAllParticipants(this.currentCall?.conferenceId)
2394
2409
  this.applyFilter();
2395
2410
  }
2396
- this.startTimer((_o = this.currentCall) === null || _o === void 0 ? void 0 : _o.joinedAt);
2411
+ this.startTimer((_p = this.currentCall) === null || _p === void 0 ? void 0 : _p.joinedAt);
2397
2412
  }
2398
2413
  else if (index != -1 && !(res === null || res === void 0 ? void 0 : res.isLeft)) {
2399
2414
  //console.log(res);
@@ -2418,11 +2433,11 @@ class CallProgressComponent {
2418
2433
  // No pending mute – trust the server value
2419
2434
  updatedMute = res.isMute;
2420
2435
  }
2421
- this.currentCallList[index] = Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_p = this.newIncomingCallsList) === null || _p === void 0 ? void 0 : _p.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: updatedMute, isConference: this.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res === null || res === void 0 ? void 0 : res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) });
2436
+ this.currentCallList[index] = Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_q = this.newIncomingCallsList) === null || _q === void 0 ? void 0 : _q.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: updatedMute, isConference: this.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res === null || res === void 0 ? void 0 : res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) });
2422
2437
  }
2423
2438
  }
2424
2439
  else if (!res.isLeft && (res === null || res === void 0 ? void 0 : res.status) != 'no-answer' && (res === null || res === void 0 ? void 0 : res.status) != 'canceled') {
2425
- this.currentCallList.push(Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: res.direction == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_q = this.newIncomingCallsList) === null || _q === void 0 ? void 0 : _q.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: res === null || res === void 0 ? void 0 : res.isMute, isConference: this.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) }));
2440
+ this.currentCallList.push(Object.assign(Object.assign({}, res), { fromName: this.getName(res === null || res === void 0 ? void 0 : res.from) || '', toName: this.getName(res === null || res === void 0 ? void 0 : res.to) || '', img: res.direction == "incoming-call" ? ((res === null || res === void 0 ? void 0 : res.fromImage) || (res === null || res === void 0 ? void 0 : res.img)) : (res === null || res === void 0 ? void 0 : res.toImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: ((_r = this.newIncomingCallsList) === null || _r === void 0 ? void 0 : _r.length) > 1 ? ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold : false, isNotification: (callInfo === null || callInfo === void 0 ? void 0 : callInfo._isNotification) && !this.getStatus(res) && (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? true : false, isMute: res === null || res === void 0 ? void 0 : res.isMute, isConference: this.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, callLabel: callInfo === null || callInfo === void 0 ? void 0 : callInfo.callLabel, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) }));
2426
2441
  this.timer = '00:00';
2427
2442
  this.startTimer(res === null || res === void 0 ? void 0 : res.joinedAt);
2428
2443
  this.extensionService.isLoadershow.next(false);
@@ -2431,7 +2446,7 @@ class CallProgressComponent {
2431
2446
  this.conferenceCallNullCount = 0;
2432
2447
  }
2433
2448
  else {
2434
- if (this.conferenceCallNullCount > 5) {
2449
+ if (this.conferenceCallNullCount > 5 && !((_c = this.twilioService.acceptedCallList) === null || _c === void 0 ? void 0 : _c.length)) {
2435
2450
  console.log('Call end in 299');
2436
2451
  this.isRinging = false;
2437
2452
  this.isConcurrentIncoming = false;
@@ -2619,7 +2634,7 @@ class CallProgressComponent {
2619
2634
  this.conferenceCallNullCount = 0;
2620
2635
  }
2621
2636
  else if (!((_22 = this.newIncomingCallsList) === null || _22 === void 0 ? void 0 : _22.length)) {
2622
- if (this.conferenceCallNullCount > 5) {
2637
+ if (this.conferenceCallNullCount > 5 && !((_23 = this.twilioService.acceptedCallList) === null || _23 === void 0 ? void 0 : _23.length)) {
2623
2638
  console.log('411');
2624
2639
  this.isRinging = false;
2625
2640
  this.isConcurrentIncoming = false;
@@ -2646,15 +2661,15 @@ class CallProgressComponent {
2646
2661
  }
2647
2662
  ;
2648
2663
  }
2649
- if (((_23 = changes['callAction']) === null || _23 === void 0 ? void 0 : _23.currentValue) && ((_24 = this.callAction) === null || _24 === void 0 ? void 0 : _24.type) == 'reJoin') {
2664
+ if (((_24 = changes['callAction']) === null || _24 === void 0 ? void 0 : _24.currentValue) && ((_25 = this.callAction) === null || _25 === void 0 ? void 0 : _25.type) == 'reJoin') {
2650
2665
  this.deviceNumberList = this.callerIdList.map((res) => res.number);
2651
- let data = (_25 = this.newIncomingCallsList.find((item) => { var _a; return (item === null || item === void 0 ? void 0 : item.conferenceId) == ((_a = this.callAction) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _25 === void 0 ? void 0 : _25.participants.find((resData) => resData === null || resData === void 0 ? void 0 : resData.host);
2666
+ let data = (_26 = this.newIncomingCallsList.find((item) => { var _a; return (item === null || item === void 0 ? void 0 : item.conferenceId) == ((_a = this.callAction) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _26 === void 0 ? void 0 : _26.participants.find((resData) => resData === null || resData === void 0 ? void 0 : resData.host);
2652
2667
  if ((data === null || data === void 0 ? void 0 : data.isLeft) || !data) {
2653
2668
  this.rejoinHost(this.callAction);
2654
2669
  }
2655
2670
  }
2656
- if ((_26 = changes['newCallConference']) === null || _26 === void 0 ? void 0 : _26.currentValue) {
2657
- this.CallToUnsavedNumber((_27 = this.newCallConference) === null || _27 === void 0 ? void 0 : _27.number, true);
2671
+ if ((_27 = changes['newCallConference']) === null || _27 === void 0 ? void 0 : _27.currentValue) {
2672
+ this.CallToUnsavedNumber((_28 = this.newCallConference) === null || _28 === void 0 ? void 0 : _28.number, true);
2658
2673
  }
2659
2674
  }
2660
2675
  rejoinHost(callInfo) {
@@ -4956,10 +4971,10 @@ class DialboxComponent {
4956
4971
  }
4957
4972
  if (!((_e = this.incomingCallsList) === null || _e === void 0 ? void 0 : _e.length)) {
4958
4973
  setTimeout(() => {
4959
- var _a, _b;
4960
- if (!((_a = this.incomingCallsList) === null || _a === void 0 ? void 0 : _a.length)) {
4974
+ var _a, _b, _c;
4975
+ if (!((_a = this.incomingCallsList) === null || _a === void 0 ? void 0 : _a.length) && !((_b = this.twilioService.acceptedCallList) === null || _b === void 0 ? void 0 : _b.length)) {
4961
4976
  this.isCallInProgress = false;
4962
- (_b = this.twilioService.device) === null || _b === void 0 ? void 0 : _b.disconnectAll();
4977
+ (_c = this.twilioService.device) === null || _c === void 0 ? void 0 : _c.disconnectAll();
4963
4978
  }
4964
4979
  }, 2000);
4965
4980
  }