@vgroup/dialbox 0.1.15 → 0.1.17

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.
@@ -1427,6 +1427,7 @@ class TwilioService {
1427
1427
  allowIncomingWhileBusy: true,
1428
1428
  closeProtection: true
1429
1429
  });
1430
+ console.log("device created");
1430
1431
  this.device.register();
1431
1432
  this.device.on('incoming', (call) => {
1432
1433
  this.currentCall.next(call);
@@ -2233,11 +2234,10 @@ class DialboxComponent {
2233
2234
  this.isInitialized = false;
2234
2235
  this.isMinimised = false;
2235
2236
  // Initialize if dialpad is visible by default
2236
- // if (!this.isDialpadHidden) {
2237
- // console.log('sfsdfdsf')
2238
- // this.initializeTwilio();
2239
- // }
2240
- this.twilioService.initializeTwilioDevice();
2237
+ this.initializeTwilio();
2238
+ if (!this.isDialpadHidden) {
2239
+ console.log('sfsdfdsf');
2240
+ }
2241
2241
  }
2242
2242
  initializeTwilio() {
2243
2243
  if (!this.isInitialized) {
@@ -2248,6 +2248,7 @@ class DialboxComponent {
2248
2248
  }
2249
2249
  this.isInitialized = true;
2250
2250
  // Initialize Twilio service
2251
+ console.log('Initializing Twilio service');
2251
2252
  this.twilioService.initializeTwilioDevice();
2252
2253
  // Subscribe to incoming calls to show dialpad when call comes in
2253
2254
  const callSub = this.twilioService.currentCall.subscribe(call => {
@@ -2259,6 +2260,9 @@ class DialboxComponent {
2259
2260
  });
2260
2261
  this.subscriptions.add(callSub);
2261
2262
  }
2263
+ setTimeout(() => {
2264
+ this.isInitialized = false;
2265
+ }, 1000);
2262
2266
  }
2263
2267
  // ngOnChange() {
2264
2268
  // this.initializeTwilio();
@@ -2363,6 +2367,7 @@ class DialboxComponent {
2363
2367
  // }
2364
2368
  ngOnInit() {
2365
2369
  try {
2370
+ console.log('ngOnInit');
2366
2371
  this.token = localStorage.getItem('ext_token') || '';
2367
2372
  //this.isCallInProgress = true;
2368
2373
  this.getContactList();