@webex/calling 3.9.0 → 3.10.0
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/CallHistory/CallHistory.js +51 -46
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +146 -147
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +8 -8
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +12 -11
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +9 -10
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +66 -59
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +108 -109
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +457 -201
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +458 -315
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +2 -2
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +369 -333
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +411 -410
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -4
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +67 -68
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/index.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +9 -6
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +10 -11
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +10 -9
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/index.js.map +1 -1
- package/dist/CallingClient/registration/register.js +280 -201
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +251 -180
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +25 -10
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +85 -38
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +244 -238
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +89 -90
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +2 -2
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +2 -2
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +3 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +2 -2
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -2
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +221 -104
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +112 -23
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +0 -1
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/SDKConnector/utils.test.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +42 -39
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +119 -120
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +54 -47
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +12 -11
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js +2 -2
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +78 -70
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +184 -185
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +84 -65
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +111 -117
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/testUtil.js +1 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +4 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +1 -0
- package/dist/module/CallSettings/WxCallBackendConnector.js +7 -0
- package/dist/module/CallingClient/CallingClient.js +174 -32
- package/dist/module/CallingClient/calling/call.js +79 -43
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +3 -3
- package/dist/module/CallingClient/registration/register.js +34 -10
- package/dist/module/CallingClient/registration/webWorker.js +17 -3
- package/dist/module/CallingClient/registration/webWorkerStr.js +19 -3
- package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
- package/dist/module/Contacts/ContactsClient.js +23 -17
- package/dist/module/Contacts/constants.js +1 -1
- package/dist/module/Metrics/index.js +142 -55
- package/dist/module/Metrics/types.js +14 -0
- package/dist/module/Voicemail/BroadworksBackendConnector.js +3 -0
- package/dist/module/Voicemail/UcmBackendConnector.js +6 -0
- package/dist/module/Voicemail/WxCallBackendConnector.js +8 -0
- package/dist/module/common/Utils.js +27 -10
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +12 -1
- 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/calling/types.d.ts +2 -1
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +8 -4
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +1 -0
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Contacts/constants.d.ts +1 -1
- package/dist/types/Contacts/constants.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +18 -3
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +10 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v4 as uuid } from 'uuid';
|
|
2
2
|
import { HTTP_METHODS, WorkerMessageType } from '../../common/types';
|
|
3
3
|
let keepaliveTimer;
|
|
4
|
-
|
|
4
|
+
const messageHandler = (event) => {
|
|
5
5
|
const { type } = event.data;
|
|
6
6
|
const postKeepAlive = async (accessToken, deviceUrl, url) => {
|
|
7
7
|
const response = await fetch(`${url}/status`, {
|
|
@@ -14,7 +14,7 @@ export const messageHandler = (event) => {
|
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
16
|
if (!response.ok) {
|
|
17
|
-
throw
|
|
17
|
+
throw response;
|
|
18
18
|
}
|
|
19
19
|
return response;
|
|
20
20
|
};
|
|
@@ -39,10 +39,23 @@ export const messageHandler = (event) => {
|
|
|
39
39
|
keepAliveRetryCount = 0;
|
|
40
40
|
}
|
|
41
41
|
catch (err) {
|
|
42
|
+
const headers = {};
|
|
43
|
+
if (err.headers.has('Retry-After')) {
|
|
44
|
+
headers['retry-after'] = err.headers.get('Retry-After');
|
|
45
|
+
}
|
|
46
|
+
if (err.headers.has('Trackingid')) {
|
|
47
|
+
headers['trackingid'] = err.headers.get('Trackingid');
|
|
48
|
+
}
|
|
49
|
+
const error = {
|
|
50
|
+
headers,
|
|
51
|
+
statusCode: err.status,
|
|
52
|
+
statusText: err.statusText,
|
|
53
|
+
type: err.type,
|
|
54
|
+
};
|
|
42
55
|
keepAliveRetryCount += 1;
|
|
43
56
|
postMessage({
|
|
44
57
|
type: WorkerMessageType.KEEPALIVE_FAILURE,
|
|
45
|
-
err,
|
|
58
|
+
err: error,
|
|
46
59
|
keepAliveRetryCount,
|
|
47
60
|
});
|
|
48
61
|
}
|
|
@@ -57,3 +70,4 @@ export const messageHandler = (event) => {
|
|
|
57
70
|
}
|
|
58
71
|
};
|
|
59
72
|
self.addEventListener('message', messageHandler);
|
|
73
|
+
export default messageHandler;
|
|
@@ -41,7 +41,7 @@ const messageHandler = (event) => {
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
if (!response.ok) {
|
|
44
|
-
throw
|
|
44
|
+
throw response;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return response;
|
|
@@ -69,10 +69,26 @@ const messageHandler = (event) => {
|
|
|
69
69
|
}
|
|
70
70
|
keepAliveRetryCount = 0;
|
|
71
71
|
} catch (err) {
|
|
72
|
-
|
|
72
|
+
let headers = {};
|
|
73
|
+
if(err.headers.has('Retry-After')) {
|
|
74
|
+
headers['retry-after'] = err.headers.get('Retry-After');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if(err.headers.has('Trackingid')) {
|
|
78
|
+
headers['trackingid'] = err.headers.get('Trackingid');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const error = {
|
|
82
|
+
headers,
|
|
83
|
+
statusCode: err.status,
|
|
84
|
+
statusText: err.statusText,
|
|
85
|
+
type: err.type,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
keepAliveRetryCount += 1
|
|
73
89
|
self.postMessage({
|
|
74
90
|
type: WorkerMessageType.KEEPALIVE_FAILURE,
|
|
75
|
-
err,
|
|
91
|
+
err: error,
|
|
76
92
|
keepAliveRetryCount,
|
|
77
93
|
});
|
|
78
94
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function waitForIceComplete(pc, timeoutMs) {
|
|
2
|
+
return new Promise((resolve) => {
|
|
3
|
+
if (!pc) {
|
|
4
|
+
resolve({ ok: false, reason: 'no-pc' });
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
if (pc.iceGatheringState === 'complete') {
|
|
8
|
+
resolve({ ok: true, reached: 'already' });
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
let done = false;
|
|
12
|
+
const onChange = () => {
|
|
13
|
+
if (pc.iceGatheringState === 'complete' && !done) {
|
|
14
|
+
done = true;
|
|
15
|
+
pc.removeEventListener('icegatheringstatechange', onChange);
|
|
16
|
+
resolve({ ok: true, reached: 'event' });
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
pc.addEventListener('icegatheringstatechange', onChange);
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
if (done)
|
|
22
|
+
return;
|
|
23
|
+
done = true;
|
|
24
|
+
pc.removeEventListener('icegatheringstatechange', onChange);
|
|
25
|
+
resolve({ ok: pc.iceGatheringState === 'complete', reached: 'timeout' });
|
|
26
|
+
}, timeoutMs);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export default async function windowsChromiumIceWarmup({ iceServers = [], timeoutMs = 1000 }) {
|
|
30
|
+
const pc1 = new RTCPeerConnection({ iceServers, iceCandidatePoolSize: 1 });
|
|
31
|
+
const pc2 = new RTCPeerConnection({ iceServers, iceCandidatePoolSize: 1 });
|
|
32
|
+
const candidates = { pc1: [], pc2: [] };
|
|
33
|
+
pc1.onicecandidate = (e) => {
|
|
34
|
+
if (e.candidate && e.candidate.type !== 'host') {
|
|
35
|
+
candidates.pc1.push(e.candidate);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
await pc1.createDataChannel('warmup');
|
|
39
|
+
await pc1.addTransceiver('audio');
|
|
40
|
+
const offer = await pc1.createOffer();
|
|
41
|
+
await pc1.setLocalDescription(offer);
|
|
42
|
+
await waitForIceComplete(pc1, timeoutMs);
|
|
43
|
+
await pc2.setRemoteDescription(offer);
|
|
44
|
+
pc2.onicecandidate = (e) => {
|
|
45
|
+
if (e.candidate && e.candidate.type !== 'host') {
|
|
46
|
+
candidates.pc2.push(e.candidate);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const answer = await pc2.createAnswer();
|
|
50
|
+
await pc2.setLocalDescription(answer);
|
|
51
|
+
await pc1.setRemoteDescription(answer);
|
|
52
|
+
await waitForIceComplete(pc2, timeoutMs);
|
|
53
|
+
await Promise.all([
|
|
54
|
+
...candidates.pc1.map((candidate) => pc2.addIceCandidate(candidate).catch(console.error)),
|
|
55
|
+
...candidates.pc2.map((candidate) => pc1.addIceCandidate(candidate).catch(console.error)),
|
|
56
|
+
]);
|
|
57
|
+
pc1.close();
|
|
58
|
+
pc2.close();
|
|
59
|
+
}
|
|
@@ -2,7 +2,7 @@ import { FAILURE_MESSAGE, METHOD_START_MESSAGE, SCIM_ENTERPRISE_USER, SCIM_WEBEX
|
|
|
2
2
|
import { HTTP_METHODS } from '../common/types';
|
|
3
3
|
import SDKConnector from '../SDKConnector';
|
|
4
4
|
import log from '../Logger';
|
|
5
|
-
import {
|
|
5
|
+
import { CONTACTS_CLIENT, CONTACTS_SCHEMA, CONTACT_FILTER, DEFAULT_GROUP_NAME, ENCRYPT_FILTER, GROUP_FILTER, METHODS, OR, SCIM_ID_FILTER, USERS, encryptedFields, } from './constants';
|
|
6
6
|
import { ContactType, GroupType, } from './types';
|
|
7
7
|
import { scimQuery, serviceErrorCodeHandler, uploadLogs } from '../common/Utils';
|
|
8
8
|
export class ContactsClient {
|
|
@@ -22,7 +22,7 @@ export class ContactsClient {
|
|
|
22
22
|
this.groups = undefined;
|
|
23
23
|
this.contacts = undefined;
|
|
24
24
|
this.defaultGroupId = '';
|
|
25
|
-
log.setLogger(logger.level,
|
|
25
|
+
log.setLogger(logger.level, CONTACTS_CLIENT);
|
|
26
26
|
}
|
|
27
27
|
async decryptContactDetail(encryptionKeyUrl, contactDetails) {
|
|
28
28
|
const decryptedContactDetail = [...contactDetails];
|
|
@@ -130,7 +130,7 @@ export class ContactsClient {
|
|
|
130
130
|
}
|
|
131
131
|
resolveCloudContacts(contactsDataMap, inputList) {
|
|
132
132
|
const loggerContext = {
|
|
133
|
-
file:
|
|
133
|
+
file: CONTACTS_CLIENT,
|
|
134
134
|
method: 'resolveCloudContacts',
|
|
135
135
|
};
|
|
136
136
|
const finalContactList = [];
|
|
@@ -187,7 +187,7 @@ export class ContactsClient {
|
|
|
187
187
|
}
|
|
188
188
|
async getContacts() {
|
|
189
189
|
const loggerContext = {
|
|
190
|
-
file:
|
|
190
|
+
file: CONTACTS_CLIENT,
|
|
191
191
|
method: METHODS.GET_CONTACTS,
|
|
192
192
|
};
|
|
193
193
|
log.info(METHOD_START_MESSAGE, loggerContext);
|
|
@@ -198,6 +198,7 @@ export class ContactsClient {
|
|
|
198
198
|
uri: `${this.webex.internal.services._serviceUrls.contactsService}/${ENCRYPT_FILTER}/${USERS}/${CONTACT_FILTER}`,
|
|
199
199
|
method: HTTP_METHODS.GET,
|
|
200
200
|
});
|
|
201
|
+
log.log(`Response code: ${response.statusCode} and Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
201
202
|
const responseBody = response.body;
|
|
202
203
|
if (!responseBody) {
|
|
203
204
|
throw new Error(`${response}`);
|
|
@@ -259,7 +260,7 @@ export class ContactsClient {
|
|
|
259
260
|
}
|
|
260
261
|
async createNewEncryptionKeyUrl() {
|
|
261
262
|
const loggerContext = {
|
|
262
|
-
file:
|
|
263
|
+
file: CONTACTS_CLIENT,
|
|
263
264
|
method: METHODS.CREATE_NEW_ENCRYPTION_KEY_URL,
|
|
264
265
|
};
|
|
265
266
|
log.info(METHOD_START_MESSAGE, loggerContext);
|
|
@@ -272,7 +273,7 @@ export class ContactsClient {
|
|
|
272
273
|
}
|
|
273
274
|
async fetchEncryptionKeyUrl() {
|
|
274
275
|
const loggerContext = {
|
|
275
|
-
file:
|
|
276
|
+
file: CONTACTS_CLIENT,
|
|
276
277
|
method: METHODS.FETCH_ENCRYPTION_KEY_URL,
|
|
277
278
|
};
|
|
278
279
|
log.info(METHOD_START_MESSAGE, loggerContext);
|
|
@@ -287,14 +288,14 @@ export class ContactsClient {
|
|
|
287
288
|
}
|
|
288
289
|
this.encryptionKeyUrl = await this.createNewEncryptionKeyUrl();
|
|
289
290
|
log.log(`Creating a default group: ${DEFAULT_GROUP_NAME}`, {
|
|
290
|
-
file:
|
|
291
|
+
file: CONTACTS_CLIENT,
|
|
291
292
|
method: this.fetchEncryptionKeyUrl.name,
|
|
292
293
|
});
|
|
293
294
|
const response = await this.createContactGroup(DEFAULT_GROUP_NAME, this.encryptionKeyUrl);
|
|
294
295
|
if (response.data.group?.groupId) {
|
|
295
296
|
this.defaultGroupId = response.data.group?.groupId;
|
|
296
297
|
log.log(`Successfully created default group with ID: ${this.defaultGroupId}`, {
|
|
297
|
-
file:
|
|
298
|
+
file: CONTACTS_CLIENT,
|
|
298
299
|
method: this.fetchEncryptionKeyUrl.name,
|
|
299
300
|
});
|
|
300
301
|
}
|
|
@@ -302,13 +303,13 @@ export class ContactsClient {
|
|
|
302
303
|
}
|
|
303
304
|
async fetchDefaultGroup() {
|
|
304
305
|
const loggerContext = {
|
|
305
|
-
file:
|
|
306
|
+
file: CONTACTS_CLIENT,
|
|
306
307
|
method: METHODS.FETCH_DEFAULT_GROUP,
|
|
307
308
|
};
|
|
308
309
|
log.info(METHOD_START_MESSAGE, loggerContext);
|
|
309
310
|
if (this.defaultGroupId) {
|
|
310
311
|
log.log(`Using existing default group with ID: ${this.defaultGroupId}`, {
|
|
311
|
-
file:
|
|
312
|
+
file: CONTACTS_CLIENT,
|
|
312
313
|
method: this.fetchDefaultGroup.name,
|
|
313
314
|
});
|
|
314
315
|
return this.defaultGroupId;
|
|
@@ -318,7 +319,7 @@ export class ContactsClient {
|
|
|
318
319
|
if (this.groups[i].displayName === DEFAULT_GROUP_NAME) {
|
|
319
320
|
this.defaultGroupId = this.groups[i].groupId;
|
|
320
321
|
log.log(`Found default group with ID: ${this.defaultGroupId}`, {
|
|
321
|
-
file:
|
|
322
|
+
file: CONTACTS_CLIENT,
|
|
322
323
|
method: this.fetchDefaultGroup.name,
|
|
323
324
|
});
|
|
324
325
|
return this.defaultGroupId;
|
|
@@ -326,7 +327,7 @@ export class ContactsClient {
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
log.log('No default group found.', {
|
|
329
|
-
file:
|
|
330
|
+
file: CONTACTS_CLIENT,
|
|
330
331
|
method: this.fetchDefaultGroup.name,
|
|
331
332
|
});
|
|
332
333
|
const response = await this.createContactGroup(DEFAULT_GROUP_NAME);
|
|
@@ -334,7 +335,7 @@ export class ContactsClient {
|
|
|
334
335
|
if (group) {
|
|
335
336
|
const groupId = group.groupId;
|
|
336
337
|
log.log(`Successfully created new default group with ID: ${groupId}`, {
|
|
337
|
-
file:
|
|
338
|
+
file: CONTACTS_CLIENT,
|
|
338
339
|
method: this.fetchDefaultGroup.name,
|
|
339
340
|
});
|
|
340
341
|
return groupId;
|
|
@@ -343,7 +344,7 @@ export class ContactsClient {
|
|
|
343
344
|
}
|
|
344
345
|
async createContactGroup(displayName, encryptionKeyUrl, groupType) {
|
|
345
346
|
const loggerContext = {
|
|
346
|
-
file:
|
|
347
|
+
file: CONTACTS_CLIENT,
|
|
347
348
|
method: METHODS.CREATE_CONTACT_GROUP,
|
|
348
349
|
};
|
|
349
350
|
log.info(`${METHOD_START_MESSAGE} with displayName: ${displayName}`, loggerContext);
|
|
@@ -377,6 +378,8 @@ export class ContactsClient {
|
|
|
377
378
|
method: HTTP_METHODS.POST,
|
|
378
379
|
body: groupInfo,
|
|
379
380
|
});
|
|
381
|
+
log.log(`Response code: ${response.statusCode}`, loggerContext);
|
|
382
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
380
383
|
const group = response.body;
|
|
381
384
|
group.displayName = displayName;
|
|
382
385
|
const contactResponse = {
|
|
@@ -401,7 +404,7 @@ export class ContactsClient {
|
|
|
401
404
|
}
|
|
402
405
|
async deleteContactGroup(groupId) {
|
|
403
406
|
const loggerContext = {
|
|
404
|
-
file:
|
|
407
|
+
file: CONTACTS_CLIENT,
|
|
405
408
|
method: METHODS.DELETE_CONTACT_GROUP,
|
|
406
409
|
};
|
|
407
410
|
log.info(`${METHOD_START_MESSAGE} with groupId: ${groupId}`, loggerContext);
|
|
@@ -411,6 +414,7 @@ export class ContactsClient {
|
|
|
411
414
|
uri: `${this.webex.internal.services._serviceUrls.contactsService}/${ENCRYPT_FILTER}/${USERS}/${GROUP_FILTER}/${groupId}`,
|
|
412
415
|
method: HTTP_METHODS.DELETE,
|
|
413
416
|
});
|
|
417
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
414
418
|
const contactResponse = {
|
|
415
419
|
statusCode: Number(response[STATUS_CODE]),
|
|
416
420
|
data: {},
|
|
@@ -437,7 +441,7 @@ export class ContactsClient {
|
|
|
437
441
|
}
|
|
438
442
|
async createContact(contactInfo) {
|
|
439
443
|
const loggerContext = {
|
|
440
|
-
file:
|
|
444
|
+
file: CONTACTS_CLIENT,
|
|
441
445
|
method: METHODS.CREATE_CONTACT,
|
|
442
446
|
};
|
|
443
447
|
log.info(`${METHOD_START_MESSAGE} with contactType: ${contactInfo.contactType}`, loggerContext);
|
|
@@ -487,6 +491,8 @@ export class ContactsClient {
|
|
|
487
491
|
method: HTTP_METHODS.POST,
|
|
488
492
|
body: requestBody,
|
|
489
493
|
});
|
|
494
|
+
log.log(`Response code: ${response.statusCode}`, loggerContext);
|
|
495
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
490
496
|
const newContact = response.body;
|
|
491
497
|
contact.contactId = newContact.contactId;
|
|
492
498
|
const contactResponse = {
|
|
@@ -521,7 +527,7 @@ export class ContactsClient {
|
|
|
521
527
|
}
|
|
522
528
|
async deleteContact(contactId) {
|
|
523
529
|
const loggerContext = {
|
|
524
|
-
file:
|
|
530
|
+
file: CONTACTS_CLIENT,
|
|
525
531
|
method: METHODS.DELETE_CONTACT,
|
|
526
532
|
};
|
|
527
533
|
log.info(`${METHOD_START_MESSAGE} with contactId: ${contactId}`, loggerContext);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { METRIC_FILE, VERSION } from '../CallingClient/constants';
|
|
2
|
-
import {
|
|
2
|
+
import { ServiceIndicator } from '../common/types';
|
|
3
|
+
import { METRIC_EVENT, } from './types';
|
|
3
4
|
import log from '../Logger';
|
|
4
5
|
let metricManager;
|
|
5
6
|
class MetricManager {
|
|
@@ -11,48 +12,60 @@ class MetricManager {
|
|
|
11
12
|
this.webex = webex;
|
|
12
13
|
this.serviceIndicator = indicator;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
submitConnectionMetrics(name, metricAction, type, downTimestamp, upTimestamp) {
|
|
16
|
+
const metricData = {
|
|
17
|
+
tags: {
|
|
18
|
+
metricAction,
|
|
19
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
20
|
+
service_indicator: this.serviceIndicator,
|
|
21
|
+
},
|
|
22
|
+
fields: {
|
|
23
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
24
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
25
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
26
|
+
downTimestamp,
|
|
27
|
+
upTimestamp,
|
|
28
|
+
},
|
|
29
|
+
type,
|
|
30
|
+
};
|
|
31
|
+
if (metricData) {
|
|
32
|
+
this.webex.internal.metrics.submitClientMetrics(name, metricData);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
submitUploadLogsMetric(name, action, type, trackingId, feedbackId, correlationId, stack, callId, broadworksCorrelationInfo) {
|
|
15
36
|
let data;
|
|
37
|
+
const commonData = {
|
|
38
|
+
tags: {
|
|
39
|
+
action,
|
|
40
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
41
|
+
service_indicator: this.serviceIndicator,
|
|
42
|
+
},
|
|
43
|
+
fields: {
|
|
44
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
45
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
46
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
47
|
+
correlation_id: correlationId,
|
|
48
|
+
broadworksCorrelationInfo,
|
|
49
|
+
tracking_id: trackingId,
|
|
50
|
+
feedback_id: feedbackId,
|
|
51
|
+
call_id: callId,
|
|
52
|
+
},
|
|
53
|
+
type,
|
|
54
|
+
};
|
|
16
55
|
switch (name) {
|
|
17
56
|
case METRIC_EVENT.UPLOAD_LOGS_SUCCESS: {
|
|
18
|
-
data =
|
|
19
|
-
tags: {
|
|
20
|
-
action,
|
|
21
|
-
device_id: this.deviceInfo?.device?.deviceId,
|
|
22
|
-
service_indicator: this.serviceIndicator,
|
|
23
|
-
},
|
|
24
|
-
fields: {
|
|
25
|
-
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
26
|
-
mobius_url: this.deviceInfo?.device?.uri,
|
|
27
|
-
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
28
|
-
correlation_id: correlationId,
|
|
29
|
-
tracking_id: trackingId,
|
|
30
|
-
feedback_id: feedbackId,
|
|
31
|
-
call_id: callId,
|
|
32
|
-
},
|
|
33
|
-
type,
|
|
34
|
-
};
|
|
57
|
+
data = commonData;
|
|
35
58
|
break;
|
|
36
59
|
}
|
|
37
60
|
case METRIC_EVENT.UPLOAD_LOGS_FAILED: {
|
|
38
61
|
data = {
|
|
39
|
-
|
|
40
|
-
action,
|
|
41
|
-
device_id: this.deviceInfo?.device?.deviceId,
|
|
42
|
-
service_indicator: this.serviceIndicator,
|
|
43
|
-
},
|
|
62
|
+
...commonData,
|
|
44
63
|
fields: {
|
|
45
|
-
|
|
46
|
-
mobius_url: this.deviceInfo?.device?.uri,
|
|
47
|
-
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
48
|
-
correlation_id: correlationId,
|
|
49
|
-
tracking_id: trackingId,
|
|
50
|
-
feedback_id: feedbackId,
|
|
64
|
+
...commonData.fields,
|
|
51
65
|
error: stack,
|
|
52
|
-
call_id: callId,
|
|
53
66
|
},
|
|
54
|
-
type,
|
|
55
67
|
};
|
|
68
|
+
break;
|
|
56
69
|
}
|
|
57
70
|
}
|
|
58
71
|
if (data) {
|
|
@@ -62,6 +75,47 @@ class MetricManager {
|
|
|
62
75
|
setDeviceInfo(deviceInfo) {
|
|
63
76
|
this.deviceInfo = deviceInfo;
|
|
64
77
|
}
|
|
78
|
+
submitRegionInfoMetric(name, metricAction, type, mobiusHost, clientRegion, countryCode, trackingId) {
|
|
79
|
+
const data = {
|
|
80
|
+
tags: {
|
|
81
|
+
action: metricAction,
|
|
82
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
83
|
+
service_indicator: ServiceIndicator.CALLING,
|
|
84
|
+
},
|
|
85
|
+
fields: {
|
|
86
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
87
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
88
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
89
|
+
mobius_host: mobiusHost,
|
|
90
|
+
client_region: clientRegion,
|
|
91
|
+
country_code: countryCode,
|
|
92
|
+
tracking_id: trackingId,
|
|
93
|
+
},
|
|
94
|
+
type,
|
|
95
|
+
};
|
|
96
|
+
this.webex.internal.metrics.submitClientMetrics(name, data);
|
|
97
|
+
}
|
|
98
|
+
submitMobiusServersMetric(name, metricAction, type, mobiusServers, trackingId) {
|
|
99
|
+
const data = {
|
|
100
|
+
tags: {
|
|
101
|
+
action: metricAction,
|
|
102
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
103
|
+
service_indicator: ServiceIndicator.CALLING,
|
|
104
|
+
},
|
|
105
|
+
fields: {
|
|
106
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
107
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
108
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
109
|
+
primary_mobius_servers_region: mobiusServers.primary.region,
|
|
110
|
+
primary_mobius_servers_uris: mobiusServers.primary.uris.join(','),
|
|
111
|
+
backup_mobius_servers_region: mobiusServers.backup.region,
|
|
112
|
+
backup_mobius_servers_uris: mobiusServers.backup.uris.join(','),
|
|
113
|
+
tracking_id: trackingId,
|
|
114
|
+
},
|
|
115
|
+
type,
|
|
116
|
+
};
|
|
117
|
+
this.webex.internal.metrics.submitClientMetrics(name, data);
|
|
118
|
+
}
|
|
65
119
|
submitRegistrationMetric(name, metricAction, type, caller, serverType, trackingId, keepaliveCount, clientError) {
|
|
66
120
|
let data;
|
|
67
121
|
switch (name) {
|
|
@@ -85,33 +139,66 @@ class MetricManager {
|
|
|
85
139
|
break;
|
|
86
140
|
}
|
|
87
141
|
case METRIC_EVENT.REGISTRATION_ERROR: {
|
|
142
|
+
let errorData;
|
|
88
143
|
if (clientError) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
device_id: this.deviceInfo?.device?.deviceId,
|
|
93
|
-
service_indicator: this.serviceIndicator,
|
|
94
|
-
},
|
|
95
|
-
fields: {
|
|
96
|
-
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
97
|
-
mobius_url: this.deviceInfo?.device?.uri,
|
|
98
|
-
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
99
|
-
reg_source: caller,
|
|
100
|
-
server_type: serverType,
|
|
101
|
-
trackingId,
|
|
102
|
-
keepalive_count: keepaliveCount,
|
|
103
|
-
error: clientError.getError().message,
|
|
104
|
-
error_type: clientError.getError().type,
|
|
105
|
-
},
|
|
106
|
-
type,
|
|
144
|
+
errorData = {
|
|
145
|
+
msg: clientError.getError().message,
|
|
146
|
+
type: clientError.getError().type,
|
|
107
147
|
};
|
|
108
148
|
}
|
|
149
|
+
data = {
|
|
150
|
+
tags: {
|
|
151
|
+
action: metricAction,
|
|
152
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
153
|
+
service_indicator: this.serviceIndicator,
|
|
154
|
+
},
|
|
155
|
+
fields: {
|
|
156
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
157
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
158
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
159
|
+
reg_source: caller,
|
|
160
|
+
server_type: serverType,
|
|
161
|
+
trackingId,
|
|
162
|
+
error: errorData?.msg,
|
|
163
|
+
error_type: errorData?.type,
|
|
164
|
+
},
|
|
165
|
+
type,
|
|
166
|
+
};
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
case METRIC_EVENT.KEEPALIVE_ERROR: {
|
|
170
|
+
let errorData;
|
|
171
|
+
if (clientError) {
|
|
172
|
+
errorData = {
|
|
173
|
+
msg: clientError.getError().message,
|
|
174
|
+
type: clientError.getError().type,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
data = {
|
|
178
|
+
tags: {
|
|
179
|
+
action: metricAction,
|
|
180
|
+
device_id: this.deviceInfo?.device?.deviceId,
|
|
181
|
+
service_indicator: this.serviceIndicator,
|
|
182
|
+
},
|
|
183
|
+
fields: {
|
|
184
|
+
device_url: this.deviceInfo?.device?.clientDeviceUri,
|
|
185
|
+
mobius_url: this.deviceInfo?.device?.uri,
|
|
186
|
+
calling_sdk_version: process.env.CALLING_SDK_VERSION || VERSION,
|
|
187
|
+
reg_source: caller,
|
|
188
|
+
server_type: serverType,
|
|
189
|
+
trackingId,
|
|
190
|
+
keepalive_count: keepaliveCount,
|
|
191
|
+
error: errorData?.msg,
|
|
192
|
+
error_type: errorData?.type,
|
|
193
|
+
},
|
|
194
|
+
type,
|
|
195
|
+
};
|
|
109
196
|
break;
|
|
110
197
|
}
|
|
111
198
|
default:
|
|
112
199
|
log.warn('Invalid metric name received. Rejecting request to submit metric.', {
|
|
113
200
|
file: METRIC_FILE,
|
|
114
|
-
method:
|
|
201
|
+
method: 'submitRegistrationMetric',
|
|
115
202
|
});
|
|
116
203
|
break;
|
|
117
204
|
}
|
|
@@ -165,7 +252,7 @@ class MetricManager {
|
|
|
165
252
|
default:
|
|
166
253
|
log.warn('Invalid metric name received. Rejecting request to submit metric.', {
|
|
167
254
|
file: METRIC_FILE,
|
|
168
|
-
method:
|
|
255
|
+
method: 'submitCallMetric',
|
|
169
256
|
});
|
|
170
257
|
break;
|
|
171
258
|
}
|
|
@@ -223,7 +310,7 @@ class MetricManager {
|
|
|
223
310
|
default:
|
|
224
311
|
log.warn('Invalid metric name received. Rejecting request to submit metric.', {
|
|
225
312
|
file: METRIC_FILE,
|
|
226
|
-
method:
|
|
313
|
+
method: 'submitMediaMetric',
|
|
227
314
|
});
|
|
228
315
|
break;
|
|
229
316
|
}
|
|
@@ -273,7 +360,7 @@ class MetricManager {
|
|
|
273
360
|
default:
|
|
274
361
|
log.warn('Invalid metric name received. Rejecting request to submit metric.', {
|
|
275
362
|
file: METRIC_FILE,
|
|
276
|
-
method:
|
|
363
|
+
method: 'submitVoicemailMetric',
|
|
277
364
|
});
|
|
278
365
|
break;
|
|
279
366
|
}
|
|
@@ -302,7 +389,7 @@ class MetricManager {
|
|
|
302
389
|
else {
|
|
303
390
|
log.warn('Invalid metric name received. Rejecting request to submit metric.', {
|
|
304
391
|
file: METRIC_FILE,
|
|
305
|
-
method:
|
|
392
|
+
method: 'submitBNRMetric',
|
|
306
393
|
});
|
|
307
394
|
}
|
|
308
395
|
if (data) {
|
|
@@ -9,15 +9,23 @@ export var METRIC_EVENT;
|
|
|
9
9
|
METRIC_EVENT["BNR_DISABLED"] = "web-calling-sdk-bnr-disabled";
|
|
10
10
|
METRIC_EVENT["CALL"] = "web-calling-sdk-callcontrol";
|
|
11
11
|
METRIC_EVENT["CALL_ERROR"] = "web-calling-sdk-callcontrol-error";
|
|
12
|
+
METRIC_EVENT["CONNECTION_ERROR"] = "web-calling-sdk-connection";
|
|
12
13
|
METRIC_EVENT["MEDIA"] = "web-calling-sdk-media";
|
|
13
14
|
METRIC_EVENT["MEDIA_ERROR"] = "web-calling-sdk-media-error";
|
|
14
15
|
METRIC_EVENT["REGISTRATION"] = "web-calling-sdk-registration";
|
|
15
16
|
METRIC_EVENT["REGISTRATION_ERROR"] = "web-calling-sdk-registration-error";
|
|
17
|
+
METRIC_EVENT["KEEPALIVE_ERROR"] = "web-calling-sdk-keepalive-error";
|
|
16
18
|
METRIC_EVENT["VOICEMAIL"] = "web-calling-sdk-voicemail";
|
|
17
19
|
METRIC_EVENT["VOICEMAIL_ERROR"] = "web-calling-sdk-voicemail-error";
|
|
18
20
|
METRIC_EVENT["UPLOAD_LOGS_SUCCESS"] = "web-calling-sdk-upload-logs-success";
|
|
19
21
|
METRIC_EVENT["UPLOAD_LOGS_FAILED"] = "web-calling-sdk-upload-logs-failed";
|
|
22
|
+
METRIC_EVENT["MOBIUS_DISCOVERY"] = "web-calling-sdk-mobius-discovery";
|
|
20
23
|
})(METRIC_EVENT || (METRIC_EVENT = {}));
|
|
24
|
+
export var MOBIUS_SERVER_ACTION;
|
|
25
|
+
(function (MOBIUS_SERVER_ACTION) {
|
|
26
|
+
MOBIUS_SERVER_ACTION["REGION_INFO"] = "region-info";
|
|
27
|
+
MOBIUS_SERVER_ACTION["MOBIUS_SERVERS"] = "mobius-servers";
|
|
28
|
+
})(MOBIUS_SERVER_ACTION || (MOBIUS_SERVER_ACTION = {}));
|
|
21
29
|
export var REG_ACTION;
|
|
22
30
|
(function (REG_ACTION) {
|
|
23
31
|
REG_ACTION["REGISTER"] = "register";
|
|
@@ -40,3 +48,9 @@ export var VOICEMAIL_ACTION;
|
|
|
40
48
|
VOICEMAIL_ACTION["TRANSCRIPT"] = "transcript";
|
|
41
49
|
})(VOICEMAIL_ACTION || (VOICEMAIL_ACTION = {}));
|
|
42
50
|
export const UPLOAD_LOGS_ACTION = 'upload_logs';
|
|
51
|
+
export var CONNECTION_ACTION;
|
|
52
|
+
(function (CONNECTION_ACTION) {
|
|
53
|
+
CONNECTION_ACTION["NETWORK_FLAP"] = "network_flap";
|
|
54
|
+
CONNECTION_ACTION["MERCURY_DOWN"] = "mercury_down";
|
|
55
|
+
CONNECTION_ACTION["MERCURY_UP"] = "mercury_up";
|
|
56
|
+
})(CONNECTION_ACTION || (CONNECTION_ACTION = {}));
|
|
@@ -128,6 +128,7 @@ export class BroadworksBackendConnector {
|
|
|
128
128
|
throw new Error(`${response.status}`);
|
|
129
129
|
}
|
|
130
130
|
const voicemailListResponse = (await response.json());
|
|
131
|
+
log.log(`Response trackingId: ${response.headers?.get('trackingid')}`, loggerContext);
|
|
131
132
|
if (Object.keys(voicemailListResponse?.VoiceMessagingMessages?.messageInfoList).length === 0) {
|
|
132
133
|
messageinfo = [];
|
|
133
134
|
}
|
|
@@ -181,6 +182,7 @@ export class BroadworksBackendConnector {
|
|
|
181
182
|
throw new Error(`${response.status}`);
|
|
182
183
|
}
|
|
183
184
|
const xmlData = await response.text();
|
|
185
|
+
log.log(`Response trackingId: ${response.headers?.get('trackingid')}`, loggerContext);
|
|
184
186
|
const parser = new DOMParser();
|
|
185
187
|
const xmlDOM = parser.parseFromString(xmlData, XML_TYPE);
|
|
186
188
|
const mediaDetails = xmlDOM.getElementsByTagName(MESSAGE_MEDIA_CONTENT)[0];
|
|
@@ -232,6 +234,7 @@ export class BroadworksBackendConnector {
|
|
|
232
234
|
throw new Error(`${response.status}`);
|
|
233
235
|
}
|
|
234
236
|
log.log(`Successfully marked voicemail with ID ${messageId} as read`, loggerContext);
|
|
237
|
+
log.log(`Response trackingId: ${response.headers?.get('trackingid')}`, loggerContext);
|
|
235
238
|
const responseDetails = {
|
|
236
239
|
statusCode: response.status,
|
|
237
240
|
data: {},
|