webitel-sdk 0.1.81 → 0.1.85
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/bundles/index.esm.js +146 -27
- package/bundles/index.esm.js.map +1 -1
- package/bundles/index.esm.min.js +1 -1
- package/bundles/index.esm.min.js.map +1 -1
- package/bundles/index.umd.js +194 -41
- package/bundles/index.umd.js.map +1 -1
- package/bundles/index.umd.min.js +1 -1
- package/bundles/index.umd.min.js.map +1 -1
- package/esm2015/api/call-service-api.js +7 -21
- package/esm2015/api/call-service-api.js.map +1 -1
- package/esm2015/api/engine-reset-members-request.js +13 -0
- package/esm2015/api/engine-reset-members-request.js.map +1 -0
- package/esm2015/api/engine-reset-members-response.js +13 -0
- package/esm2015/api/engine-reset-members-response.js.map +1 -0
- package/esm2015/api/index.js.map +1 -1
- package/esm2015/api/member-service-api.js +106 -0
- package/esm2015/api/member-service-api.js.map +1 -1
- package/esm2015/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.js +1 -1
- package/esm2015/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.js.map +1 -1
- package/esm2015/socket/call.js +10 -0
- package/esm2015/socket/call.js.map +1 -1
- package/esm2015/socket/client.js +23 -6
- package/esm2015/socket/client.js.map +1 -1
- package/esm5/api/call-service-api.js +8 -22
- package/esm5/api/call-service-api.js.map +1 -1
- package/esm5/api/engine-reset-members-request.js +13 -0
- package/esm5/api/engine-reset-members-request.js.map +1 -0
- package/esm5/api/engine-reset-members-response.js +13 -0
- package/esm5/api/engine-reset-members-response.js.map +1 -0
- package/esm5/api/index.js.map +1 -1
- package/esm5/api/member-service-api.js +119 -0
- package/esm5/api/member-service-api.js.map +1 -1
- package/esm5/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.js +1 -1
- package/esm5/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.js.map +1 -1
- package/esm5/socket/call.js +18 -0
- package/esm5/socket/call.js.map +1 -1
- package/esm5/socket/client.js +49 -19
- package/esm5/socket/client.js.map +1 -1
- package/package.json +1 -1
- package/types/api/call-service-api.d.ts +4 -9
- package/types/api/call-service-api.d.ts.map +1 -1
- package/types/api/engine-attempt-history.d.ts +6 -0
- package/types/api/engine-attempt-history.d.ts.map +1 -1
- package/types/api/engine-history-call.d.ts +6 -0
- package/types/api/engine-history-call.d.ts.map +1 -1
- package/types/api/engine-reset-members-request.d.ts +63 -0
- package/types/api/engine-reset-members-request.d.ts.map +1 -0
- package/types/api/engine-reset-members-response.d.ts +25 -0
- package/types/api/engine-reset-members-response.d.ts.map +1 -0
- package/types/api/index.d.ts +2 -1
- package/types/api/index.d.ts.map +1 -1
- package/types/api/member-service-api.d.ts +38 -0
- package/types/api/member-service-api.d.ts.map +1 -1
- package/types/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.d.ts +1 -2
- package/types/api-consumers/list-getter/base-list-getter-api-consumer/base-list-getter-api-consumer.d.ts.map +1 -1
- package/types/socket/call.d.ts +2 -0
- package/types/socket/call.d.ts.map +1 -1
- package/types/socket/client.d.ts +4 -0
- package/types/socket/client.d.ts.map +1 -1
- package/esm2015/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.js +0 -1
- package/esm2015/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.js.map +0 -1
- package/esm5/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.js +0 -1
- package/esm5/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.js.map +0 -1
- package/types/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.d.ts +0 -3
- package/types/api-consumers/list-getter/_shared/interfaces/response/lookup-list-getter-response.d.ts.map +0 -1
package/bundles/index.umd.js
CHANGED
|
@@ -7198,14 +7198,13 @@
|
|
|
7198
7198
|
*
|
|
7199
7199
|
* @param {string} callId
|
|
7200
7200
|
* @param {string} id
|
|
7201
|
-
* @param {EngineDeleteCallAnnotationRequest} body
|
|
7202
7201
|
* @param {*} [options] Override http request option.
|
|
7203
7202
|
* @throws {RequiredError}
|
|
7204
7203
|
*/
|
|
7205
|
-
deleteCallAnnotation: function (callId, id,
|
|
7204
|
+
deleteCallAnnotation: function (callId, id, options) {
|
|
7206
7205
|
if (options === void 0) { options = {}; }
|
|
7207
7206
|
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
7208
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions
|
|
7207
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions;
|
|
7209
7208
|
return tslib.__generator(this, function (_b) {
|
|
7210
7209
|
switch (_b.label) {
|
|
7211
7210
|
case 0:
|
|
@@ -7217,10 +7216,6 @@
|
|
|
7217
7216
|
if (id === null || id === undefined) {
|
|
7218
7217
|
throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteCallAnnotation.');
|
|
7219
7218
|
}
|
|
7220
|
-
// verify required parameter 'body' is not null or undefined
|
|
7221
|
-
if (body === null || body === undefined) {
|
|
7222
|
-
throw new RequiredError('body', 'Required parameter body was null or undefined when calling deleteCallAnnotation.');
|
|
7223
|
-
}
|
|
7224
7219
|
localVarPath = "/calls/history/{call_id}/annotation/{id}"
|
|
7225
7220
|
.replace("{" + 'call_id' + "}", encodeURIComponent(String(callId)))
|
|
7226
7221
|
.replace("{" + 'id' + "}", encodeURIComponent(String(id)));
|
|
@@ -7246,17 +7241,11 @@
|
|
|
7246
7241
|
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
7247
7242
|
_b.label = 5;
|
|
7248
7243
|
case 5:
|
|
7249
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
7250
7244
|
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
7251
7245
|
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
7252
7246
|
delete localVarUrlObj.search;
|
|
7253
7247
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7254
7248
|
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7255
|
-
needsSerialization = typeof body !== 'string' ||
|
|
7256
|
-
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
7257
|
-
localVarRequestOptions.data = needsSerialization
|
|
7258
|
-
? JSON.stringify(body !== undefined ? body : {})
|
|
7259
|
-
: body || '';
|
|
7260
7249
|
return [2 /*return*/, {
|
|
7261
7250
|
url: globalImportUrl.format(localVarUrlObj),
|
|
7262
7251
|
options: localVarRequestOptions,
|
|
@@ -8166,16 +8155,15 @@
|
|
|
8166
8155
|
*
|
|
8167
8156
|
* @param {string} callId
|
|
8168
8157
|
* @param {string} id
|
|
8169
|
-
* @param {EngineDeleteCallAnnotationRequest} body
|
|
8170
8158
|
* @param {*} [options] Override http request option.
|
|
8171
8159
|
* @throws {RequiredError}
|
|
8172
8160
|
*/
|
|
8173
|
-
deleteCallAnnotation: function (callId, id,
|
|
8161
|
+
deleteCallAnnotation: function (callId, id, options) {
|
|
8174
8162
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
8175
8163
|
var localVarAxiosArgs;
|
|
8176
8164
|
return tslib.__generator(this, function (_a) {
|
|
8177
8165
|
switch (_a.label) {
|
|
8178
|
-
case 0: return [4 /*yield*/, CallServiceApiAxiosParamCreator(configuration).deleteCallAnnotation(callId, id,
|
|
8166
|
+
case 0: return [4 /*yield*/, CallServiceApiAxiosParamCreator(configuration).deleteCallAnnotation(callId, id, options)];
|
|
8179
8167
|
case 1:
|
|
8180
8168
|
localVarAxiosArgs = _a.sent();
|
|
8181
8169
|
return [2 /*return*/, function (axios, basePath) {
|
|
@@ -8532,13 +8520,12 @@
|
|
|
8532
8520
|
*
|
|
8533
8521
|
* @param {string} callId
|
|
8534
8522
|
* @param {string} id
|
|
8535
|
-
* @param {EngineDeleteCallAnnotationRequest} body
|
|
8536
8523
|
* @param {*} [options] Override http request option.
|
|
8537
8524
|
* @throws {RequiredError}
|
|
8538
8525
|
*/
|
|
8539
|
-
deleteCallAnnotation: function (callId, id,
|
|
8526
|
+
deleteCallAnnotation: function (callId, id, options) {
|
|
8540
8527
|
return CallServiceApiFp(configuration)
|
|
8541
|
-
.deleteCallAnnotation(callId, id,
|
|
8528
|
+
.deleteCallAnnotation(callId, id, options)
|
|
8542
8529
|
.then(function (request) { return request(axios, basePath); });
|
|
8543
8530
|
},
|
|
8544
8531
|
/**
|
|
@@ -8781,15 +8768,14 @@
|
|
|
8781
8768
|
*
|
|
8782
8769
|
* @param {string} callId
|
|
8783
8770
|
* @param {string} id
|
|
8784
|
-
* @param {EngineDeleteCallAnnotationRequest} body
|
|
8785
8771
|
* @param {*} [options] Override http request option.
|
|
8786
8772
|
* @throws {RequiredError}
|
|
8787
8773
|
* @memberof CallServiceApi
|
|
8788
8774
|
*/
|
|
8789
|
-
CallServiceApi.prototype.deleteCallAnnotation = function (callId, id,
|
|
8775
|
+
CallServiceApi.prototype.deleteCallAnnotation = function (callId, id, options) {
|
|
8790
8776
|
var _this = this;
|
|
8791
8777
|
return CallServiceApiFp(this.configuration)
|
|
8792
|
-
.deleteCallAnnotation(callId, id,
|
|
8778
|
+
.deleteCallAnnotation(callId, id, options)
|
|
8793
8779
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
8794
8780
|
};
|
|
8795
8781
|
/**
|
|
@@ -12604,6 +12590,71 @@
|
|
|
12604
12590
|
});
|
|
12605
12591
|
});
|
|
12606
12592
|
},
|
|
12593
|
+
/**
|
|
12594
|
+
*
|
|
12595
|
+
* @summary ResetMembers
|
|
12596
|
+
* @param {string} queueId
|
|
12597
|
+
* @param {EngineResetMembersRequest} body
|
|
12598
|
+
* @param {*} [options] Override http request option.
|
|
12599
|
+
* @throws {RequiredError}
|
|
12600
|
+
*/
|
|
12601
|
+
resetMembers: function (queueId, body, options) {
|
|
12602
|
+
if (options === void 0) { options = {}; }
|
|
12603
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
12604
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarApiKeyValue, _a, headersFromBaseOptions, needsSerialization;
|
|
12605
|
+
return tslib.__generator(this, function (_b) {
|
|
12606
|
+
switch (_b.label) {
|
|
12607
|
+
case 0:
|
|
12608
|
+
// verify required parameter 'queueId' is not null or undefined
|
|
12609
|
+
if (queueId === null || queueId === undefined) {
|
|
12610
|
+
throw new RequiredError('queueId', 'Required parameter queueId was null or undefined when calling resetMembers.');
|
|
12611
|
+
}
|
|
12612
|
+
// verify required parameter 'body' is not null or undefined
|
|
12613
|
+
if (body === null || body === undefined) {
|
|
12614
|
+
throw new RequiredError('body', 'Required parameter body was null or undefined when calling resetMembers.');
|
|
12615
|
+
}
|
|
12616
|
+
localVarPath = "/call_center/queues/{queue_id}/members/reset".replace("{" + 'queue_id' + "}", encodeURIComponent(String(queueId)));
|
|
12617
|
+
localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
|
12618
|
+
if (configuration) {
|
|
12619
|
+
baseOptions = configuration.baseOptions;
|
|
12620
|
+
}
|
|
12621
|
+
localVarRequestOptions = tslib.__assign(tslib.__assign({ method: 'PATCH' }, baseOptions), options);
|
|
12622
|
+
localVarHeaderParameter = {};
|
|
12623
|
+
localVarQueryParameter = {};
|
|
12624
|
+
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
|
|
12625
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
12626
|
+
return [4 /*yield*/, configuration.apiKey('X-Webitel-Access')];
|
|
12627
|
+
case 1:
|
|
12628
|
+
_a = _b.sent();
|
|
12629
|
+
return [3 /*break*/, 4];
|
|
12630
|
+
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
12631
|
+
case 3:
|
|
12632
|
+
_a = _b.sent();
|
|
12633
|
+
_b.label = 4;
|
|
12634
|
+
case 4:
|
|
12635
|
+
localVarApiKeyValue = _a;
|
|
12636
|
+
localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
|
|
12637
|
+
_b.label = 5;
|
|
12638
|
+
case 5:
|
|
12639
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
12640
|
+
localVarUrlObj.query = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
|
|
12641
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
12642
|
+
delete localVarUrlObj.search;
|
|
12643
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12644
|
+
localVarRequestOptions.headers = tslib.__assign(tslib.__assign(tslib.__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12645
|
+
needsSerialization = typeof body !== 'string' ||
|
|
12646
|
+
localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
12647
|
+
localVarRequestOptions.data = needsSerialization
|
|
12648
|
+
? JSON.stringify(body !== undefined ? body : {})
|
|
12649
|
+
: body || '';
|
|
12650
|
+
return [2 /*return*/, {
|
|
12651
|
+
url: globalImportUrl.format(localVarUrlObj),
|
|
12652
|
+
options: localVarRequestOptions,
|
|
12653
|
+
}];
|
|
12654
|
+
}
|
|
12655
|
+
});
|
|
12656
|
+
});
|
|
12657
|
+
},
|
|
12607
12658
|
/**
|
|
12608
12659
|
*
|
|
12609
12660
|
* @summary SearchAttempts
|
|
@@ -13357,6 +13408,32 @@
|
|
|
13357
13408
|
});
|
|
13358
13409
|
});
|
|
13359
13410
|
},
|
|
13411
|
+
/**
|
|
13412
|
+
*
|
|
13413
|
+
* @summary ResetMembers
|
|
13414
|
+
* @param {string} queueId
|
|
13415
|
+
* @param {EngineResetMembersRequest} body
|
|
13416
|
+
* @param {*} [options] Override http request option.
|
|
13417
|
+
* @throws {RequiredError}
|
|
13418
|
+
*/
|
|
13419
|
+
resetMembers: function (queueId, body, options) {
|
|
13420
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
13421
|
+
var localVarAxiosArgs;
|
|
13422
|
+
return tslib.__generator(this, function (_a) {
|
|
13423
|
+
switch (_a.label) {
|
|
13424
|
+
case 0: return [4 /*yield*/, MemberServiceApiAxiosParamCreator(configuration).resetMembers(queueId, body, options)];
|
|
13425
|
+
case 1:
|
|
13426
|
+
localVarAxiosArgs = _a.sent();
|
|
13427
|
+
return [2 /*return*/, function (axios, basePath) {
|
|
13428
|
+
if (axios === void 0) { axios = globalAxios; }
|
|
13429
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
13430
|
+
var axiosRequestArgs = tslib.__assign(tslib.__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
|
|
13431
|
+
return axios.request(axiosRequestArgs);
|
|
13432
|
+
}];
|
|
13433
|
+
}
|
|
13434
|
+
});
|
|
13435
|
+
});
|
|
13436
|
+
},
|
|
13360
13437
|
/**
|
|
13361
13438
|
*
|
|
13362
13439
|
* @summary SearchAttempts
|
|
@@ -13685,6 +13762,19 @@
|
|
|
13685
13762
|
.readMember(queueId, id, domainId, options)
|
|
13686
13763
|
.then(function (request) { return request(axios, basePath); });
|
|
13687
13764
|
},
|
|
13765
|
+
/**
|
|
13766
|
+
*
|
|
13767
|
+
* @summary ResetMembers
|
|
13768
|
+
* @param {string} queueId
|
|
13769
|
+
* @param {EngineResetMembersRequest} body
|
|
13770
|
+
* @param {*} [options] Override http request option.
|
|
13771
|
+
* @throws {RequiredError}
|
|
13772
|
+
*/
|
|
13773
|
+
resetMembers: function (queueId, body, options) {
|
|
13774
|
+
return MemberServiceApiFp(configuration)
|
|
13775
|
+
.resetMembers(queueId, body, options)
|
|
13776
|
+
.then(function (request) { return request(axios, basePath); });
|
|
13777
|
+
},
|
|
13688
13778
|
/**
|
|
13689
13779
|
*
|
|
13690
13780
|
* @summary SearchAttempts
|
|
@@ -13960,6 +14050,21 @@
|
|
|
13960
14050
|
.readMember(queueId, id, domainId, options)
|
|
13961
14051
|
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
13962
14052
|
};
|
|
14053
|
+
/**
|
|
14054
|
+
*
|
|
14055
|
+
* @summary ResetMembers
|
|
14056
|
+
* @param {string} queueId
|
|
14057
|
+
* @param {EngineResetMembersRequest} body
|
|
14058
|
+
* @param {*} [options] Override http request option.
|
|
14059
|
+
* @throws {RequiredError}
|
|
14060
|
+
* @memberof MemberServiceApi
|
|
14061
|
+
*/
|
|
14062
|
+
MemberServiceApi.prototype.resetMembers = function (queueId, body, options) {
|
|
14063
|
+
var _this = this;
|
|
14064
|
+
return MemberServiceApiFp(this.configuration)
|
|
14065
|
+
.resetMembers(queueId, body, options)
|
|
14066
|
+
.then(function (request) { return request(_this.axios, _this.basePath); });
|
|
14067
|
+
};
|
|
13963
14068
|
/**
|
|
13964
14069
|
*
|
|
13965
14070
|
* @summary SearchAttempts
|
|
@@ -25493,6 +25598,7 @@
|
|
|
25493
25598
|
this.hangupAt = 0;
|
|
25494
25599
|
this.bridgedAt = 0;
|
|
25495
25600
|
this.reportingAt = 0;
|
|
25601
|
+
this.autoAnswered = false;
|
|
25496
25602
|
this.peerStreams = [];
|
|
25497
25603
|
this.localStreams = [];
|
|
25498
25604
|
// fixme
|
|
@@ -25823,6 +25929,23 @@
|
|
|
25823
25929
|
});
|
|
25824
25930
|
});
|
|
25825
25931
|
};
|
|
25932
|
+
Call.prototype.answerDelay = function (req, delay) {
|
|
25933
|
+
var _this = this;
|
|
25934
|
+
if (this.autoAnswered) {
|
|
25935
|
+
return;
|
|
25936
|
+
}
|
|
25937
|
+
this.autoAnswered = true;
|
|
25938
|
+
setTimeout(function () { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
25939
|
+
return tslib.__generator(this, function (_a) {
|
|
25940
|
+
switch (_a.label) {
|
|
25941
|
+
case 0: return [4 /*yield*/, this.answer(req)];
|
|
25942
|
+
case 1:
|
|
25943
|
+
_a.sent();
|
|
25944
|
+
return [2 /*return*/];
|
|
25945
|
+
}
|
|
25946
|
+
});
|
|
25947
|
+
}); }, delay);
|
|
25948
|
+
};
|
|
25826
25949
|
Call.prototype.hangup = function (cause) {
|
|
25827
25950
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
25828
25951
|
var _cause;
|
|
@@ -26389,6 +26512,7 @@
|
|
|
26389
26512
|
var WEBSOCKET_AUTHENTICATION_CHALLENGE = 'authentication_challenge';
|
|
26390
26513
|
var WEBSOCKET_DEFAULT_DEVICE_CONFIG = 'user_default_device';
|
|
26391
26514
|
var WEBSOCKET_AGENT_SESSION = 'cc_agent_session';
|
|
26515
|
+
var WEBSOCKET_PING = 'ping';
|
|
26392
26516
|
// const WEBSOCKET_CALL_BY_USER = 'call_by_user'
|
|
26393
26517
|
var WEBSOCKET_MAKE_OUTBOUND_CALL = 'call_invite';
|
|
26394
26518
|
var WEBSOCKET_MAKE_USER_CALL = 'call_user';
|
|
@@ -26415,6 +26539,7 @@
|
|
|
26415
26539
|
_this.eventHandler = new eeTs.EventEmitter();
|
|
26416
26540
|
_this.callStore = new Map();
|
|
26417
26541
|
_this.conversationStore = new Map();
|
|
26542
|
+
_this.pingTimer = null;
|
|
26418
26543
|
_this.basePath = "" + formatBaseUri(_config.storageEndpoint || _config.endpoint);
|
|
26419
26544
|
return _this;
|
|
26420
26545
|
}
|
|
@@ -26664,6 +26789,15 @@
|
|
|
26664
26789
|
});
|
|
26665
26790
|
});
|
|
26666
26791
|
};
|
|
26792
|
+
Client.prototype.ping = function () {
|
|
26793
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
26794
|
+
return tslib.__generator(this, function (_a) {
|
|
26795
|
+
return [2 /*return*/, this.request(WEBSOCKET_PING, {
|
|
26796
|
+
ping: 1,
|
|
26797
|
+
})];
|
|
26798
|
+
});
|
|
26799
|
+
});
|
|
26800
|
+
};
|
|
26667
26801
|
Client.prototype.sessionInfo = function () {
|
|
26668
26802
|
return this.connectionInfo.session;
|
|
26669
26803
|
};
|
|
@@ -27024,14 +27158,43 @@
|
|
|
27024
27158
|
this.eventHandler.emit(TASK_EVENT, e.status, task);
|
|
27025
27159
|
}
|
|
27026
27160
|
};
|
|
27161
|
+
Client.prototype.pingServer = function () {
|
|
27162
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
27163
|
+
return tslib.__generator(this, function (_a) {
|
|
27164
|
+
switch (_a.label) {
|
|
27165
|
+
case 0:
|
|
27166
|
+
if (!this.pingTimer) return [3 /*break*/, 2];
|
|
27167
|
+
return [4 /*yield*/, this.ping()];
|
|
27168
|
+
case 1:
|
|
27169
|
+
_a.sent();
|
|
27170
|
+
_a.label = 2;
|
|
27171
|
+
case 2:
|
|
27172
|
+
if (this.connectionInfo.ping_interval) {
|
|
27173
|
+
// @ts-ignore
|
|
27174
|
+
this.pingTimer = setTimeout(this.pingServer.bind(this), +this.connectionInfo.ping_interval);
|
|
27175
|
+
}
|
|
27176
|
+
return [2 /*return*/];
|
|
27177
|
+
}
|
|
27178
|
+
});
|
|
27179
|
+
});
|
|
27180
|
+
};
|
|
27027
27181
|
Client.prototype.connected = function (info) {
|
|
27028
27182
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
27029
27183
|
return tslib.__generator(this, function (_a) {
|
|
27030
|
-
|
|
27031
|
-
|
|
27032
|
-
|
|
27184
|
+
switch (_a.label) {
|
|
27185
|
+
case 0:
|
|
27186
|
+
this.connectionInfo = info;
|
|
27187
|
+
if (!info.ping_interval) return [3 /*break*/, 2];
|
|
27188
|
+
return [4 /*yield*/, this.pingServer()];
|
|
27189
|
+
case 1:
|
|
27190
|
+
_a.sent();
|
|
27191
|
+
_a.label = 2;
|
|
27192
|
+
case 2:
|
|
27193
|
+
if (!this.useWebPhone()) {
|
|
27194
|
+
return [2 /*return*/];
|
|
27195
|
+
}
|
|
27196
|
+
return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
|
|
27033
27197
|
}
|
|
27034
|
-
return [2 /*return*/, this.registerCallClient(new SipPhone(this.instanceId, this._config.debug))];
|
|
27035
27198
|
});
|
|
27036
27199
|
});
|
|
27037
27200
|
};
|
|
@@ -27062,22 +27225,12 @@
|
|
|
27062
27225
|
});
|
|
27063
27226
|
};
|
|
27064
27227
|
Client.prototype.checkAutoAnswer = function (call) {
|
|
27065
|
-
var _this = this;
|
|
27066
27228
|
if ( /*!document.hidden && */call.autoAnswer) {
|
|
27067
|
-
|
|
27068
|
-
|
|
27069
|
-
|
|
27070
|
-
|
|
27071
|
-
|
|
27072
|
-
screen: call.params.screen,
|
|
27073
|
-
disableStun: call.params.disableStun,
|
|
27074
|
-
})];
|
|
27075
|
-
case 1:
|
|
27076
|
-
_a.sent();
|
|
27077
|
-
return [2 /*return*/];
|
|
27078
|
-
}
|
|
27079
|
-
});
|
|
27080
|
-
}); }, 300);
|
|
27229
|
+
call.answerDelay({
|
|
27230
|
+
video: call.params.video,
|
|
27231
|
+
screen: call.params.screen,
|
|
27232
|
+
disableStun: call.params.disableStun,
|
|
27233
|
+
}, 300);
|
|
27081
27234
|
}
|
|
27082
27235
|
};
|
|
27083
27236
|
Client.prototype.connectToSocket = function () {
|