@vgroup/dialbox 0.3.12 → 0.3.14

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.
@@ -1994,33 +1994,11 @@ class IncomingCallComponent {
1994
1994
  this.extensionService.getRemoveParticipants(this.incomingCallData.participantId, this.incomingCallData.conferenceId).toPromise();
1995
1995
  }
1996
1996
  async add() {
1997
- try {
1998
- console.log('Connecting to conference...', this.incomingCallData);
1999
- // Step 1: Get conference token
2000
- const tokenResponse = await this.extensionService.getConferenceCallToken({
2001
- authId: this.incomingCallData.conferenceId || this.incomingCallData.conferenceSid
2002
- }).toPromise();
2003
- console.log('Conference token received:', tokenResponse);
2004
- // Step 2: Create a new device with conference token
2005
- const conferenceDevice = new Device(tokenResponse.token.value, {
2006
- codecPreferences: ['opus', 'pcmu'],
2007
- closeProtection: true
2008
- });
2009
- // Step 3: Connect to the conference
2010
- const call = await conferenceDevice.connect({
2011
- params: {
2012
- conferenceName: this.twilioService.conferenceName
2013
- }
2014
- });
2015
- console.log('Conference call connected:', call);
2016
- this.twilioCallData = call;
2017
- // Step 4: Emit to parent component
2018
- this.closeIncomingCallDiv.emit({ show: 1, call: call });
2019
- }
2020
- catch (error) {
2021
- console.error('Error connecting to conference:', error);
2022
- swal("Error", "Failed to join the conference. Please try again.", "error");
2023
- }
1997
+ let device = await this.twilioService.connect('');
1998
+ console.log(device, 'callConnect');
1999
+ // this.device = new Device();/
2000
+ // Device.connect({ conferenceName: 'my-conference-room' });
2001
+ // this.device = new Device({ conferenceName: 'my-conference-room' });
2024
2002
  }
2025
2003
  }
2026
2004
  IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
@@ -3144,8 +3122,8 @@ class DialboxComponent {
3144
3122
  console.log("WS Event Received:", incomingCallData.data);
3145
3123
  this.twilioService.conferenceName = incomingCallData.conferenceName;
3146
3124
  let participants = [];
3147
- if (incomingCallData.participants.length && incomingCallData.participants) {
3148
- participants = incomingCallData.participants.filter((item) => !item.isLeft);
3125
+ if (!!incomingCallData.participants) {
3126
+ participants = incomingCallData.participants.length > 0 ? incomingCallData.participants.filter((item) => !item.isLeft) : [];
3149
3127
  }
3150
3128
  // incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
3151
3129
  if (participants.length > 0) {