@anganyai/voice-sdk 0.0.5 → 0.0.6

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.
package/dist/index.cjs CHANGED
@@ -16475,7 +16475,12 @@ var SipManager = class extends EventEmitter {
16475
16475
  }
16476
16476
  this.logger.info("\u{1F4F5} Hanging up call...");
16477
16477
  try {
16478
- this.currentSession.bye();
16478
+ const sessionState = this.currentSession.state;
16479
+ if (sessionState === "Established" || sessionState === "Establishing") {
16480
+ this.currentSession.bye();
16481
+ } else {
16482
+ this.logger.debug("Session already terminated, skipping BYE", { state: sessionState });
16483
+ }
16479
16484
  } catch (error) {
16480
16485
  this.logger.warn("\u26A0\uFE0F Error sending BYE", { error });
16481
16486
  }
@@ -17440,7 +17445,9 @@ var Conversation = class extends EventEmitter {
17440
17445
  }
17441
17446
  }
17442
17447
  if (!accessToken) {
17443
- this.logger.info("No access token available - running in SIP-only mode (no transcription/API features)");
17448
+ this.logger.info(
17449
+ "No access token available - running in SIP-only mode (no transcription/API features)"
17450
+ );
17444
17451
  } else {
17445
17452
  this.accessToken = accessToken;
17446
17453
  this.logger.debug("\u2713 Access token obtained for API calls", {