@vgroup/dialbox 0.2.70 → 0.2.71

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.
@@ -611,13 +611,13 @@ class ExtensionService {
611
611
  const httpOptions = { headers: headers };
612
612
  return this.http.post(environment.apiUrl + '/utilities/ext/ur/hold/participant', payload, httpOptions);
613
613
  }
614
- getAllParticipants(conferenceId) {
614
+ getAllParticipants(conferenceSid) {
615
615
  const headers = new HttpHeaders({
616
616
  'Content-Type': 'application/json',
617
617
  'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
618
618
  });
619
619
  const httpOptions = { headers: headers };
620
- return this.http.get(environment.apiUrl + `/utilities/ext/ur/all/participent/${conferenceId}`, httpOptions);
620
+ return this.http.get(environment.apiUrl + `/utilities/ext/ur/all/participent/${conferenceSid}`, httpOptions);
621
621
  }
622
622
  updateHoldUnhold(payload) {
623
623
  const params = {
@@ -2121,14 +2121,14 @@ class CallProgressComponent {
2121
2121
  await this.pollCallStatus(callAuthId);
2122
2122
  setTimeout(async () => {
2123
2123
  try {
2124
- const addRes = await this.addParticipantToCall({
2124
+ this.addRes = await this.addParticipantToCall({
2125
2125
  from: callData?.from,
2126
2126
  route: "OUTGOING",
2127
2127
  participantNumber: callData?.phone,
2128
2128
  conferenceId: this.conferenceId
2129
2129
  });
2130
- this.callData = { ...this.callData, participantId: addRes?.participantId };
2131
- console.log('Initial participantId:', addRes?.participantId);
2130
+ this.callData = { ...this.callData, participantId: this.addRes?.participantId };
2131
+ console.log('Initial participantId:', this.addRes?.participantId);
2132
2132
  }
2133
2133
  catch (e) {
2134
2134
  console.error('Error adding initial participant:', e);
@@ -2346,8 +2346,9 @@ class CallProgressComponent {
2346
2346
  this.GetContactsList();
2347
2347
  }
2348
2348
  addRemoveParticipant() {
2349
+ const conferenceSId = this.addRes?.conferenceSid;
2349
2350
  this.isAddRemoveParticipant = !this.isAddRemoveParticipant;
2350
- this.getAllParticipants();
2351
+ this.getAllParticipants(conferenceSId);
2351
2352
  }
2352
2353
  async callContact(contact) {
2353
2354
  console.log('Adding participant:', contact);
@@ -2406,8 +2407,8 @@ class CallProgressComponent {
2406
2407
  this.handleError(error);
2407
2408
  }
2408
2409
  }
2409
- getAllParticipants() {
2410
- this.extensionService.getAllParticipants(this.conferenceId).subscribe((res) => {
2410
+ getAllParticipants(conferenceSid) {
2411
+ this.extensionService.getAllParticipants(conferenceSid).subscribe((res) => {
2411
2412
  console.log(res);
2412
2413
  });
2413
2414
  }