@vgroup/dialbox 0.4.6 → 0.4.8

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.
@@ -1646,7 +1646,10 @@ class TwilioService {
1646
1646
  return this.http.get(`${environment.apiUrl}/utilities/ext/add/incoming/participant/${participantId}/${conferenceId}`, httpOptions);
1647
1647
  }
1648
1648
  connect(data) {
1649
- this.device.disconnect();
1649
+ // this.device.disconnect();
1650
+ if (this.device.activeCall) {
1651
+ this.device.disconnectAll();
1652
+ }
1650
1653
  return this.device.connect({
1651
1654
  params: {
1652
1655
  Token: this.conferenceCallInfo.conferenceId,
@@ -1885,12 +1888,16 @@ class CallProgressComponent {
1885
1888
  };
1886
1889
  }
1887
1890
  if (this.currentCallList.length == 1 && this.currentCallList[0].isHold) {
1888
- this.onholdOrUnholdParticipant({
1889
- participantId: [this.currentCallList[0].participantId],
1890
- conferenceId: this.conferenceId,
1891
- hold: false,
1892
- conference: this.currentCallList[0].isConference
1893
- });
1891
+ setTimeout(() => {
1892
+ if (this.currentCallList.length == 1 && this.currentCallList[0].isHold) {
1893
+ this.onholdOrUnholdParticipant({
1894
+ participantId: [this.currentCallList[0].participantId],
1895
+ conferenceId: this.conferenceId,
1896
+ hold: false,
1897
+ conference: this.currentCallList[0].isConference
1898
+ });
1899
+ }
1900
+ }, 1000);
1894
1901
  }
1895
1902
  }
1896
1903
  else {
@@ -2067,9 +2074,6 @@ class CallProgressComponent {
2067
2074
  return await this.extensionService.getCallStatusOfParticipants(participantId).toPromise();
2068
2075
  }
2069
2076
  async onMuteParticipant(payload) {
2070
- // const payload = {
2071
- // "participantId": "string", "conferenceId": "string", "mute": true
2072
- // }
2073
2077
  return await this.extensionService.onMuteParticipant(payload).toPromise();
2074
2078
  }
2075
2079
  async getRemoveParticipants(participantId, conferenceId) {
@@ -2301,15 +2305,15 @@ class CallProgressComponent {
2301
2305
  // this.maximiseDialpad();
2302
2306
  // }
2303
2307
  }
2304
- toggleMute(isConference) {
2308
+ async toggleMute(isConference) {
2309
+ await this.onMuteParticipant({
2310
+ participantId: [this.currentCall?.participantId],
2311
+ conferenceId: this.conferenceId,
2312
+ mute: !this.isMute,
2313
+ });
2305
2314
  this.isMute = !this.isMute;
2306
2315
  // this.call?.mute(this.isMute);
2307
2316
  // if (isConference) {
2308
- this.onMuteParticipant({
2309
- participantId: this.currentCall?.participantId,
2310
- conferenceId: this.conferenceId,
2311
- mute: this.isMute,
2312
- });
2313
2317
  this.currentCall.isMute = this.isMute;
2314
2318
  // } else {
2315
2319
  // }