@koi-design/callkit 1.0.24-beta.27 → 1.0.24-beta.29
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 +22 -0
- package/dist/index.global.js +198 -4
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +167 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +167 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,10 @@ declare const KitEvent: {
|
|
|
100
100
|
* Server initiated call
|
|
101
101
|
*/
|
|
102
102
|
KIT_INVITE: string;
|
|
103
|
+
/**
|
|
104
|
+
* Server outgoing initiated call
|
|
105
|
+
*/
|
|
106
|
+
KIT_OUTGOING_INVITE: string;
|
|
103
107
|
/**
|
|
104
108
|
* Connecting
|
|
105
109
|
*/
|
|
@@ -189,15 +193,30 @@ declare const EncryptionMethod: {
|
|
|
189
193
|
INTERNAL: string;
|
|
190
194
|
};
|
|
191
195
|
type EncryptionMethodType = (typeof EncryptionMethod)[keyof typeof EncryptionMethod];
|
|
196
|
+
declare const LogGatherEnum: {
|
|
197
|
+
ENABLE: number;
|
|
198
|
+
DISABLE: number;
|
|
199
|
+
};
|
|
200
|
+
type LogGatherEnumType = (typeof LogGatherEnum)[keyof typeof LogGatherEnum];
|
|
192
201
|
declare const CallSourceType: {
|
|
193
202
|
phoneNum: number;
|
|
194
203
|
workOrderId: number;
|
|
195
204
|
};
|
|
196
205
|
|
|
197
206
|
type LoggerLevel = 'debug' | 'log' | 'warn' | 'error' | 'silent';
|
|
207
|
+
declare const LogDataEnum: {
|
|
208
|
+
readonly SIP: "sip";
|
|
209
|
+
readonly INCALL: "incall";
|
|
210
|
+
readonly AJAX: "ajax";
|
|
211
|
+
readonly ERROR: "error";
|
|
212
|
+
readonly RECONNECT: "reconnect";
|
|
213
|
+
readonly ALL: "all";
|
|
214
|
+
};
|
|
215
|
+
type LogDataType = (typeof LogDataEnum)[keyof typeof LogDataEnum];
|
|
198
216
|
declare class Logger {
|
|
199
217
|
prefix: string;
|
|
200
218
|
level: LoggerLevel;
|
|
219
|
+
logData: Record<LogDataType, any[]>;
|
|
201
220
|
private callKit;
|
|
202
221
|
constructor(callKit: CallKit, level?: LoggerLevel);
|
|
203
222
|
setLevel(level: LoggerLevel): void;
|
|
@@ -205,6 +224,7 @@ declare class Logger {
|
|
|
205
224
|
log(msg: any, extra?: Object): void;
|
|
206
225
|
warn(msg: any, extra?: Object): void;
|
|
207
226
|
error(msg: any, extra?: any): void;
|
|
227
|
+
addLogData(type: LogDataType, data: any): void;
|
|
208
228
|
output(color: string): (msg: any, extra?: Object) => void;
|
|
209
229
|
}
|
|
210
230
|
|
|
@@ -288,6 +308,7 @@ interface IConfig {
|
|
|
288
308
|
iceInfo: string[];
|
|
289
309
|
iceGatheringTimeout: number;
|
|
290
310
|
encryptionMethod: EncryptionMethodType;
|
|
311
|
+
logGather: LogGatherEnumType;
|
|
291
312
|
};
|
|
292
313
|
isAutoUpdateUserStatus: boolean;
|
|
293
314
|
}
|
|
@@ -301,6 +322,7 @@ declare class Config {
|
|
|
301
322
|
reset: () => void;
|
|
302
323
|
validate: () => boolean;
|
|
303
324
|
isLogin: () => boolean;
|
|
325
|
+
isLogGatherEnable: () => boolean;
|
|
304
326
|
check(): boolean;
|
|
305
327
|
}
|
|
306
328
|
|
package/dist/index.global.js
CHANGED
|
@@ -3161,6 +3161,37 @@ var WebCall = (() => {
|
|
|
3161
3161
|
}
|
|
3162
3162
|
});
|
|
3163
3163
|
|
|
3164
|
+
// node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js
|
|
3165
|
+
var require_stringify = __commonJS({
|
|
3166
|
+
"node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js"(exports, module) {
|
|
3167
|
+
exports = module.exports = stringify2;
|
|
3168
|
+
exports.getSerialize = serializer;
|
|
3169
|
+
function stringify2(obj, replacer, spaces, cycleReplacer) {
|
|
3170
|
+
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
|
|
3171
|
+
}
|
|
3172
|
+
function serializer(replacer, cycleReplacer) {
|
|
3173
|
+
var stack = [], keys = [];
|
|
3174
|
+
if (cycleReplacer == null)
|
|
3175
|
+
cycleReplacer = function(key, value) {
|
|
3176
|
+
if (stack[0] === value)
|
|
3177
|
+
return "[Circular ~]";
|
|
3178
|
+
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
|
|
3179
|
+
};
|
|
3180
|
+
return function(key, value) {
|
|
3181
|
+
if (stack.length > 0) {
|
|
3182
|
+
var thisPos = stack.indexOf(this);
|
|
3183
|
+
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
|
|
3184
|
+
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
|
|
3185
|
+
if (~stack.indexOf(value))
|
|
3186
|
+
value = cycleReplacer.call(this, key, value);
|
|
3187
|
+
} else
|
|
3188
|
+
stack.push(value);
|
|
3189
|
+
return replacer == null ? value : replacer.call(this, key, value);
|
|
3190
|
+
};
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
});
|
|
3194
|
+
|
|
3164
3195
|
// package/index.ts
|
|
3165
3196
|
var package_exports = {};
|
|
3166
3197
|
__export(package_exports, {
|
|
@@ -3335,6 +3366,10 @@ var WebCall = (() => {
|
|
|
3335
3366
|
* Server initiated call
|
|
3336
3367
|
*/
|
|
3337
3368
|
KIT_INVITE: "invite",
|
|
3369
|
+
/**
|
|
3370
|
+
* Server outgoing initiated call
|
|
3371
|
+
*/
|
|
3372
|
+
KIT_OUTGOING_INVITE: "outgoingInvite",
|
|
3338
3373
|
// /**
|
|
3339
3374
|
// * Referral
|
|
3340
3375
|
// */
|
|
@@ -3578,6 +3613,10 @@ var WebCall = (() => {
|
|
|
3578
3613
|
NONE: "NONE",
|
|
3579
3614
|
INTERNAL: "INTERNAL"
|
|
3580
3615
|
};
|
|
3616
|
+
var LogGatherEnum = {
|
|
3617
|
+
ENABLE: 1,
|
|
3618
|
+
DISABLE: 2
|
|
3619
|
+
};
|
|
3581
3620
|
var constrainsDefault = {
|
|
3582
3621
|
audio: {
|
|
3583
3622
|
autoGainControl: true,
|
|
@@ -3597,9 +3636,11 @@ var WebCall = (() => {
|
|
|
3597
3636
|
SIP_CONNECT_ERROR: "SIP_CONNECT_ERROR",
|
|
3598
3637
|
SIP_RECONNECT_ERROR: "SIP_RECONNECT_ERROR",
|
|
3599
3638
|
SIP_RECONNECT_SUCCESS: "SIP_RECONNECT_SUCCESS",
|
|
3639
|
+
SIP_RECONNECTING: "SIP_RECONNECTING",
|
|
3600
3640
|
INCALL_CONNECT_ERROR: "INCALL_CONNECT_ERROR",
|
|
3601
3641
|
INCALL_RECONNECT_ERROR: "INCALL_RECONNECT_ERROR",
|
|
3602
3642
|
INCALL_RECONNECT_SUCCESS: "INCALL_RECONNECT_SUCCESS",
|
|
3643
|
+
INCALL_RECONNECTING: "INCALL_RECONNECTING",
|
|
3603
3644
|
OPTIONS_HEARTBEAT_EXPIRED: "OPTIONS_HEARTBEAT_EXPIRED",
|
|
3604
3645
|
USER_AGENT_START_ERROR: "USER_AGENT_START_ERROR"
|
|
3605
3646
|
};
|
|
@@ -3723,7 +3764,8 @@ var WebCall = (() => {
|
|
|
3723
3764
|
fsPort: "",
|
|
3724
3765
|
iceInfo: [],
|
|
3725
3766
|
iceGatheringTimeout: 0,
|
|
3726
|
-
encryptionMethod: EncryptionMethod.INTERNAL
|
|
3767
|
+
encryptionMethod: EncryptionMethod.INTERNAL,
|
|
3768
|
+
logGather: LogGatherEnum.DISABLE
|
|
3727
3769
|
},
|
|
3728
3770
|
// EXECUTE setUserStatus
|
|
3729
3771
|
isAutoUpdateUserStatus: true
|
|
@@ -3755,7 +3797,8 @@ var WebCall = (() => {
|
|
|
3755
3797
|
fsPort: "",
|
|
3756
3798
|
iceInfo: [],
|
|
3757
3799
|
iceGatheringTimeout: this.config.userInfo.iceGatheringTimeout,
|
|
3758
|
-
encryptionMethod: EncryptionMethod.INTERNAL
|
|
3800
|
+
encryptionMethod: EncryptionMethod.INTERNAL,
|
|
3801
|
+
logGather: LogGatherEnum.DISABLE
|
|
3759
3802
|
};
|
|
3760
3803
|
this.callKit.trigger(KitEvent.KIT_LOGIN_CHANGE, false);
|
|
3761
3804
|
}
|
|
@@ -3768,6 +3811,7 @@ var WebCall = (() => {
|
|
|
3768
3811
|
return true;
|
|
3769
3812
|
};
|
|
3770
3813
|
isLogin = () => this.validate();
|
|
3814
|
+
isLogGatherEnable = () => this.config.userInfo.logGather === LogGatherEnum.ENABLE;
|
|
3771
3815
|
check() {
|
|
3772
3816
|
if (!this.isLogin()) {
|
|
3773
3817
|
this.callKit.logger.error("User not logged in", {
|
|
@@ -3780,16 +3824,41 @@ var WebCall = (() => {
|
|
|
3780
3824
|
};
|
|
3781
3825
|
|
|
3782
3826
|
// package/logger.ts
|
|
3827
|
+
var import_json_stringify_safe = __toESM(require_stringify());
|
|
3828
|
+
var LogDataEnum = {
|
|
3829
|
+
SIP: "sip",
|
|
3830
|
+
INCALL: "incall",
|
|
3831
|
+
AJAX: "ajax",
|
|
3832
|
+
ERROR: "error",
|
|
3833
|
+
RECONNECT: "reconnect",
|
|
3834
|
+
ALL: "all"
|
|
3835
|
+
};
|
|
3783
3836
|
function getLevel(level) {
|
|
3784
3837
|
return LoggerLevelMap[level];
|
|
3785
3838
|
}
|
|
3786
3839
|
var Logger = class {
|
|
3787
3840
|
prefix = "CallKit";
|
|
3788
3841
|
level = "debug";
|
|
3842
|
+
logData = {
|
|
3843
|
+
sip: [],
|
|
3844
|
+
incall: [],
|
|
3845
|
+
ajax: [],
|
|
3846
|
+
error: [],
|
|
3847
|
+
reconnect: [],
|
|
3848
|
+
all: []
|
|
3849
|
+
};
|
|
3789
3850
|
callKit;
|
|
3790
3851
|
constructor(callKit, level) {
|
|
3791
3852
|
this.callKit = callKit;
|
|
3792
3853
|
this.level = level || "debug";
|
|
3854
|
+
this.logData = {
|
|
3855
|
+
sip: [],
|
|
3856
|
+
incall: [],
|
|
3857
|
+
ajax: [],
|
|
3858
|
+
error: [],
|
|
3859
|
+
reconnect: [],
|
|
3860
|
+
all: []
|
|
3861
|
+
};
|
|
3793
3862
|
}
|
|
3794
3863
|
setLevel(level) {
|
|
3795
3864
|
this.level = level;
|
|
@@ -3828,6 +3897,60 @@ var WebCall = (() => {
|
|
|
3828
3897
|
error.data = rest;
|
|
3829
3898
|
throw error;
|
|
3830
3899
|
}
|
|
3900
|
+
addLogData(type, data) {
|
|
3901
|
+
if (!this.callKit.config.isLogGatherEnable()) {
|
|
3902
|
+
return;
|
|
3903
|
+
}
|
|
3904
|
+
let logData = {
|
|
3905
|
+
type,
|
|
3906
|
+
timestamp: (/* @__PURE__ */ new Date()).valueOf(),
|
|
3907
|
+
time: (/* @__PURE__ */ new Date()).toLocaleString(),
|
|
3908
|
+
data: ""
|
|
3909
|
+
};
|
|
3910
|
+
if (type === LogDataEnum.INCALL) {
|
|
3911
|
+
logData.data = (0, import_json_stringify_safe.default)({
|
|
3912
|
+
// customField
|
|
3913
|
+
callKitSocketFrom: data?.callKitSocketFrom,
|
|
3914
|
+
type: data?.ev.type || data?.type,
|
|
3915
|
+
data: data?.ev.data || data?.data,
|
|
3916
|
+
// message
|
|
3917
|
+
origin: data?.ev.origin || data?.origin,
|
|
3918
|
+
lastEventId: data?.ev.lastEventId || data?.lastEventId,
|
|
3919
|
+
isTrusted: data?.ev.isTrusted || data?.isTrusted,
|
|
3920
|
+
// close
|
|
3921
|
+
code: data?.ev.code || data?.code,
|
|
3922
|
+
reason: data?.ev.reason || data?.reason,
|
|
3923
|
+
wasClean: data?.ev.wasClean || data?.wasClean
|
|
3924
|
+
});
|
|
3925
|
+
} else {
|
|
3926
|
+
logData = (0, import_json_stringify_safe.default)(data);
|
|
3927
|
+
}
|
|
3928
|
+
switch (type) {
|
|
3929
|
+
case LogDataEnum.SIP:
|
|
3930
|
+
this.logData.sip.push(logData);
|
|
3931
|
+
this.logData.all.push(logData);
|
|
3932
|
+
break;
|
|
3933
|
+
case LogDataEnum.INCALL:
|
|
3934
|
+
this.logData.incall.push(logData);
|
|
3935
|
+
this.logData.all.push(logData);
|
|
3936
|
+
break;
|
|
3937
|
+
case LogDataEnum.AJAX:
|
|
3938
|
+
this.logData.ajax.push(logData);
|
|
3939
|
+
this.logData.all.push(logData);
|
|
3940
|
+
break;
|
|
3941
|
+
case LogDataEnum.RECONNECT:
|
|
3942
|
+
this.logData.reconnect.push(logData);
|
|
3943
|
+
this.logData.all.push(logData);
|
|
3944
|
+
break;
|
|
3945
|
+
case LogDataEnum.ERROR:
|
|
3946
|
+
this.logData.error.push(logData);
|
|
3947
|
+
this.logData.all.push(logData);
|
|
3948
|
+
break;
|
|
3949
|
+
default:
|
|
3950
|
+
this.logData.all.push(logData);
|
|
3951
|
+
break;
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3831
3954
|
output(color) {
|
|
3832
3955
|
return (msg, extra = {}) => {
|
|
3833
3956
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -18520,6 +18643,11 @@ var WebCall = (() => {
|
|
|
18520
18643
|
lastOptionsUpdateTime: that.lastOptionsUpdateTime,
|
|
18521
18644
|
now
|
|
18522
18645
|
});
|
|
18646
|
+
that.callKit.logger.addLogData(LogDataEnum.RECONNECT, {
|
|
18647
|
+
event: ConnectEvent.OPTIONS_HEARTBEAT_EXPIRED,
|
|
18648
|
+
lastOptionsUpdateTime: that.lastOptionsUpdateTime,
|
|
18649
|
+
now
|
|
18650
|
+
});
|
|
18523
18651
|
that.clearObserveOptionsHeartbeatInterval();
|
|
18524
18652
|
}
|
|
18525
18653
|
}
|
|
@@ -18531,6 +18659,7 @@ var WebCall = (() => {
|
|
|
18531
18659
|
if (request2.method === "OPTIONS") {
|
|
18532
18660
|
that.lastOptionsUpdateTime = (/* @__PURE__ */ new Date()).getTime();
|
|
18533
18661
|
}
|
|
18662
|
+
that.callKit.logger.addLogData(LogDataEnum.SIP, request2);
|
|
18534
18663
|
return originalReceiveRequest(request2);
|
|
18535
18664
|
};
|
|
18536
18665
|
};
|
|
@@ -18576,6 +18705,20 @@ var WebCall = (() => {
|
|
|
18576
18705
|
};
|
|
18577
18706
|
if (this.isOutgoing) {
|
|
18578
18707
|
this.currentSession.accept(options);
|
|
18708
|
+
this.callKit.trigger(KitEvent.KIT_OUTGOING_INVITE, {
|
|
18709
|
+
getInviteData: () => {
|
|
18710
|
+
const { request: request2 } = this.currentSession;
|
|
18711
|
+
const headerNames = Object.keys(request2.headers);
|
|
18712
|
+
const xHeaders = {};
|
|
18713
|
+
headerNames.filter(
|
|
18714
|
+
(name) => name.toLocaleLowerCase().startsWith("x-antaios")
|
|
18715
|
+
).forEach((name) => {
|
|
18716
|
+
xHeaders[name.toLocaleLowerCase()] = request2.getHeader(name);
|
|
18717
|
+
});
|
|
18718
|
+
this.callKit.logger.debug("get invite data", xHeaders);
|
|
18719
|
+
return xHeaders;
|
|
18720
|
+
}
|
|
18721
|
+
});
|
|
18579
18722
|
} else {
|
|
18580
18723
|
this.callKit.trigger(KitEvent.KIT_INVITE, {
|
|
18581
18724
|
accept: () => {
|
|
@@ -18961,12 +19104,21 @@ var WebCall = (() => {
|
|
|
18961
19104
|
"socket reconnect times",
|
|
18962
19105
|
this.socketConfig.maxAttempts
|
|
18963
19106
|
);
|
|
19107
|
+
this.callKit.logger.addLogData(LogDataEnum.RECONNECT, {
|
|
19108
|
+
event: ConnectEvent.INCALL_RECONNECTING,
|
|
19109
|
+
attempts: this.reconnectAttempts,
|
|
19110
|
+
err: ev
|
|
19111
|
+
});
|
|
18964
19112
|
this.attemptReconnect();
|
|
18965
19113
|
} else if (this.reconnectAttempts >= this.socketConfig.maxAttempts) {
|
|
18966
19114
|
this.callKit.trigger(KitEvent.CONNECT_EVENT, {
|
|
18967
19115
|
event: ConnectEvent.INCALL_RECONNECT_ERROR,
|
|
18968
19116
|
err: ev
|
|
18969
19117
|
});
|
|
19118
|
+
this.callKit.logger.addLogData(LogDataEnum.RECONNECT, {
|
|
19119
|
+
event: ConnectEvent.INCALL_RECONNECT_ERROR,
|
|
19120
|
+
err: ev
|
|
19121
|
+
});
|
|
18970
19122
|
this.reset();
|
|
18971
19123
|
this.callKit.logger.error(
|
|
18972
19124
|
"Reconnection failed, maximum retry attempts reached",
|
|
@@ -18985,6 +19137,10 @@ var WebCall = (() => {
|
|
|
18985
19137
|
}
|
|
18986
19138
|
onOpen(ev) {
|
|
18987
19139
|
this.callKit.logger.debug("socket onOpen", ev);
|
|
19140
|
+
this.callKit.logger.addLogData(LogDataEnum.INCALL, {
|
|
19141
|
+
callKitSocketFrom: "onOpen",
|
|
19142
|
+
ev
|
|
19143
|
+
});
|
|
18988
19144
|
this.isConnected = true;
|
|
18989
19145
|
this.lastPingTime = Date.now();
|
|
18990
19146
|
this.checkPing();
|
|
@@ -19003,11 +19159,19 @@ var WebCall = (() => {
|
|
|
19003
19159
|
}
|
|
19004
19160
|
onClose(ev) {
|
|
19005
19161
|
this.callKit.logger.debug("socket onClose", ev);
|
|
19162
|
+
this.callKit.logger.addLogData(LogDataEnum.INCALL, {
|
|
19163
|
+
callKitSocketFrom: "onClose",
|
|
19164
|
+
ev
|
|
19165
|
+
});
|
|
19006
19166
|
if ((ev.code !== 1e3 || !ev.wasClean) && this.callKit.connect.isRegistered()) {
|
|
19007
19167
|
this.callKit.trigger(KitEvent.CONNECT_EVENT, {
|
|
19008
19168
|
event: ConnectEvent.INCALL_CONNECT_ERROR,
|
|
19009
19169
|
err: ev
|
|
19010
19170
|
});
|
|
19171
|
+
this.callKit.logger.addLogData(LogDataEnum.RECONNECT, {
|
|
19172
|
+
event: ConnectEvent.INCALL_CONNECT_ERROR,
|
|
19173
|
+
err: ev
|
|
19174
|
+
});
|
|
19011
19175
|
this.reconnect(ev);
|
|
19012
19176
|
} else {
|
|
19013
19177
|
this.isConnected = false;
|
|
@@ -19025,6 +19189,10 @@ var WebCall = (() => {
|
|
|
19025
19189
|
errCode: ErrorCode.SOCKET_CONNECT_ERROR,
|
|
19026
19190
|
data: ev
|
|
19027
19191
|
});
|
|
19192
|
+
this.callKit.logger.addLogData(LogDataEnum.INCALL, {
|
|
19193
|
+
callKitSocketFrom: "onError",
|
|
19194
|
+
ev
|
|
19195
|
+
});
|
|
19028
19196
|
if (this.isReconnecting) {
|
|
19029
19197
|
this.attemptReconnect();
|
|
19030
19198
|
}
|
|
@@ -19032,6 +19200,10 @@ var WebCall = (() => {
|
|
|
19032
19200
|
onMessage(ev) {
|
|
19033
19201
|
const data = JSON.parse(ev.data);
|
|
19034
19202
|
this.callKit.logger.debug("socket onMessage", data);
|
|
19203
|
+
this.callKit.logger.addLogData(LogDataEnum.INCALL, {
|
|
19204
|
+
callKitSocketFrom: "onMessage",
|
|
19205
|
+
ev
|
|
19206
|
+
});
|
|
19035
19207
|
if (data.event === SocketReceiveEvent.PONG) {
|
|
19036
19208
|
this.lastPingTime = Date.now();
|
|
19037
19209
|
return;
|
|
@@ -19288,16 +19460,37 @@ var WebCall = (() => {
|
|
|
19288
19460
|
this.callKit.trigger(KitEvent.KIT_USER_STATUS_CHANGE, UserStatus.offline);
|
|
19289
19461
|
return;
|
|
19290
19462
|
}
|
|
19291
|
-
|
|
19463
|
+
const postData = {
|
|
19292
19464
|
agentId,
|
|
19293
19465
|
userStatus: status
|
|
19294
|
-
}
|
|
19466
|
+
};
|
|
19467
|
+
const logData = {
|
|
19468
|
+
postData,
|
|
19469
|
+
url: "/agent/user/changeStatus",
|
|
19470
|
+
status: "send",
|
|
19471
|
+
startTimeStamp: (/* @__PURE__ */ new Date()).valueOf(),
|
|
19472
|
+
startTime: (/* @__PURE__ */ new Date()).toLocaleString()
|
|
19473
|
+
};
|
|
19474
|
+
this.callKit.logger.addLogData(LogDataEnum.AJAX, logData);
|
|
19475
|
+
await this.callKit.api.setUserStatus(postData).then(() => {
|
|
19295
19476
|
this.userStatus = status;
|
|
19296
19477
|
this.callKit.trigger(KitEvent.KIT_USER_STATUS_CHANGE, status);
|
|
19478
|
+
this.callKit.logger.addLogData(LogDataEnum.AJAX, {
|
|
19479
|
+
...logData,
|
|
19480
|
+
status: "success",
|
|
19481
|
+
endTimeStamp: (/* @__PURE__ */ new Date()).valueOf(),
|
|
19482
|
+
endTime: (/* @__PURE__ */ new Date()).toLocaleString()
|
|
19483
|
+
});
|
|
19297
19484
|
}).catch((err) => {
|
|
19298
19485
|
this.callKit.logger.error(err, {
|
|
19299
19486
|
errCode: ErrorCode.API_USER_STATUS_UPDATE_ERROR
|
|
19300
19487
|
});
|
|
19488
|
+
this.callKit.logger.addLogData(LogDataEnum.AJAX, {
|
|
19489
|
+
...logData,
|
|
19490
|
+
status: "error",
|
|
19491
|
+
endTimeStamp: (/* @__PURE__ */ new Date()).valueOf(),
|
|
19492
|
+
endTime: (/* @__PURE__ */ new Date()).toLocaleString()
|
|
19493
|
+
});
|
|
19301
19494
|
});
|
|
19302
19495
|
}
|
|
19303
19496
|
async sendHangUpReason(data) {
|
|
@@ -19390,6 +19583,7 @@ var WebCall = (() => {
|
|
|
19390
19583
|
fsPort: user.fsPort,
|
|
19391
19584
|
iceInfo: user.iceInfo,
|
|
19392
19585
|
iceGatheringTimeout: user.iceGatheringTimeout,
|
|
19586
|
+
logGather: user.logGather,
|
|
19393
19587
|
// encryptionType is in extra
|
|
19394
19588
|
...extra
|
|
19395
19589
|
});
|