@dora-cell/sdk 4.1.4 → 4.1.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 +12 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23103,7 +23103,7 @@ var ApiTokenAuthProvider = class {
|
|
|
23103
23103
|
parseCredentials(data) {
|
|
23104
23104
|
const DEFAULT_WSS_URL = "wss://dcell-bills.on-forge.com/ws";
|
|
23105
23105
|
const DEFAULT_SIP_IP = "64.227.10.164";
|
|
23106
|
-
const DEFAULT_PASSWORD = "
|
|
23106
|
+
const DEFAULT_PASSWORD = "123456";
|
|
23107
23107
|
const wsUrl = DEFAULT_WSS_URL;
|
|
23108
23108
|
const sipDomain = DEFAULT_SIP_IP;
|
|
23109
23109
|
const password = DEFAULT_PASSWORD;
|
|
@@ -23138,7 +23138,7 @@ var DirectCredentialsAuthProvider = class {
|
|
|
23138
23138
|
}
|
|
23139
23139
|
};
|
|
23140
23140
|
var ExtensionAuthProvider = class {
|
|
23141
|
-
constructor(extension, password = "
|
|
23141
|
+
constructor(extension, password = "123456", sipDomain = "64.227.10.164") {
|
|
23142
23142
|
this.credentials = {
|
|
23143
23143
|
sipUri: `sip:${extension}@${sipDomain}`,
|
|
23144
23144
|
password,
|
|
@@ -23593,7 +23593,9 @@ var DoraCell = class {
|
|
|
23593
23593
|
this.apiClient.setSessionToken(token);
|
|
23594
23594
|
}
|
|
23595
23595
|
}
|
|
23596
|
-
await this.getWallet().catch(() => {
|
|
23596
|
+
await this.getWallet().catch((error) => {
|
|
23597
|
+
const errorMsg = error instanceof Error ? error.message : "Failed to fetch wallet";
|
|
23598
|
+
this.emitError(new ConnectionError(errorMsg, { originalError: error }));
|
|
23597
23599
|
});
|
|
23598
23600
|
if (!this.credentials?.extensions || this.credentials.extensions.length === 0) {
|
|
23599
23601
|
await this.fetchExtensions();
|
|
@@ -23662,7 +23664,9 @@ var DoraCell = class {
|
|
|
23662
23664
|
try {
|
|
23663
23665
|
const socket = new import_jssip.default.WebSocketInterface(this.credentials.wsUrl);
|
|
23664
23666
|
const pcConfig = {
|
|
23665
|
-
iceServers: this.config.turnServers || this.getDefaultTurnServers()
|
|
23667
|
+
iceServers: this.config.turnServers || this.getDefaultTurnServers(),
|
|
23668
|
+
rtcpMuxPolicy: "require",
|
|
23669
|
+
bundlePolicy: "max-bundle"
|
|
23666
23670
|
};
|
|
23667
23671
|
const uaConfig = {
|
|
23668
23672
|
uri: this.credentials.sipUri,
|
|
@@ -23750,7 +23754,9 @@ var DoraCell = class {
|
|
|
23750
23754
|
throw new ConnectionError("No credentials available for call manager");
|
|
23751
23755
|
}
|
|
23752
23756
|
const pcConfig = {
|
|
23753
|
-
iceServers: this.config.turnServers || this.getDefaultTurnServers()
|
|
23757
|
+
iceServers: this.config.turnServers || this.getDefaultTurnServers(),
|
|
23758
|
+
rtcpMuxPolicy: "require",
|
|
23759
|
+
bundlePolicy: "max-bundle"
|
|
23754
23760
|
};
|
|
23755
23761
|
this.callManager = new CallManager(
|
|
23756
23762
|
this.credentials,
|
|
@@ -23917,15 +23923,8 @@ var DoraCell = class {
|
|
|
23917
23923
|
this.events.emit("error", error);
|
|
23918
23924
|
}
|
|
23919
23925
|
getDefaultTurnServers() {
|
|
23920
|
-
const turnUri = "turn:64.227.10.164:3478";
|
|
23921
|
-
const turnUser = "02018890089";
|
|
23922
|
-
const turnPass = "dora12345";
|
|
23923
23926
|
return [
|
|
23924
|
-
{
|
|
23925
|
-
urls: turnUri,
|
|
23926
|
-
username: turnUser,
|
|
23927
|
-
credential: turnPass
|
|
23928
|
-
}
|
|
23927
|
+
{ urls: "stun:stun.l.google.com:19302" }
|
|
23929
23928
|
];
|
|
23930
23929
|
}
|
|
23931
23930
|
getDisplayName() {
|