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