@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.mjs
CHANGED
|
@@ -23099,7 +23099,7 @@ var ApiTokenAuthProvider = class {
|
|
|
23099
23099
|
parseCredentials(data) {
|
|
23100
23100
|
const DEFAULT_WSS_URL = "wss://dcell-bills.on-forge.com/ws";
|
|
23101
23101
|
const DEFAULT_SIP_IP = "64.227.10.164";
|
|
23102
|
-
const DEFAULT_PASSWORD = "
|
|
23102
|
+
const DEFAULT_PASSWORD = "123456";
|
|
23103
23103
|
const wsUrl = DEFAULT_WSS_URL;
|
|
23104
23104
|
const sipDomain = DEFAULT_SIP_IP;
|
|
23105
23105
|
const password = DEFAULT_PASSWORD;
|
|
@@ -23134,7 +23134,7 @@ var DirectCredentialsAuthProvider = class {
|
|
|
23134
23134
|
}
|
|
23135
23135
|
};
|
|
23136
23136
|
var ExtensionAuthProvider = class {
|
|
23137
|
-
constructor(extension, password = "
|
|
23137
|
+
constructor(extension, password = "123456", sipDomain = "64.227.10.164") {
|
|
23138
23138
|
this.credentials = {
|
|
23139
23139
|
sipUri: `sip:${extension}@${sipDomain}`,
|
|
23140
23140
|
password,
|
|
@@ -23589,7 +23589,9 @@ var DoraCell = class {
|
|
|
23589
23589
|
this.apiClient.setSessionToken(token);
|
|
23590
23590
|
}
|
|
23591
23591
|
}
|
|
23592
|
-
await this.getWallet().catch(() => {
|
|
23592
|
+
await this.getWallet().catch((error) => {
|
|
23593
|
+
const errorMsg = error instanceof Error ? error.message : "Failed to fetch wallet";
|
|
23594
|
+
this.emitError(new ConnectionError(errorMsg, { originalError: error }));
|
|
23593
23595
|
});
|
|
23594
23596
|
if (!this.credentials?.extensions || this.credentials.extensions.length === 0) {
|
|
23595
23597
|
await this.fetchExtensions();
|
|
@@ -23658,7 +23660,9 @@ var DoraCell = class {
|
|
|
23658
23660
|
try {
|
|
23659
23661
|
const socket = new import_jssip.default.WebSocketInterface(this.credentials.wsUrl);
|
|
23660
23662
|
const pcConfig = {
|
|
23661
|
-
iceServers: this.config.turnServers || this.getDefaultTurnServers()
|
|
23663
|
+
iceServers: this.config.turnServers || this.getDefaultTurnServers(),
|
|
23664
|
+
rtcpMuxPolicy: "require",
|
|
23665
|
+
bundlePolicy: "max-bundle"
|
|
23662
23666
|
};
|
|
23663
23667
|
const uaConfig = {
|
|
23664
23668
|
uri: this.credentials.sipUri,
|
|
@@ -23746,7 +23750,9 @@ var DoraCell = class {
|
|
|
23746
23750
|
throw new ConnectionError("No credentials available for call manager");
|
|
23747
23751
|
}
|
|
23748
23752
|
const pcConfig = {
|
|
23749
|
-
iceServers: this.config.turnServers || this.getDefaultTurnServers()
|
|
23753
|
+
iceServers: this.config.turnServers || this.getDefaultTurnServers(),
|
|
23754
|
+
rtcpMuxPolicy: "require",
|
|
23755
|
+
bundlePolicy: "max-bundle"
|
|
23750
23756
|
};
|
|
23751
23757
|
this.callManager = new CallManager(
|
|
23752
23758
|
this.credentials,
|
|
@@ -23913,15 +23919,8 @@ var DoraCell = class {
|
|
|
23913
23919
|
this.events.emit("error", error);
|
|
23914
23920
|
}
|
|
23915
23921
|
getDefaultTurnServers() {
|
|
23916
|
-
const turnUri = "turn:64.227.10.164:3478";
|
|
23917
|
-
const turnUser = "02018890089";
|
|
23918
|
-
const turnPass = "dora12345";
|
|
23919
23922
|
return [
|
|
23920
|
-
{
|
|
23921
|
-
urls: turnUri,
|
|
23922
|
-
username: turnUser,
|
|
23923
|
-
credential: turnPass
|
|
23924
|
-
}
|
|
23923
|
+
{ urls: "stun:stun.l.google.com:19302" }
|
|
23925
23924
|
];
|
|
23926
23925
|
}
|
|
23927
23926
|
getDisplayName() {
|