@vgroup/dialbox 0.2.66 → 0.2.67

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.
@@ -608,7 +608,7 @@ class ExtensionService {
608
608
  'Content-Type': 'application/json',
609
609
  'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
610
610
  });
611
- const httpOptions = { headers };
611
+ const httpOptions = { headers: headers };
612
612
  return this.http.post(environment.apiUrl + '/utilities/ext/ur/hold/participant', payload, httpOptions);
613
613
  }
614
614
  // getAllParticipants(id:any, payload: any) {
@@ -2127,20 +2127,12 @@ class CallProgressComponent {
2127
2127
  await this.connectToDevice(tokenData.token, callData);
2128
2128
  await this.pollCallStatus(callAuthId);
2129
2129
  setTimeout(async () => {
2130
- try {
2131
- const addRes = await this.addParticipantToCall({
2132
- from: callData?.from,
2133
- route: "OUTGOING",
2134
- participantNumber: callData?.phone,
2135
- conferenceId: this.conferenceId
2136
- });
2137
- // Save participantId for the active leg so we can hold/unhold later
2138
- this.callData = { ...this.callData, participantId: addRes?.participantId };
2139
- console.log('Initial participantId:', addRes?.participantId);
2140
- }
2141
- catch (e) {
2142
- console.error('Error adding initial participant:', e);
2143
- }
2130
+ await this.addParticipantToCall({
2131
+ from: callData?.from,
2132
+ route: "OUTGOING",
2133
+ participantNumber: callData?.phone,
2134
+ conferenceId: this.conferenceId
2135
+ });
2144
2136
  }, 1000);
2145
2137
  // Poll the status for 30-45 seconds
2146
2138
  }
@@ -2392,15 +2384,13 @@ class CallProgressComponent {
2392
2384
  return;
2393
2385
  }
2394
2386
  // Add participant to the conference
2395
- const addRes = await this.addParticipantToCall({
2387
+ await this.addParticipantToCall({
2396
2388
  from: this.callData?.from,
2397
2389
  route: "OUTGOING",
2398
2390
  participantNumber: phoneNumber,
2399
2391
  conferenceId: conferenceId
2400
2392
  });
2401
- // Save the new participant's id for future actions (hold/unhold/remove)
2402
- this.callData = { ...this.callData, lastAddedParticipantId: addRes?.participantId };
2403
- console.log("Participant added to conference:", phoneNumber, 'id:', addRes?.participantId);
2393
+ console.log("Participant added to conference:", phoneNumber);
2404
2394
  this.showRingAnimation = false;
2405
2395
  }
2406
2396
  catch (error) {