@signalwire/js 4.0.0-beta.0 → 4.0.0-dev-20260224150350

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
@@ -5099,12 +5099,15 @@ var ClientSessionManager = class extends Destroyable {
5099
5099
  }
5100
5100
  async createCall(options = {}) {
5101
5101
  try {
5102
- if (!this._directory) throw new require_operators.DependencyError("Directory not initialized");
5103
5102
  const addressURI = getAddressSearchURI(options);
5104
- const addressId = await this._directory.findAddressIdByURI(addressURI);
5105
- if (!addressId) throw new require_operators.DependencyError(`Address name: ${addressURI} not found`);
5106
- const address = this._directory.get(addressId);
5107
- if (!address) throw new require_operators.DependencyError(`Address ID: ${addressId} not found`);
5103
+ let address;
5104
+ if (!addressURI.startsWith("+")) {
5105
+ if (!this._directory) throw new require_operators.DependencyError("Directory not initialized");
5106
+ const addressId = await this._directory.findAddressIdByURI(addressURI);
5107
+ if (!addressId) throw new require_operators.DependencyError(`Address name: ${addressURI} not found`);
5108
+ address = this._directory.get(addressId);
5109
+ if (!address) throw new require_operators.DependencyError(`Address ID: ${addressId} not found`);
5110
+ }
5108
5111
  const callSession = this.callFactory.createCall(address, { ...options });
5109
5112
  callSession.status$.pipe((0, rxjs.filter)((status) => status === "destroyed"), (0, rxjs.take)(1)).subscribe(() => {
5110
5113
  const { [`${callSession.id}`]: _, ...remainingCalls } = this._calls$.value;