@webex/calling 3.7.0-next.8 → 3.7.0-web-workers-keepalive.1
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/CallingClient/CallingClient.js +49 -9
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +23 -24
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/call.js +121 -57
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +21 -8
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +39 -22
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.js +333 -333
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +3 -4
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +104 -0
- package/dist/CallingClient/registration/webWorker.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +37 -16
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +34 -0
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Logger/index.js +22 -14
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js +30 -5
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/common/Utils.js +96 -0
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +98 -0
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/types.js +8 -1
- package/dist/common/types.js.map +1 -1
- package/dist/module/CallingClient/CallingClient.js +8 -1
- package/dist/module/CallingClient/calling/call.js +64 -1
- package/dist/module/CallingClient/registration/register.js +50 -54
- package/dist/module/CallingClient/registration/webWorker.js +51 -0
- package/dist/module/Contacts/ContactsClient.js +16 -5
- package/dist/module/Logger/index.js +20 -11
- package/dist/module/common/Utils.js +48 -0
- package/dist/module/common/types.js +7 -0
- package/dist/types/CallingClient/CallingClient.d.ts +3 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +1 -2
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts +2 -0
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -0
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Logger/index.d.ts +2 -0
- package/dist/types/Logger/index.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +12 -9
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +2 -0
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +6 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Media from '@webex/internal-media-core';
|
|
2
2
|
import { Mutex } from 'async-mutex';
|
|
3
|
-
import {
|
|
3
|
+
import { v4 as uuid } from 'uuid';
|
|
4
|
+
import { filterMobiusUris, handleCallingClientErrors, uploadLogs, validateServiceData, } from '../common/Utils';
|
|
4
5
|
import { LOGGER } from '../Logger/types';
|
|
5
6
|
import SDKConnector from '../SDKConnector';
|
|
6
7
|
import { Eventing } from '../Events/impl';
|
|
@@ -268,6 +269,12 @@ export class CallingClient extends Eventing {
|
|
|
268
269
|
});
|
|
269
270
|
return connectCall;
|
|
270
271
|
}
|
|
272
|
+
async uploadLogs(data = {}) {
|
|
273
|
+
if (!data.feedbackId) {
|
|
274
|
+
data = { ...data, feedbackId: uuid() };
|
|
275
|
+
}
|
|
276
|
+
return uploadLogs(this.webex, data);
|
|
277
|
+
}
|
|
271
278
|
}
|
|
272
279
|
export const createClient = async (webex, config) => {
|
|
273
280
|
const callingClientInstance = new CallingClient(webex, config);
|
|
@@ -4,7 +4,7 @@ import { v4 as uuid } from 'uuid';
|
|
|
4
4
|
import { EffectEvent } from '@webex/web-media-effects';
|
|
5
5
|
import { RtcMetrics } from '@webex/internal-plugin-metrics';
|
|
6
6
|
import { ERROR_LAYER, ERROR_TYPE } from '../../Errors/types';
|
|
7
|
-
import { handleCallErrors, parseMediaQualityStatistics, serviceErrorCodeHandler, } from '../../common/Utils';
|
|
7
|
+
import { handleCallErrors, modifySdpForIPv4, parseMediaQualityStatistics, serviceErrorCodeHandler, uploadLogs, } from '../../common/Utils';
|
|
8
8
|
import { ALLOWED_SERVICES, CallDirection, HTTP_METHODS, } from '../../common/types';
|
|
9
9
|
import { createCallError } from '../../Errors/catalog/CallError';
|
|
10
10
|
import { CALL_ENDPOINT_RESOURCE, CALL_FILE, CALL_HOLD_SERVICE, CALL_STATUS_RESOURCE, CALL_TRANSFER_SERVICE, CALLING_USER_AGENT, CALLS_ENDPOINT_RESOURCE, CISCO_DEVICE_URL, DEFAULT_LOCAL_CALL_ID, DEFAULT_SESSION_TIMER, DEVICES_ENDPOINT_RESOURCE, HOLD_ENDPOINT, ICE_CANDIDATES_TIMEOUT, INITIAL_SEQ_NUMBER, MEDIA_ENDPOINT_RESOURCE, NOISE_REDUCTION_EFFECT, RESUME_ENDPOINT, SPARK_USER_AGENT, SUPPLEMENTARY_SERVICES_TIMEOUT, TRANSFER_ENDPOINT, } from '../constants';
|
|
@@ -618,6 +618,10 @@ export class Call extends Eventing {
|
|
|
618
618
|
const message = event.data;
|
|
619
619
|
try {
|
|
620
620
|
const response = await this.post(message);
|
|
621
|
+
log.log(`handleOutgoingCallSetup: Response: ${JSON.stringify(response)}`, {
|
|
622
|
+
file: CALL_FILE,
|
|
623
|
+
method: this.handleOutgoingCallSetup.name,
|
|
624
|
+
});
|
|
621
625
|
log.log(`handleOutgoingCallSetup: Response code: ${response.statusCode}`, {
|
|
622
626
|
file: CALL_FILE,
|
|
623
627
|
method: this.handleOutgoingCallSetup.name,
|
|
@@ -635,6 +639,10 @@ export class Call extends Eventing {
|
|
|
635
639
|
this.submitCallErrorMetric(error);
|
|
636
640
|
this.sendCallStateMachineEvt({ type: 'E_UNKNOWN', data: errData });
|
|
637
641
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, CALL_FILE);
|
|
642
|
+
uploadLogs(this.webex, {
|
|
643
|
+
correlationId: this.correlationId,
|
|
644
|
+
callId: this.callId,
|
|
645
|
+
});
|
|
638
646
|
}
|
|
639
647
|
}
|
|
640
648
|
async handleCallHold(event) {
|
|
@@ -672,6 +680,10 @@ export class Call extends Eventing {
|
|
|
672
680
|
this.submitCallErrorMetric(error);
|
|
673
681
|
this.sendCallStateMachineEvt({ type: 'E_CALL_ESTABLISHED', data: errData });
|
|
674
682
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, CALL_FILE);
|
|
683
|
+
uploadLogs(this.webex, {
|
|
684
|
+
correlationId: this.correlationId,
|
|
685
|
+
callId: this.callId,
|
|
686
|
+
});
|
|
675
687
|
}
|
|
676
688
|
}
|
|
677
689
|
async handleCallResume(event) {
|
|
@@ -709,6 +721,10 @@ export class Call extends Eventing {
|
|
|
709
721
|
this.submitCallErrorMetric(error);
|
|
710
722
|
this.sendCallStateMachineEvt({ type: 'E_CALL_ESTABLISHED', data: errData });
|
|
711
723
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, CALL_FILE);
|
|
724
|
+
uploadLogs(this.webex, {
|
|
725
|
+
correlationId: this.correlationId,
|
|
726
|
+
callId: this.callId,
|
|
727
|
+
});
|
|
712
728
|
}
|
|
713
729
|
}
|
|
714
730
|
handleIncomingCallProgress(event) {
|
|
@@ -793,6 +809,10 @@ export class Call extends Eventing {
|
|
|
793
809
|
this.submitCallErrorMetric(error);
|
|
794
810
|
this.sendCallStateMachineEvt({ type: 'E_UNKNOWN', data: errData });
|
|
795
811
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.handleOutgoingCallAlerting.name, CALL_FILE);
|
|
812
|
+
uploadLogs(this.webex, {
|
|
813
|
+
correlationId: this.correlationId,
|
|
814
|
+
callId: this.callId,
|
|
815
|
+
});
|
|
796
816
|
}
|
|
797
817
|
}
|
|
798
818
|
handleIncomingCallConnect(event) {
|
|
@@ -837,6 +857,10 @@ export class Call extends Eventing {
|
|
|
837
857
|
this.submitCallErrorMetric(error);
|
|
838
858
|
this.sendCallStateMachineEvt({ type: 'E_UNKNOWN', data: errData });
|
|
839
859
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.handleOutgoingCallConnect.name, CALL_FILE);
|
|
860
|
+
uploadLogs(this.webex, {
|
|
861
|
+
correlationId: this.correlationId,
|
|
862
|
+
callId: this.callId,
|
|
863
|
+
});
|
|
840
864
|
}
|
|
841
865
|
}
|
|
842
866
|
async handleIncomingCallDisconnect(event) {
|
|
@@ -935,6 +959,10 @@ export class Call extends Eventing {
|
|
|
935
959
|
this.sendCallStateMachineEvt({ type: 'E_CALL_ESTABLISHED' });
|
|
936
960
|
}, interval * 1000);
|
|
937
961
|
}, this.getCorrelationId(), error, this.handleCallEstablished.name, CALL_FILE);
|
|
962
|
+
uploadLogs(this.webex, {
|
|
963
|
+
correlationId: this.correlationId,
|
|
964
|
+
callId: this.callId,
|
|
965
|
+
});
|
|
938
966
|
}
|
|
939
967
|
}, DEFAULT_SESSION_TIMER);
|
|
940
968
|
}
|
|
@@ -1048,6 +1076,10 @@ export class Call extends Eventing {
|
|
|
1048
1076
|
}, interval * 1000);
|
|
1049
1077
|
}
|
|
1050
1078
|
}, this.getCorrelationId(), errData, this.handleRoapEstablished.name, CALL_FILE);
|
|
1079
|
+
uploadLogs(this.webex, {
|
|
1080
|
+
correlationId: this.correlationId,
|
|
1081
|
+
callId: this.callId,
|
|
1082
|
+
});
|
|
1051
1083
|
}
|
|
1052
1084
|
}
|
|
1053
1085
|
else {
|
|
@@ -1099,6 +1131,10 @@ export class Call extends Eventing {
|
|
|
1099
1131
|
this.emit(CALL_EVENT_KEYS.CALL_ERROR, error);
|
|
1100
1132
|
this.submitCallErrorMetric(error);
|
|
1101
1133
|
}, ERROR_LAYER.MEDIA, (interval) => undefined, this.getCorrelationId(), errData, this.handleRoapError.name, CALL_FILE);
|
|
1134
|
+
uploadLogs(this.webex, {
|
|
1135
|
+
correlationId: this.correlationId,
|
|
1136
|
+
callId: this.callId,
|
|
1137
|
+
});
|
|
1102
1138
|
}
|
|
1103
1139
|
}
|
|
1104
1140
|
if (!this.connected) {
|
|
@@ -1143,6 +1179,10 @@ export class Call extends Eventing {
|
|
|
1143
1179
|
}, interval * 1000);
|
|
1144
1180
|
}
|
|
1145
1181
|
}, this.getCorrelationId(), errData, this.handleOutgoingRoapOffer.name, CALL_FILE);
|
|
1182
|
+
uploadLogs(this.webex, {
|
|
1183
|
+
correlationId: this.correlationId,
|
|
1184
|
+
callId: this.callId,
|
|
1185
|
+
});
|
|
1146
1186
|
}
|
|
1147
1187
|
}
|
|
1148
1188
|
async handleOutgoingRoapAnswer(context, event) {
|
|
@@ -1172,6 +1212,10 @@ export class Call extends Eventing {
|
|
|
1172
1212
|
}, interval * 1000);
|
|
1173
1213
|
}
|
|
1174
1214
|
}, this.getCorrelationId(), errData, this.handleOutgoingRoapAnswer.name, CALL_FILE);
|
|
1215
|
+
uploadLogs(this.webex, {
|
|
1216
|
+
correlationId: this.correlationId,
|
|
1217
|
+
callId: this.callId,
|
|
1218
|
+
});
|
|
1175
1219
|
}
|
|
1176
1220
|
}
|
|
1177
1221
|
handleIncomingRoapOffer(context, event) {
|
|
@@ -1489,6 +1533,10 @@ export class Call extends Eventing {
|
|
|
1489
1533
|
this.emit(CALL_EVENT_KEYS.TRANSFER_ERROR, error);
|
|
1490
1534
|
this.submitCallErrorMetric(error, TRANSFER_ACTION.BLIND);
|
|
1491
1535
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.completeTransfer.name, CALL_FILE);
|
|
1536
|
+
uploadLogs(this.webex, {
|
|
1537
|
+
correlationId: this.correlationId,
|
|
1538
|
+
callId: this.callId,
|
|
1539
|
+
});
|
|
1492
1540
|
}
|
|
1493
1541
|
}
|
|
1494
1542
|
else if (transferType === TransferType.CONSULT && transferCallId) {
|
|
@@ -1514,6 +1562,10 @@ export class Call extends Eventing {
|
|
|
1514
1562
|
this.emit(CALL_EVENT_KEYS.TRANSFER_ERROR, error);
|
|
1515
1563
|
this.submitCallErrorMetric(error, TRANSFER_ACTION.CONSULT);
|
|
1516
1564
|
}, ERROR_LAYER.CALL_CONTROL, (interval) => undefined, this.getCorrelationId(), errData, this.completeTransfer.name, CALL_FILE);
|
|
1565
|
+
uploadLogs(this.webex, {
|
|
1566
|
+
correlationId: this.correlationId,
|
|
1567
|
+
callId: this.callId,
|
|
1568
|
+
});
|
|
1517
1569
|
}
|
|
1518
1570
|
}
|
|
1519
1571
|
else {
|
|
@@ -1580,13 +1632,23 @@ export class Call extends Eventing {
|
|
|
1580
1632
|
break;
|
|
1581
1633
|
}
|
|
1582
1634
|
case RoapScenario.OFFER: {
|
|
1635
|
+
log.info(`before modifying sdp: ${event.roapMessage.sdp}`, {
|
|
1636
|
+
file: CALL_FILE,
|
|
1637
|
+
method: this.mediaRoapEventsListener.name,
|
|
1638
|
+
});
|
|
1639
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1583
1640
|
const sdpVideoPortZero = event.roapMessage.sdp.replace(/^m=(video) (?:\d+) /gim, 'm=$1 0 ');
|
|
1641
|
+
log.info(`after modification sdp: ${sdpVideoPortZero}`, {
|
|
1642
|
+
file: CALL_FILE,
|
|
1643
|
+
method: this.mediaRoapEventsListener.name,
|
|
1644
|
+
});
|
|
1584
1645
|
event.roapMessage.sdp = sdpVideoPortZero;
|
|
1585
1646
|
this.localRoapMessage = event.roapMessage;
|
|
1586
1647
|
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_SETUP', data: event.roapMessage });
|
|
1587
1648
|
break;
|
|
1588
1649
|
}
|
|
1589
1650
|
case RoapScenario.ANSWER:
|
|
1651
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1590
1652
|
this.localRoapMessage = event.roapMessage;
|
|
1591
1653
|
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_ANSWER', data: event.roapMessage });
|
|
1592
1654
|
break;
|
|
@@ -1594,6 +1656,7 @@ export class Call extends Eventing {
|
|
|
1594
1656
|
this.sendMediaStateMachineEvt({ type: 'E_ROAP_ERROR', data: event.roapMessage });
|
|
1595
1657
|
break;
|
|
1596
1658
|
case RoapScenario.OFFER_RESPONSE:
|
|
1659
|
+
event.roapMessage.sdp = modifySdpForIPv4(event.roapMessage.sdp);
|
|
1597
1660
|
this.localRoapMessage = event.roapMessage;
|
|
1598
1661
|
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_OFFER', data: event.roapMessage });
|
|
1599
1662
|
break;
|
|
@@ -6,7 +6,7 @@ import { getMetricManager } from '../../Metrics';
|
|
|
6
6
|
import { getCallManager } from '../calling';
|
|
7
7
|
import log from '../../Logger';
|
|
8
8
|
import SDKConnector from '../../SDKConnector';
|
|
9
|
-
import { ALLOWED_SERVICES, HTTP_METHODS, RegistrationStatus, ServiceIndicator, } from '../../common/types';
|
|
9
|
+
import { ALLOWED_SERVICES, HTTP_METHODS, RegistrationStatus, ServiceIndicator, WorkerMessageType, } from '../../common/types';
|
|
10
10
|
import { CALLING_USER_AGENT, CISCO_DEVICE_URL, DEVICES_ENDPOINT_RESOURCE, SPARK_USER_AGENT, WEBEX_WEB_CLIENT, BASE_REG_RETRY_TIMER_VAL_IN_SEC, BASE_REG_TIMER_MFACTOR, SEC_TO_MSEC_MFACTOR, REG_RANDOM_T_FACTOR_UPPER_LIMIT, REG_TRY_BACKUP_TIMER_VAL_IN_SEC, MINUTES_TO_SEC_MFACTOR, FAILBACK_429_RETRY_UTIL, REG_FAILBACK_429_MAX_RETRIES, FAILBACK_UTIL, REGISTRATION_FILE, DEFAULT_REHOMING_INTERVAL_MIN, DEFAULT_REHOMING_INTERVAL_MAX, DEFAULT_KEEPALIVE_INTERVAL, REG_TRY_BACKUP_TIMER_VAL_FOR_CC_IN_SEC, } from '../constants';
|
|
11
11
|
import { LINE_EVENTS } from '../line/types';
|
|
12
12
|
export class Registration {
|
|
@@ -18,7 +18,6 @@ export class Registration {
|
|
|
18
18
|
registrationStatus;
|
|
19
19
|
failbackTimer;
|
|
20
20
|
activeMobiusUrl;
|
|
21
|
-
keepaliveTimer;
|
|
22
21
|
rehomingIntervalMin;
|
|
23
22
|
rehomingIntervalMax;
|
|
24
23
|
mutex;
|
|
@@ -33,6 +32,7 @@ export class Registration {
|
|
|
33
32
|
jwe;
|
|
34
33
|
isCCFlow = false;
|
|
35
34
|
failoverImmediately = false;
|
|
35
|
+
webWorker;
|
|
36
36
|
constructor(webex, serviceData, mutex, lineEmitter, logLevel, jwe) {
|
|
37
37
|
this.jwe = jwe;
|
|
38
38
|
this.sdkConnector = SDKConnector;
|
|
@@ -67,17 +67,6 @@ export class Registration {
|
|
|
67
67
|
this.primaryMobiusUris = primaryMobiusUris;
|
|
68
68
|
this.backupMobiusUris = backupMobiusUris;
|
|
69
69
|
}
|
|
70
|
-
async postKeepAlive(url) {
|
|
71
|
-
return this.webex.request({
|
|
72
|
-
uri: `${url}/status`,
|
|
73
|
-
method: HTTP_METHODS.POST,
|
|
74
|
-
headers: {
|
|
75
|
-
[CISCO_DEVICE_URL]: this.webex.internal.device.url,
|
|
76
|
-
[SPARK_USER_AGENT]: CALLING_USER_AGENT,
|
|
77
|
-
},
|
|
78
|
-
service: ALLOWED_SERVICES.MOBIUS,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
70
|
async deleteRegistration(url, deviceId, deviceUrl) {
|
|
82
71
|
let response;
|
|
83
72
|
try {
|
|
@@ -418,57 +407,64 @@ export class Registration {
|
|
|
418
407
|
}
|
|
419
408
|
return abort;
|
|
420
409
|
}
|
|
421
|
-
startKeepaliveTimer(url, interval) {
|
|
422
|
-
let keepAliveRetryCount = 0;
|
|
410
|
+
async startKeepaliveTimer(url, interval) {
|
|
423
411
|
this.clearKeepaliveTimer();
|
|
424
412
|
const RETRY_COUNT_THRESHOLD = this.isCCFlow ? 4 : 5;
|
|
425
|
-
this.
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
413
|
+
await this.mutex.runExclusive(async () => {
|
|
414
|
+
if (this.isDeviceRegistered()) {
|
|
415
|
+
const accessToken = await this.webex.credentials.getUserToken();
|
|
416
|
+
if (!this.webWorker) {
|
|
417
|
+
this.webWorker = new Worker(new URL('./webWorker.js', import.meta.url));
|
|
418
|
+
this.webWorker.postMessage({
|
|
419
|
+
type: WorkerMessageType.START_KEEPALIVE,
|
|
420
|
+
accessToken: String(accessToken),
|
|
421
|
+
deviceUrl: String(this.webex.internal.device.url),
|
|
422
|
+
interval,
|
|
423
|
+
retryCountThreshold: RETRY_COUNT_THRESHOLD,
|
|
424
|
+
url,
|
|
425
|
+
});
|
|
426
|
+
this.webWorker.onmessage = async (event) => {
|
|
427
|
+
const logContext = {
|
|
428
|
+
file: REGISTRATION_FILE,
|
|
429
|
+
method: this.startKeepaliveTimer.name,
|
|
430
|
+
};
|
|
431
|
+
if (event.data.type === WorkerMessageType.KEEPALIVE_SUCCESS) {
|
|
432
|
+
log.info(`Sent Keepalive, status: ${event.data.statusCode}`, logContext);
|
|
436
433
|
this.lineEmitter(LINE_EVENTS.RECONNECTED);
|
|
437
434
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
435
|
+
if (event.data.type === WorkerMessageType.KEEPALIVE_FAILURE) {
|
|
436
|
+
const error = event.data.err;
|
|
437
|
+
log.warn(`Keep-alive missed ${event.data.keepAliveRetryCount} times. Status -> ${error.statusCode} `, logContext);
|
|
438
|
+
const abort = await handleRegistrationErrors(error, (clientError, finalError) => {
|
|
439
|
+
if (finalError) {
|
|
440
|
+
this.lineEmitter(LINE_EVENTS.ERROR, undefined, clientError);
|
|
441
|
+
}
|
|
442
|
+
this.metricManager.submitRegistrationMetric(METRIC_EVENT.REGISTRATION, REG_ACTION.KEEPALIVE_FAILURE, METRIC_TYPE.BEHAVIORAL, clientError);
|
|
443
|
+
}, { method: this.startKeepaliveTimer.name, file: REGISTRATION_FILE });
|
|
444
|
+
if (abort || event.data.keepAliveRetryCount >= RETRY_COUNT_THRESHOLD) {
|
|
445
|
+
this.failoverImmediately = this.isCCFlow;
|
|
446
|
+
this.setStatus(RegistrationStatus.INACTIVE);
|
|
447
|
+
this.clearKeepaliveTimer();
|
|
448
|
+
this.clearFailbackTimer();
|
|
449
|
+
this.lineEmitter(LINE_EVENTS.UNREGISTERED);
|
|
450
|
+
if (!abort) {
|
|
451
|
+
await this.reconnectOnFailure(this.startKeepaliveTimer.name);
|
|
452
|
+
}
|
|
447
453
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
if (abort || keepAliveRetryCount >= RETRY_COUNT_THRESHOLD) {
|
|
451
|
-
this.failoverImmediately = this.isCCFlow;
|
|
452
|
-
this.setStatus(RegistrationStatus.INACTIVE);
|
|
453
|
-
this.clearKeepaliveTimer();
|
|
454
|
-
this.clearFailbackTimer();
|
|
455
|
-
this.lineEmitter(LINE_EVENTS.UNREGISTERED);
|
|
456
|
-
if (!abort) {
|
|
457
|
-
await this.reconnectOnFailure(this.startKeepaliveTimer.name);
|
|
454
|
+
else {
|
|
455
|
+
this.lineEmitter(LINE_EVENTS.RECONNECTING);
|
|
458
456
|
}
|
|
459
457
|
}
|
|
460
|
-
|
|
461
|
-
this.lineEmitter(LINE_EVENTS.RECONNECTING);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
458
|
+
};
|
|
464
459
|
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
460
|
+
}
|
|
461
|
+
});
|
|
467
462
|
}
|
|
468
463
|
clearKeepaliveTimer() {
|
|
469
|
-
if (this.
|
|
470
|
-
|
|
471
|
-
this.
|
|
464
|
+
if (this.webWorker) {
|
|
465
|
+
this.webWorker.postMessage({ type: WorkerMessageType.CLEAR_KEEPALIVE });
|
|
466
|
+
this.webWorker.terminate();
|
|
467
|
+
this.webWorker = undefined;
|
|
472
468
|
}
|
|
473
469
|
}
|
|
474
470
|
isReconnectPending() {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { v4 as uuid } from 'uuid';
|
|
2
|
+
import { HTTP_METHODS, WorkerMessageType } from '../../common/types';
|
|
3
|
+
onmessage = (event) => {
|
|
4
|
+
const { type } = event.data;
|
|
5
|
+
let keepaliveTimer;
|
|
6
|
+
const postKeepAlive = async (accessToken, deviceUrl, url) => {
|
|
7
|
+
const response = await fetch(`${url}/status`, {
|
|
8
|
+
method: HTTP_METHODS.POST,
|
|
9
|
+
headers: {
|
|
10
|
+
'cisco-device-url': deviceUrl,
|
|
11
|
+
'spark-user-agent': 'webex-calling/beta',
|
|
12
|
+
Authorization: `${accessToken}`,
|
|
13
|
+
trackingId: `web_worker_${uuid()}`,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
if (!response.ok) {
|
|
17
|
+
throw new Error(`Keepalive failed with status: ${response.status}`);
|
|
18
|
+
}
|
|
19
|
+
return response;
|
|
20
|
+
};
|
|
21
|
+
if (type === WorkerMessageType.START_KEEPALIVE) {
|
|
22
|
+
let keepAliveRetryCount = 0;
|
|
23
|
+
const { accessToken, deviceUrl, interval, retryCountThreshold, url } = event.data;
|
|
24
|
+
if (keepaliveTimer) {
|
|
25
|
+
clearInterval(keepaliveTimer);
|
|
26
|
+
keepaliveTimer = undefined;
|
|
27
|
+
}
|
|
28
|
+
keepaliveTimer = setInterval(async () => {
|
|
29
|
+
if (keepAliveRetryCount < retryCountThreshold) {
|
|
30
|
+
try {
|
|
31
|
+
const res = await postKeepAlive(accessToken, deviceUrl, url);
|
|
32
|
+
const statusCode = res.status;
|
|
33
|
+
if (keepAliveRetryCount > 0) {
|
|
34
|
+
postMessage({ type: WorkerMessageType.KEEPALIVE_SUCCESS, statusCode });
|
|
35
|
+
}
|
|
36
|
+
keepAliveRetryCount = 0;
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
keepAliveRetryCount += 1;
|
|
40
|
+
postMessage({ type: WorkerMessageType.KEEPALIVE_FAILURE, err });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, interval * 1000);
|
|
44
|
+
}
|
|
45
|
+
if (type === WorkerMessageType.CLEAR_KEEPALIVE) {
|
|
46
|
+
if (keepaliveTimer) {
|
|
47
|
+
clearInterval(keepaliveTimer);
|
|
48
|
+
keepaliveTimer = undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
@@ -213,11 +213,22 @@ export class ContactsClient {
|
|
|
213
213
|
}));
|
|
214
214
|
if (Object.keys(cloudContactsMap).length) {
|
|
215
215
|
const contactIdList = Object.keys(cloudContactsMap);
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
const totalContacts = contactIdList.length;
|
|
217
|
+
const MAX_CONTACTS_PER_QUERY = 50;
|
|
218
|
+
for (let i = 0; i < totalContacts; i += MAX_CONTACTS_PER_QUERY) {
|
|
219
|
+
try {
|
|
220
|
+
const contactIdListChunk = contactIdList.slice(i, i + MAX_CONTACTS_PER_QUERY);
|
|
221
|
+
const query = contactIdListChunk.map((item) => `${SCIM_ID_FILTER} "${item}"`).join(OR);
|
|
222
|
+
const result = await scimQuery(query);
|
|
223
|
+
const slicedCloudContactsMap = Object.fromEntries(Object.entries(cloudContactsMap).slice(i, i + MAX_CONTACTS_PER_QUERY));
|
|
224
|
+
const resolvedContacts = this.resolveCloudContacts(slicedCloudContactsMap, result.body);
|
|
225
|
+
if (resolvedContacts) {
|
|
226
|
+
resolvedContacts.forEach((item) => contactList.push(item));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
log.warn(`Error processing contact chunk ${i}-${i + MAX_CONTACTS_PER_QUERY}`, loggerContext);
|
|
231
|
+
}
|
|
221
232
|
}
|
|
222
233
|
}
|
|
223
234
|
await Promise.all(groups.map(async (group, idx) => {
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { REPO_NAME } from '../CallingClient/constants';
|
|
2
2
|
import { LOGGING_LEVEL, LOGGER, LOG_PREFIX } from './types';
|
|
3
3
|
let currentLogLevel = LOGGING_LEVEL.error;
|
|
4
|
-
|
|
4
|
+
let webexLogger = console;
|
|
5
|
+
const writeToLogger = (message, level) => {
|
|
5
6
|
switch (level) {
|
|
6
7
|
case LOGGER.INFO:
|
|
8
|
+
webexLogger.info(message);
|
|
9
|
+
break;
|
|
7
10
|
case LOGGER.LOG: {
|
|
8
|
-
|
|
11
|
+
webexLogger.log(message);
|
|
9
12
|
break;
|
|
10
13
|
}
|
|
11
14
|
case LOGGER.WARN: {
|
|
12
|
-
|
|
15
|
+
webexLogger.warn(message);
|
|
13
16
|
break;
|
|
14
17
|
}
|
|
15
18
|
case LOGGER.ERROR: {
|
|
16
|
-
|
|
19
|
+
webexLogger.error(message);
|
|
17
20
|
break;
|
|
18
21
|
}
|
|
19
22
|
case LOGGER.TRACE: {
|
|
20
|
-
|
|
23
|
+
webexLogger.trace(message);
|
|
21
24
|
break;
|
|
22
25
|
}
|
|
23
26
|
default: {
|
|
@@ -51,7 +54,7 @@ const setLogger = (level, module) => {
|
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
const message = `Logger initialized for module: ${module} with level: ${currentLogLevel}`;
|
|
54
|
-
|
|
57
|
+
writeToLogger(`${format({ file: 'logger.ts', method: 'setLogger' }, '')} - ${LOG_PREFIX.MESSAGE}:${message}`, LOGGER.INFO);
|
|
55
58
|
};
|
|
56
59
|
const getLogLevel = () => {
|
|
57
60
|
let level;
|
|
@@ -80,27 +83,32 @@ const getLogLevel = () => {
|
|
|
80
83
|
};
|
|
81
84
|
const logMessage = (message, context) => {
|
|
82
85
|
if (currentLogLevel >= LOGGING_LEVEL.log) {
|
|
83
|
-
|
|
86
|
+
writeToLogger(`${format(context, '[LOG]')} - ${LOG_PREFIX.MESSAGE}:${message}`, LOGGER.LOG);
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
89
|
const logInfo = (message, context) => {
|
|
87
90
|
if (currentLogLevel >= LOGGING_LEVEL.info) {
|
|
88
|
-
|
|
91
|
+
writeToLogger(`${format(context, '[INFO]')} - ${LOG_PREFIX.MESSAGE}:${message}`, LOGGER.INFO);
|
|
89
92
|
}
|
|
90
93
|
};
|
|
91
94
|
const logWarn = (message, context) => {
|
|
92
95
|
if (currentLogLevel >= LOGGING_LEVEL.warn) {
|
|
93
|
-
|
|
96
|
+
writeToLogger(`${format(context, '[WARN]')} - ${LOG_PREFIX.MESSAGE}:${message}`, LOGGER.WARN);
|
|
94
97
|
}
|
|
95
98
|
};
|
|
96
99
|
const logTrace = (message, context) => {
|
|
97
100
|
if (currentLogLevel >= LOGGING_LEVEL.trace) {
|
|
98
|
-
|
|
101
|
+
writeToLogger(`${format(context, '[TRACE]')} - ${LOG_PREFIX.MESSAGE}:${message}`, LOGGER.TRACE);
|
|
99
102
|
}
|
|
100
103
|
};
|
|
101
104
|
const logError = (error, context) => {
|
|
102
105
|
if (currentLogLevel >= LOGGING_LEVEL.error) {
|
|
103
|
-
|
|
106
|
+
writeToLogger(`${format(context, '[ERROR]')} - !${LOG_PREFIX.ERROR}!${LOG_PREFIX.MESSAGE}:${error.message}`, LOGGER.ERROR);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const setWebexLogger = (logger) => {
|
|
110
|
+
if (logger) {
|
|
111
|
+
webexLogger = logger;
|
|
104
112
|
}
|
|
105
113
|
};
|
|
106
114
|
export default {
|
|
@@ -111,4 +119,5 @@ export default {
|
|
|
111
119
|
trace: logTrace,
|
|
112
120
|
setLogger,
|
|
113
121
|
getLogLevel,
|
|
122
|
+
setWebexLogger,
|
|
114
123
|
};
|
|
@@ -803,3 +803,51 @@ export function validateServiceData(serviceData) {
|
|
|
803
803
|
throw new Error('Invalid service domain.');
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
+
export function modifySdpForIPv4(sdp) {
|
|
807
|
+
try {
|
|
808
|
+
sdp = sdp.replace(/\r\n|\r/g, '\n');
|
|
809
|
+
sdp = sdp.replace(/^[ \t]+/gm, '');
|
|
810
|
+
const ipv6CLineMatches = sdp.match(/c=IN IP6 [\da-f:.]+/gi) || [];
|
|
811
|
+
const hasIPv6CLine = ipv6CLineMatches.length > 0;
|
|
812
|
+
if (hasIPv6CLine) {
|
|
813
|
+
log.info('Modifying SDP for IPv4 compatibility', {
|
|
814
|
+
file: UTILS_FILE,
|
|
815
|
+
method: modifySdpForIPv4.name,
|
|
816
|
+
});
|
|
817
|
+
const ipv4CandidateMatch = sdp.match(/a=candidate:\d+ \d+ \w+ \d+ ([\d.]+) \d+ typ \w+/);
|
|
818
|
+
const ipv4Address = ipv4CandidateMatch?.[1] || '192.1.1.1';
|
|
819
|
+
sdp = sdp.replace(/c=IN IP6 [\da-f:.]+/gi, `c=IN IP4 ${ipv4Address}`);
|
|
820
|
+
if (!ipv4CandidateMatch) {
|
|
821
|
+
let ipv4CandidateAdded = false;
|
|
822
|
+
sdp = sdp.replace(/(a=candidate:(\d+) (\d+) (\w+) (\d+) ([\da-f:.]+) (\d+) typ (\w+)[^\n]*)/g, (match, full, foundation, componentId, transport, priority, connectionAddress, port, candidateType) => {
|
|
823
|
+
if (!ipv4CandidateAdded && connectionAddress.includes(':')) {
|
|
824
|
+
ipv4CandidateAdded = true;
|
|
825
|
+
const newFoundation = (parseInt(foundation, 10) + 1).toString();
|
|
826
|
+
return (`${full}\n` +
|
|
827
|
+
`a=candidate:${newFoundation} ${componentId} ${transport} ${priority} ${ipv4Address} ${port} typ ${candidateType} generation 0 network-id 1 network-cost 10`);
|
|
828
|
+
}
|
|
829
|
+
return match;
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return sdp;
|
|
834
|
+
}
|
|
835
|
+
catch (error) {
|
|
836
|
+
log.warn(`Error modifying SDP for IPv4 compatibility: ${error}`, {
|
|
837
|
+
file: UTILS_FILE,
|
|
838
|
+
method: modifySdpForIPv4.name,
|
|
839
|
+
});
|
|
840
|
+
return sdp;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
export async function uploadLogs(webex, data = {}) {
|
|
844
|
+
try {
|
|
845
|
+
await webex.internal.support.submitLogs(data);
|
|
846
|
+
}
|
|
847
|
+
catch (error) {
|
|
848
|
+
log.error(error, {
|
|
849
|
+
file: UTILS_FILE,
|
|
850
|
+
method: 'uploadLogs',
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
}
|
|
@@ -58,3 +58,10 @@ export var DecodeType;
|
|
|
58
58
|
DecodeType["PEOPLE"] = "PEOPLE";
|
|
59
59
|
DecodeType["ORGANIZATION"] = "ORGANIZATION";
|
|
60
60
|
})(DecodeType || (DecodeType = {}));
|
|
61
|
+
export var WorkerMessageType;
|
|
62
|
+
(function (WorkerMessageType) {
|
|
63
|
+
WorkerMessageType["START_KEEPALIVE"] = "START_KEEPALIVE";
|
|
64
|
+
WorkerMessageType["CLEAR_KEEPALIVE"] = "CLEAR_KEEPALIVE";
|
|
65
|
+
WorkerMessageType["KEEPALIVE_SUCCESS"] = "KEEPALIVE_SUCCESS";
|
|
66
|
+
WorkerMessageType["KEEPALIVE_FAILURE"] = "KEEPALIVE_FAILURE";
|
|
67
|
+
})(WorkerMessageType || (WorkerMessageType = {}));
|
|
@@ -33,6 +33,9 @@ export declare class CallingClient extends Eventing<CallingClientEventTypes> imp
|
|
|
33
33
|
getLines(): Record<string, ILine>;
|
|
34
34
|
getActiveCalls(): Record<string, ICall[]>;
|
|
35
35
|
getConnectedCall(): ICall | undefined;
|
|
36
|
+
uploadLogs(data?: {
|
|
37
|
+
feedbackId?: string;
|
|
38
|
+
}): Promise<void>;
|
|
36
39
|
}
|
|
37
40
|
export declare const createClient: (webex: WebexSDK, config?: CallingClientConfig) => Promise<ICallingClient>;
|
|
38
41
|
//# sourceMappingURL=CallingClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallingClient.d.ts","sourceRoot":"","sources":["../../../src/CallingClient/CallingClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"CallingClient.d.ts","sourceRoot":"","sources":["../../../src/CallingClient/CallingClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AASpD,OAAO,EAAC,MAAM,EAAa,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAmB,aAAa,EAAe,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,uBAAuB,EAKxB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAAC,cAAc,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAC,KAAK,EAAe,MAAM,iBAAiB,CAAC;AAqBpD,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAenC,qBAAa,aAAc,SAAQ,QAAQ,CAAC,uBAAuB,CAAE,YAAW,cAAc;IAC5F,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,KAAK,CAAQ;IAErB,OAAO,CAAC,WAAW,CAAe;IAElC,OAAO,CAAC,aAAa,CAAiB;IAEtC,OAAO,CAAC,SAAS,CAAC,CAAsB;IAExC,OAAO,CAAC,iBAAiB,CAAW;IAEpC,OAAO,CAAC,gBAAgB,CAAW;IAEnC,OAAO,CAAC,cAAc,CAAgB;IAEtC,OAAO,CAAC,UAAU,CAAS;IAEpB,WAAW,EAAE,OAAO,KAAK,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAA6B;gBAKjC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,mBAAmB;IA+D5C,IAAI;YAWH,mBAAmB;YAoCnB,mBAAmB;YA8DnB,gBAAgB;IAyG9B,OAAO,CAAC,4BAA4B;IAiBpC,OAAO,CAAC,mBAAmB,CAgBzB;IAMK,eAAe,IAAI,MAAM;IAQzB,eAAe,IAAI,aAAa;IAIvC,OAAO,CAAC,wBAAwB;YA4BlB,UAAU;IAmBjB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAOjC,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IAiBzC,gBAAgB,IAAI,KAAK,GAAG,SAAS;IAiB/B,UAAU,CAAC,IAAI,GAAE;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAM;CAQzD;AAOD,eAAO,MAAM,YAAY,UAChB,QAAQ,WACN,mBAAmB,KAC3B,QAAQ,cAAc,CAKxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../../src/CallingClient/calling/call.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAGtB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../../src/CallingClient/calling/call.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAGtB,MAAM,4BAA4B,CAAC;AAcpC,OAA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GAAG,IAAI;IAOrE,4BAA4B,IAAI,MAAM,GAAG,SAAS;IASlD,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC;YAS1B,aAAa;CAc5B;AAaD,eAAO,MAAM,UAAU,cACV,MAAM,SACV,QAAQ,OACV,aAAa,YACR,MAAM,UACR,MAAM,YACJ,oBAAoB,aACnB,gBAAgB,SACpB,WAAW,KACjB,KAAqF,CAAC"}
|
|
@@ -13,7 +13,6 @@ export declare class Registration implements IRegistration {
|
|
|
13
13
|
private registrationStatus;
|
|
14
14
|
private failbackTimer?;
|
|
15
15
|
private activeMobiusUrl;
|
|
16
|
-
private keepaliveTimer;
|
|
17
16
|
private rehomingIntervalMin;
|
|
18
17
|
private rehomingIntervalMax;
|
|
19
18
|
private mutex;
|
|
@@ -28,11 +27,11 @@ export declare class Registration implements IRegistration {
|
|
|
28
27
|
private jwe?;
|
|
29
28
|
private isCCFlow;
|
|
30
29
|
private failoverImmediately;
|
|
30
|
+
private webWorker;
|
|
31
31
|
constructor(webex: WebexSDK, serviceData: ServiceData, mutex: Mutex, lineEmitter: LineEmitterCallback, logLevel: LOGGER, jwe?: string);
|
|
32
32
|
getActiveMobiusUrl(): string;
|
|
33
33
|
setActiveMobiusUrl(url: string): void;
|
|
34
34
|
setMobiusServers(primaryMobiusUris: string[], backupMobiusUris: string[]): void;
|
|
35
|
-
private postKeepAlive;
|
|
36
35
|
private deleteRegistration;
|
|
37
36
|
private postRegistration;
|
|
38
37
|
private restorePreviousRegistration;
|