@koi-design/callkit 2.3.0-beta.3 → 2.3.0-beta.4
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.d.ts +2 -0
- package/dist/index.global.js +11 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4907,6 +4907,8 @@ declare class Config {
|
|
|
4907
4907
|
reset: (form: string) => Promise<void>;
|
|
4908
4908
|
validate: () => boolean;
|
|
4909
4909
|
isLogin: () => boolean;
|
|
4910
|
+
/** 判断当前坐席类型是否为 SIP */
|
|
4911
|
+
isPhoneTypeSIP: () => boolean;
|
|
4910
4912
|
check(): boolean;
|
|
4911
4913
|
getTrackLogsConfig(): {
|
|
4912
4914
|
enabled: boolean;
|
package/dist/index.global.js
CHANGED
|
@@ -3889,7 +3889,7 @@ var WebCall = (() => {
|
|
|
3889
3889
|
// package.json
|
|
3890
3890
|
var package_default = {
|
|
3891
3891
|
name: "@koi-design/callkit",
|
|
3892
|
-
version: "2.3.0-beta.
|
|
3892
|
+
version: "2.3.0-beta.4",
|
|
3893
3893
|
description: "callkit",
|
|
3894
3894
|
author: "koi",
|
|
3895
3895
|
license: "ISC",
|
|
@@ -4034,6 +4034,8 @@ var WebCall = (() => {
|
|
|
4034
4034
|
return true;
|
|
4035
4035
|
};
|
|
4036
4036
|
isLogin = () => this.validate();
|
|
4037
|
+
/** 判断当前坐席类型是否为 SIP */
|
|
4038
|
+
isPhoneTypeSIP = () => this.config.userInfo.phoneType === PhoneTypeEnum.SIP;
|
|
4037
4039
|
check() {
|
|
4038
4040
|
if (!this.isLogin()) {
|
|
4039
4041
|
this.callKit.logger.warn("User not logged in", {
|
|
@@ -20550,7 +20552,9 @@ ${log}` : log;
|
|
|
20550
20552
|
caller: "CallKit.register",
|
|
20551
20553
|
content: {}
|
|
20552
20554
|
});
|
|
20553
|
-
this.
|
|
20555
|
+
if (!this.config.isPhoneTypeSIP()) {
|
|
20556
|
+
this.connect.register();
|
|
20557
|
+
}
|
|
20554
20558
|
}
|
|
20555
20559
|
async unregister() {
|
|
20556
20560
|
if (!this.config.check())
|
|
@@ -20660,10 +20664,12 @@ ${log}` : log;
|
|
|
20660
20664
|
force
|
|
20661
20665
|
}
|
|
20662
20666
|
});
|
|
20663
|
-
if (this.
|
|
20664
|
-
|
|
20667
|
+
if (this.config.isPhoneTypeSIP()) {
|
|
20668
|
+
if (this.connect.isCalling()) {
|
|
20669
|
+
await this.hangup();
|
|
20670
|
+
}
|
|
20671
|
+
await this.connect.reset({ force });
|
|
20665
20672
|
}
|
|
20666
|
-
await this.connect.reset({ force });
|
|
20667
20673
|
if (this.config.isLogin()) {
|
|
20668
20674
|
await this.logout({ isReset: false });
|
|
20669
20675
|
} else {
|