@signalwire/js 4.0.0-beta.0 → 4.0.0-beta.1

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/browser.mjs CHANGED
@@ -15508,12 +15508,15 @@ var ClientSessionManager = class extends Destroyable {
15508
15508
  }
15509
15509
  async createCall(options = {}) {
15510
15510
  try {
15511
- if (!this._directory) throw new DependencyError("Directory not initialized");
15512
15511
  const addressURI = getAddressSearchURI(options);
15513
- const addressId = await this._directory.findAddressIdByURI(addressURI);
15514
- if (!addressId) throw new DependencyError(`Address name: ${addressURI} not found`);
15515
- const address = this._directory.get(addressId);
15516
- if (!address) throw new DependencyError(`Address ID: ${addressId} not found`);
15512
+ let address;
15513
+ if (!addressURI.startsWith("+")) {
15514
+ if (!this._directory) throw new DependencyError("Directory not initialized");
15515
+ const addressId = await this._directory.findAddressIdByURI(addressURI);
15516
+ if (!addressId) throw new DependencyError(`Address name: ${addressURI} not found`);
15517
+ address = this._directory.get(addressId);
15518
+ if (!address) throw new DependencyError(`Address ID: ${addressId} not found`);
15519
+ }
15517
15520
  const callSession = this.callFactory.createCall(address, { ...options });
15518
15521
  callSession.status$.pipe((0, import_cjs$5.filter)((status) => status === "destroyed"), (0, import_cjs$5.take)(1)).subscribe(() => {
15519
15522
  const { [`${callSession.id}`]: _, ...remainingCalls } = this._calls$.value;