@webex/internal-plugin-metrics 3.0.0-beta.30 → 3.0.0-beta.301

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.
Files changed (68) hide show
  1. package/dist/batcher.js +2 -1
  2. package/dist/batcher.js.map +1 -1
  3. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js +66 -0
  4. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js.map +1 -0
  5. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +456 -0
  6. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -0
  7. package/dist/call-diagnostic/call-diagnostic-metrics.js +798 -0
  8. package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -0
  9. package/dist/call-diagnostic/call-diagnostic-metrics.util.js +337 -0
  10. package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -0
  11. package/dist/call-diagnostic/config.js +604 -0
  12. package/dist/call-diagnostic/config.js.map +1 -0
  13. package/dist/client-metrics-batcher.js +2 -1
  14. package/dist/client-metrics-batcher.js.map +1 -1
  15. package/dist/config.js +22 -2
  16. package/dist/config.js.map +1 -1
  17. package/dist/index.js +30 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/metrics.js +30 -30
  20. package/dist/metrics.js.map +1 -1
  21. package/dist/metrics.types.js +7 -0
  22. package/dist/metrics.types.js.map +1 -0
  23. package/dist/new-metrics.js +333 -0
  24. package/dist/new-metrics.js.map +1 -0
  25. package/dist/types/batcher.d.ts +2 -0
  26. package/dist/types/call-diagnostic/call-diagnostic-metrics-batcher.d.ts +2 -0
  27. package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +194 -0
  28. package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +405 -0
  29. package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +96 -0
  30. package/dist/types/call-diagnostic/config.d.ts +171 -0
  31. package/dist/types/client-metrics-batcher.d.ts +2 -0
  32. package/dist/types/config.d.ts +36 -0
  33. package/dist/types/index.d.ts +13 -0
  34. package/dist/types/metrics.d.ts +3 -0
  35. package/dist/types/metrics.types.d.ts +103 -0
  36. package/dist/types/new-metrics.d.ts +139 -0
  37. package/dist/types/utils.d.ts +6 -0
  38. package/dist/utils.js +27 -0
  39. package/dist/utils.js.map +1 -0
  40. package/package.json +13 -8
  41. package/src/batcher.js +1 -0
  42. package/src/call-diagnostic/call-diagnostic-metrics-batcher.ts +83 -0
  43. package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +414 -0
  44. package/src/call-diagnostic/call-diagnostic-metrics.ts +863 -0
  45. package/src/call-diagnostic/call-diagnostic-metrics.util.ts +362 -0
  46. package/src/call-diagnostic/config.ts +660 -0
  47. package/src/client-metrics-batcher.js +1 -0
  48. package/src/config.js +20 -0
  49. package/src/index.ts +43 -0
  50. package/src/metrics.js +25 -27
  51. package/src/metrics.types.ts +159 -0
  52. package/src/new-metrics.ts +317 -0
  53. package/src/utils.ts +17 -0
  54. package/test/unit/spec/batcher.js +2 -0
  55. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +465 -0
  56. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +477 -0
  57. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +1943 -0
  58. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +565 -0
  59. package/test/unit/spec/client-metrics-batcher.js +2 -0
  60. package/test/unit/spec/metrics.js +66 -97
  61. package/test/unit/spec/new-metrics.ts +269 -0
  62. package/test/unit/spec/utils.ts +22 -0
  63. package/tsconfig.json +6 -0
  64. package/dist/call-diagnostic-events-batcher.js +0 -60
  65. package/dist/call-diagnostic-events-batcher.js.map +0 -1
  66. package/src/call-diagnostic-events-batcher.js +0 -62
  67. package/src/index.js +0 -17
  68. package/test/unit/spec/call-diagnostic-events-batcher.js +0 -195
@@ -0,0 +1,660 @@
1
+ /* eslint-disable import/prefer-default-export */
2
+ // Most client error codes are mapped based on
3
+ // https://sqbu-github.cisco.com/WebExSquared/event-dictionary/wiki/Error-codes-for-metric-events
4
+
5
+ import {ClientEventError} from '../metrics.types';
6
+
7
+ export const CALL_DIAGNOSTIC_LOG_IDENTIFIER = 'call-diagnostic-events -> ';
8
+
9
+ export const AUTHENTICATION_FAILED_CODE = 1010;
10
+ export const NETWORK_ERROR = 1026;
11
+ export const NEW_LOCUS_ERROR_CLIENT_CODE = 4008;
12
+ export const MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = 4100;
13
+ export const UNKNOWN_ERROR = 9999; // Unexpected error that is not a meetingInfo error, locus error or browser media error.
14
+ export const ICE_FAILURE_CLIENT_CODE = 2004;
15
+ export const MISSING_ROAP_ANSWER_CLIENT_CODE = 2007;
16
+ export const DTLS_HANDSHAKE_FAILED_CLIENT_CODE = 2008;
17
+ export const ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE = 2010;
18
+ export const ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE = 2009;
19
+ export const WBX_APP_API_URL = 'wbxappapi'; // MeetingInfo WebexAppApi response object normally contains a body.url that includes the string 'wbxappapi'
20
+
21
+ // Found in https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
22
+ const BROWSER_MEDIA_ERROR_NAMES = {
23
+ PERMISSION_DENIED_ERROR: 'PermissionDeniedError',
24
+ NOT_ALLOWED_ERROR: 'NotAllowedError',
25
+ NOT_READABLE_ERROR: 'NotReadableError',
26
+ ABORT_ERROR: 'AbortError',
27
+ NOT_FOUND_ERROR: 'NotFoundError',
28
+ OVERCONSTRAINED_ERROR: 'OverconstrainedError',
29
+ SECURITY_ERROR: 'SecurityError',
30
+ TYPE_ERROR: 'TypeError',
31
+ };
32
+
33
+ export const BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP = {
34
+ [BROWSER_MEDIA_ERROR_NAMES.PERMISSION_DENIED_ERROR]: 4032, // User did not grant permission
35
+ [BROWSER_MEDIA_ERROR_NAMES.NOT_ALLOWED_ERROR]: 4032, // User did not grant permission
36
+ [BROWSER_MEDIA_ERROR_NAMES.NOT_READABLE_ERROR]: 2729, // Although the user granted permission to use the matching devices, a hardware error occurred at the operating system, browser, or Web page level which prevented access to the device.
37
+ [BROWSER_MEDIA_ERROR_NAMES.ABORT_ERROR]: 2729, // Although the user and operating system both granted access to the hardware device, and no hardware issues occurred that would cause a NotReadableError DOMException, throw if some problem occurred which prevented the device from being used.
38
+ [BROWSER_MEDIA_ERROR_NAMES.NOT_FOUND_ERROR]: 2729, // User did not grant permission
39
+ [BROWSER_MEDIA_ERROR_NAMES.OVERCONSTRAINED_ERROR]: 2729, // Thrown if the specified constraints resulted in no candidate devices which met the criteria requested.
40
+ [BROWSER_MEDIA_ERROR_NAMES.SECURITY_ERROR]: 2729, // Thrown if user media support is disabled on the Document on which getUserMedia() was called. The mechanism by which user media support is enabled and disabled is left up to the individual user agent.
41
+ [BROWSER_MEDIA_ERROR_NAMES.TYPE_ERROR]: 2729, // Thrown if the list of constraints specified is empty, or has all constraints set to false. This can also happen if you try to call getUserMedia() in an insecure context, since navigator.mediaDevices is undefined in an insecure context.
42
+ };
43
+
44
+ export const ERROR_DESCRIPTIONS = {
45
+ UNKNOWN_CALL_FAILURE: 'UnknownCallFailure',
46
+ LOCUS_RATE_LIMITED_INCOMING: 'LocusRateLimitedIncoming',
47
+ LOCUS_RATE_LIMITED_OUTGOING: 'LocusRateLimitedOutgoing',
48
+ LOCUS_UNAVAILABLE: 'LocusUnavailable',
49
+ LOCUS_CONFLICT: 'LocusConflict',
50
+ TIMEOUT: 'Timeout',
51
+ LOCUS_INVALID_SEQUENCE_HASH: 'LocusInvalidSequenceHash',
52
+ AUTHENTICATION_FAILED: 'AuthenticationFailed',
53
+ NETWORK_ERROR: 'NetworkError',
54
+ UPDATE_MEDIA_FAILED: 'UpdateMediaFailed',
55
+ FAILED_TO_CONNECT_MEDIA: 'FailedToConnectMedia',
56
+ MEDIA_ENGINE_LOST: 'MediaEngineLost',
57
+ MEDIA_CONNECTION_LOST: 'MediaConnectionLost',
58
+ ICE_FAILURE: 'IceFailure',
59
+ MEDIA_ENGINE_HANG: 'MediaEngineHang',
60
+ ICE_SERVER_REJECTED: 'IceServerRejected',
61
+ CALL_FULL: 'CallFull',
62
+ ROOM_TOO_LARGE: 'RoomTooLarge',
63
+ GUEST_ALREADY_ADDED: 'GuestAlreadyAdded',
64
+ LOCUS_USER_NOT_AUTHORISED: 'LocusUserNotAuthorised',
65
+ CLOUDBERRY_UNAVAILABLE: 'CloudberryUnavailable',
66
+ ROOM_TOO_LARGE_FREE_ACCOUNT: 'RoomTooLarge_FreeAccount',
67
+ MEETING_INACTIVE: 'MeetingInactive',
68
+ MEETING_LOCKED: 'MeetingLocked',
69
+ MEETING_TERMINATING: 'MeetingTerminating',
70
+ MODERATOR_PIN_OR_GUEST_REQUIRED: 'Moderator_Pin_Or_Guest_Required',
71
+ MODERATOR_PIN_OR_GUEST_PIN_REQUIRED: 'Moderator_Pin_Or_Guest_PIN_Required',
72
+ MODERATOR_REQUIRED: 'Moderator_Required',
73
+ USER_NOT_MEMBER_OF_ROOM: 'UserNotMemberOfRoom',
74
+ NEW_LOCUS_ERROR: 'NewLocusError',
75
+ NETWORK_UNAVAILABLE: 'NetworkUnavailable',
76
+ MEETING_UNAVAILABLE: 'MeetingUnavailable',
77
+ MEETING_ID_INVALID: 'MeetingIDInvalid',
78
+ MEETING_SITE_INVALID: 'MeetingSiteInvalid',
79
+ LOCUS_INVALID_JOINTIME: 'LocusInvalidJoinTime',
80
+ LOBBY_EXPIRED: 'LobbyExpired',
81
+ MEDIA_CONNECTION_LOST_PAIRED: 'MediaConnectionLostPaired',
82
+ PHONE_NUMBER_NOT_A_NUMBER: 'PhoneNumberNotANumber',
83
+ PHONE_NUMBER_TOO_LONG: 'PhoneNumberTooLong',
84
+ INVALID_DIALABLE_KEY: 'InvalidDialableKey',
85
+ ONE_ON_ONE_TO_SELF_NOT_ALLOWED: 'OneOnOneToSelfNotAllowed',
86
+ REMOVED_PARTICIPANT: 'RemovedParticipant',
87
+ MEETING_LINK_NOT_FOUND: 'MeetingLinkNotFound',
88
+ PHONE_NUMBER_TOO_SHORT_AFTER_IDD: 'PhoneNumberTooShortAfterIdd',
89
+ INVALID_INVITEE_ADDRESS: 'InvalidInviteeAddress',
90
+ PMR_USER_ACCOUNT_LOCKED_OUT: 'PMRUserAccountLockedOut',
91
+ GUEST_FORBIDDEN: 'GuestForbidden',
92
+ PMR_ACCOUNT_SUSPENDED: 'PMRAccountSuspended',
93
+ EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE: 'EmptyPhoneNumberOrCountryCode',
94
+ CONVERSATION_NOT_FOUND: 'ConversationNotFound',
95
+ SIP_CALLEE_BUSY: 'SIPCalleeBusy',
96
+ SIP_CALLEE_NOT_FOUND: 'SIPCalleeNotFound',
97
+ START_RECORDING_FAILED: 'StartRecordingFailed',
98
+ RECORDING_IN_PROGRESS_FAILED: 'RecordingInProgressFailed',
99
+ MEETING_INFO_LOOKUP_ERROR: 'MeetingInfoLookupError',
100
+ CALL_FULL_ADD_GUEST: 'CallFullAddGuest',
101
+ REQUIRE_WEBEX_LOGIN: 'RequireWebexLogin',
102
+ USER_NOT_ALLOWED_ACCESS_MEETING: 'UserNotAllowedAccessMeeting',
103
+ USER_NEEDS_ACTIVATION: 'UserNeedsActivation',
104
+ SIGN_UP_INVALID_EMAIL: 'SignUpInvalidEmail',
105
+ UNKNOWN_ERROR: 'UnknownError',
106
+ NO_MEDIA_FOUND: 'NoMediaFound',
107
+ STREAM_ERROR_NO_MEDIA: 'StreamErrorNoMedia',
108
+ CAMERA_PERMISSION_DENIED: 'CameraPermissionDenied',
109
+ FRAUD_DETECTION: 'FraudDetection',
110
+ E2EE_NOT_SUPPORTED: 'E2EENotSupported',
111
+ LOCUS_LOBBY_FULL_CMR: 'LocusLobbyFullCMR',
112
+ USER_NOT_INVITED_TO_JOIN: 'UserNotInvitedToJoin',
113
+ MISSING_ROAP_ANSWER: 'MissingRoapAnswer',
114
+ DTLS_HANDSHAKE_FAILED: 'DTLSHandshakeFailed',
115
+ ICE_FAILED_WITHOUT_TURN_TLS: 'ICEFailedWithoutTURN_TLS',
116
+ ICE_FAILED_WITH_TURN_TLS: 'ICEFailedWithTURN_TLS',
117
+ };
118
+
119
+ export const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP = {
120
+ // ---- Webex API ----
121
+ // Taken from https://wiki.cisco.com/display/HFWEB/MeetingInfo+API and https://sqbu-github.cisco.com/WebExSquared/spark-client-framework/blob/master/spark-client-framework/Services/WebexMeetingService/WebexMeetingModel.h
122
+ // Site not support the URL's domain
123
+ 58400: 4100,
124
+ 99002: 4100,
125
+ // Cannot find the data. Unkown meeting.
126
+ 99009: 4100,
127
+ // Meeting is not allow to cross env
128
+ 58500: 4100,
129
+ // Input parameters contain invalit item
130
+ 400001: 4100,
131
+ // Empty password or token. Meeting is not allow to access since require password
132
+ 403004: 4005,
133
+ // Wrong password. Meeting is not allow to access since password error
134
+ 403028: 4005,
135
+ // Wrong or expired permission. Meeting is not allow to access since permissionToken error or expire
136
+ 403032: 4005,
137
+ // Meeting is required login for current user
138
+ 403034: 4036,
139
+ // Meeting is not allow to access since require password or hostKey
140
+ // Empty password or host key
141
+ 403036: 4005,
142
+ // Meeting is not allow to access since password or hostKey error
143
+ // Wrong password or host key
144
+ 403038: 4005,
145
+ // CMR Meeting Not Supported (meeting exists, but not CMR meeting)
146
+ 403040: 4100,
147
+ // Requires Moderator Pin or Guest Pin
148
+ 403041: 4005,
149
+ // Email blocked
150
+ 403047: 4101,
151
+ // Device not authenticated for your organization
152
+ 403408: 4101,
153
+ // Invalid panelist Pin
154
+ 403043: 4005,
155
+ // Device not registered in org. Device not authenticated.
156
+ 403048: 4101,
157
+ // Not allowed to join external meetings. Violate meeting join policy. Your organization settings don't allow you to join this meeting.
158
+ 403049: 4101,
159
+ // Invalid email. Requires sign in meeting's current site.
160
+ 403100: 4101,
161
+ // Enforce sign in: need login before access when policy enforce sign in. GuestForceUserSignInPolicy
162
+ 403101: 4036,
163
+ // Enforce sign in: sign in with your email address that is approved by your organization
164
+ 403102: 4036,
165
+ // Join internal Meeting: need login before access when policy enforce sign in. Guest force user sign in internal meeting policy.
166
+ 403103: 4036,
167
+ // Join internal Meeting: The host's organization policy doesn't allow your account to join this meeting. Try switching to another account
168
+ 403104: 4101,
169
+ 404001: 4101,
170
+ // Site data not found. Unkonwn meeting. Site data not found(or null).
171
+ 404006: 4100,
172
+ // Invalid input with too many requests. Too many requests access, please input captcha code
173
+ 423001: 4005,
174
+ // Wrong password with too many requests. PasswordError too many time, please input captcha code
175
+ 423005: 4005,
176
+ // Wrong password or host key with too many requests
177
+ 423006: 4005,
178
+ // PasswordError with right captcha, please input captcha code
179
+ 423010: 4005,
180
+ // PasswordOrHostKeyError with right captcha, please input captcha code
181
+ 423012: 4005,
182
+ // Unverified or invalid input. Force show captcha. Please input captcha code"
183
+ 423013: 4005,
184
+ // Too many requests access
185
+ 429005: 4100,
186
+
187
+ // ---- Locus ------
188
+ // FREE_USER_MAX_PARTICIPANTS_EXCEEDED
189
+ 2403001: 3007,
190
+ // PAID_USER_MAX_PARTICIPANTS_EXCEEDED
191
+ 2403002: 3002,
192
+ // SERVICE_MAX_PARTICIPANTS_EXCEEDED
193
+ 2403003: 3002,
194
+ // LOCUS_INACTIVE
195
+ 2403004: 4001,
196
+ // LOCUS_FREE_USER_MAX_PARTICIPANTS_JOINED_EXCEEDED
197
+ 2403018: 3001,
198
+ // LOCUS_PAID_USER_MAX_PARTICIPANTS_JOINED_EXCEEDED
199
+ 2403019: 3001,
200
+ // LOCUS_LOCKED
201
+ 2423003: 4002,
202
+ // LOCUS_TERMINATING
203
+ 2423004: 4003,
204
+ // LOCUS_REQUIRES_MODERATOR_PIN_OR_GUEST
205
+ 2423005: 4005,
206
+ 2423006: 4005,
207
+ 2423016: 4005,
208
+ 2423017: 4005,
209
+ 2423018: 4005,
210
+ // LOCUS_OWNER_CONCURRENT_ACTIVE_MEETING_LIMIT_EXCEEDED
211
+ 2423012: 12000,
212
+ // LOCUS_LOBBY_FULL_CMR
213
+ 2423021: 12001,
214
+ // LOCUS_REQUIRES_MODERATOR_ROLE
215
+ 2423007: 4006,
216
+ // LOCUS_JOIN_RESTRICTED_USER_NOT_IN_ROOM
217
+ 2403010: 4007,
218
+ // LOCUS_MEETING_NOT_FOUND
219
+ 2403014: 4011,
220
+ // LOCUS_NOT_WEBEX_SITE
221
+ 2403015: 4012,
222
+ // LOCUS_INVALID_JOIN_TIME
223
+ 2423010: 4013,
224
+ // LOCUS_PHONE_NUMBER_NOT_A_NUMBER
225
+ 2400008: 4016,
226
+ // LOCUS_PHONE_NUMBER_TOO_LONG
227
+ 2400011: 4017,
228
+ // LOCUS_INVALID_DIALABLE_KEY
229
+ 2400012: 4018,
230
+ // LOCUS_ONE_ON_ONE_TO_SELF_NOT_ALLOWED
231
+ 2403007: 4019,
232
+ // LOCUS_REMOVED_PARTICIPANT
233
+ 2401002: 4020,
234
+ // LOCUS_MEETING_LINK_NOT_FOUND
235
+ 2404002: 4021,
236
+ // LOCUS_PHONE_NUMBER_TOO_SHORT_AFTER_IDD
237
+ 2400009: 4022,
238
+ // LOCUS_INVALID_INVITEE_ADDRESS
239
+ 2400025: 4023,
240
+ // LOCUS_PMR_USER_ACCOUNT_LOCKEDOUT
241
+ 2423009: 4024,
242
+ // LOCUS_RESOURCE_GUEST_FORBIDDEN
243
+ 2403022: 4025,
244
+ // LOCUS_PMR_SUSPENDED
245
+ 2423008: 4026,
246
+ // LOCUS_EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE
247
+ 2400006: 4027,
248
+ // LOCUS_INVALID_SINCE_OR_SEQUENCE_HASH_IN_REQUEST
249
+ 2400014: 1006,
250
+ // LOCUS_CONVERSATION_NOT_FOUND
251
+ 2404001: 4028,
252
+ // LOCUS_RECORDING_CONTROL_NOT_SUPPORTED
253
+ 2403025: 4029,
254
+ // LOCUS_RECORDING_NOT_STARTED
255
+ 2405001: 4029,
256
+ // LOCUS_RECORDING_NOT_ENABLED
257
+ 2409005: 4029,
258
+ // E2EE_NOT_SUPPORTED
259
+ 2409062: 12002,
260
+ // LOCUS: ONLY_INVITED_USERS_CAN_ATTEND_THIS_MEETING
261
+ 2423025: 12003,
262
+
263
+ // ---- U2C Sign in catalog ------
264
+ // The user exists, but hasn't completed activation. Needs to visit Atlas for more processing.
265
+ 100002: 4102,
266
+ // The user exists, had completed activation earlier, but requires re-activation because of change in login strategy.
267
+ // Common example is: user signed up using an OAuth provider, but that OAuth provider was removed by org's admin. Now the user needs to re-activate using alternate login strategies: password-pin, new OAuth provider, SSO, etc.
268
+ 100007: 4102,
269
+ // The user does not exist
270
+ 100001: 4103,
271
+ // The user wasn't found, and the organization used for search is a domain-claimed organization.
272
+ 100006: 4103,
273
+ 100005: 4103, // Depracated because of an issue in the UCF Clients
274
+ // If both email-hash and domain-hash are null or undefined.
275
+ 100004: 4103,
276
+ };
277
+
278
+ export const CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD: Record<number, Partial<ClientEventError>> = {
279
+ 1000: {
280
+ errorDescription: ERROR_DESCRIPTIONS.UNKNOWN_CALL_FAILURE,
281
+ category: 'signaling',
282
+ fatal: true,
283
+ name: 'locus.response',
284
+ },
285
+ 1001: {
286
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_RATE_LIMITED_INCOMING,
287
+ category: 'signaling',
288
+ fatal: true,
289
+ name: 'locus.response',
290
+ },
291
+ 1002: {
292
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_RATE_LIMITED_OUTGOING,
293
+ category: 'signaling',
294
+ fatal: true,
295
+ name: 'locus.response',
296
+ },
297
+ 1003: {
298
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_UNAVAILABLE,
299
+ category: 'signaling',
300
+ fatal: true,
301
+ name: 'locus.response',
302
+ },
303
+ 1004: {
304
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_CONFLICT,
305
+ category: 'signaling',
306
+ fatal: true,
307
+ name: 'locus.response',
308
+ },
309
+ 1005: {
310
+ errorDescription: ERROR_DESCRIPTIONS.TIMEOUT,
311
+ category: 'signaling',
312
+ fatal: true,
313
+ name: 'locus.response',
314
+ },
315
+ 1006: {
316
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_INVALID_SEQUENCE_HASH,
317
+ category: 'signaling',
318
+ fatal: true,
319
+ },
320
+ 1007: {
321
+ errorDescription: ERROR_DESCRIPTIONS.UPDATE_MEDIA_FAILED,
322
+ category: 'signaling',
323
+ fatal: true,
324
+ },
325
+ [AUTHENTICATION_FAILED_CODE]: {
326
+ errorDescription: ERROR_DESCRIPTIONS.AUTHENTICATION_FAILED,
327
+ category: 'network',
328
+ fatal: true,
329
+ },
330
+ 1026: {
331
+ errorDescription: ERROR_DESCRIPTIONS.NETWORK_ERROR,
332
+ category: 'network',
333
+ fatal: true,
334
+ },
335
+ 2001: {
336
+ errorDescription: ERROR_DESCRIPTIONS.FAILED_TO_CONNECT_MEDIA,
337
+ category: 'signaling',
338
+ fatal: true,
339
+ },
340
+ 2002: {
341
+ errorDescription: ERROR_DESCRIPTIONS.MEDIA_ENGINE_LOST,
342
+ category: 'signaling',
343
+ fatal: true,
344
+ },
345
+ 2003: {
346
+ errorDescription: ERROR_DESCRIPTIONS.MEDIA_CONNECTION_LOST,
347
+ category: 'signaling',
348
+ fatal: true,
349
+ },
350
+ [ICE_FAILURE_CLIENT_CODE]: {
351
+ errorDescription: ERROR_DESCRIPTIONS.ICE_FAILURE,
352
+ category: 'media',
353
+ fatal: true,
354
+ },
355
+ 2005: {
356
+ errorDescription: ERROR_DESCRIPTIONS.MEDIA_ENGINE_HANG,
357
+ category: 'signaling',
358
+ fatal: true,
359
+ },
360
+ 2006: {
361
+ errorDescription: ERROR_DESCRIPTIONS.ICE_SERVER_REJECTED,
362
+ category: 'signaling',
363
+ fatal: true,
364
+ },
365
+ [MISSING_ROAP_ANSWER_CLIENT_CODE]: {
366
+ errorDescription: ERROR_DESCRIPTIONS.MISSING_ROAP_ANSWER,
367
+ category: 'signaling',
368
+ fatal: true,
369
+ },
370
+ [DTLS_HANDSHAKE_FAILED_CLIENT_CODE]: {
371
+ errorDescription: ERROR_DESCRIPTIONS.DTLS_HANDSHAKE_FAILED,
372
+ category: 'media',
373
+ fatal: true,
374
+ },
375
+ [ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE]: {
376
+ errorDescription: ERROR_DESCRIPTIONS.ICE_FAILED_WITHOUT_TURN_TLS,
377
+ category: 'media',
378
+ fatal: true,
379
+ },
380
+ [ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE]: {
381
+ errorDescription: ERROR_DESCRIPTIONS.ICE_FAILED_WITH_TURN_TLS,
382
+ category: 'media',
383
+ fatal: true,
384
+ },
385
+ 3001: {
386
+ errorDescription: ERROR_DESCRIPTIONS.CALL_FULL,
387
+ category: 'expected',
388
+ fatal: true,
389
+ },
390
+ 3002: {
391
+ errorDescription: ERROR_DESCRIPTIONS.ROOM_TOO_LARGE,
392
+ category: 'expected',
393
+ fatal: true,
394
+ },
395
+ 3004: {
396
+ errorDescription: ERROR_DESCRIPTIONS.GUEST_ALREADY_ADDED,
397
+ category: 'expected',
398
+ fatal: false,
399
+ },
400
+ 3005: {
401
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_USER_NOT_AUTHORISED,
402
+ category: 'expected',
403
+ fatal: true,
404
+ },
405
+ 3006: {
406
+ errorDescription: ERROR_DESCRIPTIONS.CLOUDBERRY_UNAVAILABLE,
407
+ category: 'expected',
408
+ fatal: true,
409
+ },
410
+ 3007: {
411
+ errorDescription: ERROR_DESCRIPTIONS.STREAM_ERROR_NO_MEDIA,
412
+ category: 'expected',
413
+ fatal: true,
414
+ },
415
+ 3013: {
416
+ errorDescription: ERROR_DESCRIPTIONS.ROOM_TOO_LARGE_FREE_ACCOUNT,
417
+ category: 'expected',
418
+ fatal: false,
419
+ },
420
+ 4001: {
421
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_INACTIVE,
422
+ category: 'expected',
423
+ fatal: true,
424
+ },
425
+ 4002: {
426
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_LOCKED,
427
+ category: 'expected',
428
+ fatal: true,
429
+ name: 'locus.response',
430
+ },
431
+ 4003: {
432
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_TERMINATING,
433
+ category: 'expected',
434
+ fatal: true,
435
+ name: 'locus.leave',
436
+ },
437
+ 4004: {
438
+ errorDescription: ERROR_DESCRIPTIONS.MODERATOR_PIN_OR_GUEST_REQUIRED,
439
+ category: 'expected',
440
+ fatal: false,
441
+ },
442
+ 4005: {
443
+ errorDescription: ERROR_DESCRIPTIONS.MODERATOR_PIN_OR_GUEST_PIN_REQUIRED,
444
+ category: 'expected',
445
+ fatal: false,
446
+ },
447
+ 4006: {
448
+ errorDescription: ERROR_DESCRIPTIONS.MODERATOR_REQUIRED,
449
+ category: 'expected',
450
+ fatal: false,
451
+ },
452
+ 4007: {
453
+ errorDescription: ERROR_DESCRIPTIONS.USER_NOT_MEMBER_OF_ROOM,
454
+ category: 'expected',
455
+ fatal: true,
456
+ },
457
+ 4008: {
458
+ errorDescription: ERROR_DESCRIPTIONS.NEW_LOCUS_ERROR,
459
+ category: 'signaling',
460
+ fatal: true,
461
+ },
462
+ 4009: {
463
+ errorDescription: ERROR_DESCRIPTIONS.NETWORK_UNAVAILABLE,
464
+ category: 'network',
465
+ fatal: true,
466
+ },
467
+ 4010: {
468
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_UNAVAILABLE,
469
+ category: 'expected',
470
+ fatal: true,
471
+ },
472
+ 4011: {
473
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_ID_INVALID,
474
+ category: 'expected',
475
+ fatal: true,
476
+ },
477
+ 4012: {
478
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_SITE_INVALID,
479
+ category: 'expected',
480
+ fatal: true,
481
+ },
482
+ 4013: {
483
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_INVALID_JOINTIME,
484
+ category: 'expected',
485
+ fatal: true,
486
+ },
487
+ 4014: {
488
+ errorDescription: ERROR_DESCRIPTIONS.LOBBY_EXPIRED,
489
+ category: 'expected',
490
+ fatal: true,
491
+ },
492
+ 4015: {
493
+ errorDescription: ERROR_DESCRIPTIONS.MEDIA_CONNECTION_LOST_PAIRED,
494
+ category: 'expected',
495
+ fatal: false,
496
+ },
497
+ 4016: {
498
+ errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_NOT_A_NUMBER,
499
+ category: 'expected',
500
+ fatal: true,
501
+ name: 'locus.response',
502
+ },
503
+ 4017: {
504
+ errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_TOO_LONG,
505
+ category: 'expected',
506
+ fatal: true,
507
+ name: 'locus.response',
508
+ },
509
+ 4018: {
510
+ errorDescription: ERROR_DESCRIPTIONS.INVALID_DIALABLE_KEY,
511
+ category: 'expected',
512
+ fatal: true,
513
+ name: 'locus.response',
514
+ },
515
+ 4019: {
516
+ errorDescription: ERROR_DESCRIPTIONS.ONE_ON_ONE_TO_SELF_NOT_ALLOWED,
517
+ category: 'expected',
518
+ fatal: true,
519
+ },
520
+ 4020: {
521
+ errorDescription: ERROR_DESCRIPTIONS.REMOVED_PARTICIPANT,
522
+ category: 'expected',
523
+ fatal: true,
524
+ },
525
+ 4021: {
526
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_LINK_NOT_FOUND,
527
+ category: 'expected',
528
+ fatal: true,
529
+ },
530
+ 4022: {
531
+ errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_TOO_SHORT_AFTER_IDD,
532
+ category: 'expected',
533
+ fatal: true,
534
+ },
535
+ 4023: {
536
+ errorDescription: ERROR_DESCRIPTIONS.INVALID_INVITEE_ADDRESS,
537
+ category: 'expected',
538
+ fatal: true,
539
+ },
540
+ 4024: {
541
+ errorDescription: ERROR_DESCRIPTIONS.PMR_USER_ACCOUNT_LOCKED_OUT,
542
+ category: 'expected',
543
+ fatal: true,
544
+ },
545
+ 4025: {
546
+ errorDescription: ERROR_DESCRIPTIONS.GUEST_FORBIDDEN,
547
+ category: 'expected',
548
+ fatal: true,
549
+ },
550
+ 4026: {
551
+ errorDescription: ERROR_DESCRIPTIONS.PMR_ACCOUNT_SUSPENDED,
552
+ category: 'expected',
553
+ fatal: true,
554
+ },
555
+ 4027: {
556
+ errorDescription: ERROR_DESCRIPTIONS.EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE,
557
+ category: 'expected',
558
+ fatal: true,
559
+ },
560
+ 4028: {
561
+ errorDescription: ERROR_DESCRIPTIONS.CONVERSATION_NOT_FOUND,
562
+ category: 'expected',
563
+ fatal: true,
564
+ },
565
+ 4029: {
566
+ errorDescription: ERROR_DESCRIPTIONS.START_RECORDING_FAILED,
567
+ category: 'expected',
568
+ fatal: true,
569
+ },
570
+ 4030: {
571
+ errorDescription: ERROR_DESCRIPTIONS.RECORDING_IN_PROGRESS_FAILED,
572
+ category: 'expected',
573
+ fatal: true,
574
+ },
575
+ 4032: {
576
+ errorDescription: ERROR_DESCRIPTIONS.CAMERA_PERMISSION_DENIED,
577
+ category: 'expected',
578
+ fatal: true,
579
+ },
580
+ 4036: {
581
+ errorDescription: ERROR_DESCRIPTIONS.REQUIRE_WEBEX_LOGIN,
582
+ category: 'expected',
583
+ fatal: true,
584
+ },
585
+ 5000: {
586
+ errorDescription: ERROR_DESCRIPTIONS.SIP_CALLEE_BUSY,
587
+ category: 'expected',
588
+ fatal: true,
589
+ },
590
+ 5001: {
591
+ errorDescription: ERROR_DESCRIPTIONS.SIP_CALLEE_NOT_FOUND,
592
+ category: 'expected',
593
+ fatal: true,
594
+ },
595
+
596
+ // Webex App API Error Codes
597
+ 4100: {
598
+ errorDescription: ERROR_DESCRIPTIONS.MEETING_INFO_LOOKUP_ERROR,
599
+ category: 'signaling',
600
+ fatal: true,
601
+ },
602
+ 3003: {
603
+ errorDescription: ERROR_DESCRIPTIONS.CALL_FULL_ADD_GUEST,
604
+ category: 'expected',
605
+ fatal: false,
606
+ },
607
+ 4101: {
608
+ errorDescription: ERROR_DESCRIPTIONS.USER_NOT_ALLOWED_ACCESS_MEETING,
609
+ category: 'expected',
610
+ fatal: true,
611
+ },
612
+ 4102: {
613
+ errorDescription: ERROR_DESCRIPTIONS.USER_NEEDS_ACTIVATION,
614
+ category: 'expected',
615
+ fatal: true,
616
+ },
617
+ 4103: {
618
+ errorDescription: ERROR_DESCRIPTIONS.SIGN_UP_INVALID_EMAIL,
619
+ category: 'expected',
620
+ fatal: true,
621
+ },
622
+ 2729: {
623
+ errorDescription: ERROR_DESCRIPTIONS.NO_MEDIA_FOUND,
624
+ category: 'expected',
625
+ fatal: false,
626
+ },
627
+ 9999: {
628
+ errorDescription: ERROR_DESCRIPTIONS.UNKNOWN_ERROR,
629
+ category: 'other',
630
+ fatal: true,
631
+ },
632
+ 12000: {
633
+ errorDescription: ERROR_DESCRIPTIONS.FRAUD_DETECTION,
634
+ category: 'expected',
635
+ fatal: true,
636
+ name: 'locus.response',
637
+ shownToUser: true,
638
+ },
639
+ 12001: {
640
+ errorDescription: ERROR_DESCRIPTIONS.LOCUS_LOBBY_FULL_CMR,
641
+ category: 'expected',
642
+ fatal: true,
643
+ name: 'locus.response',
644
+ shownToUser: true,
645
+ },
646
+ 12002: {
647
+ errorDescription: ERROR_DESCRIPTIONS.E2EE_NOT_SUPPORTED,
648
+ category: 'expected',
649
+ fatal: true,
650
+ name: 'locus.response',
651
+ shownToUser: true,
652
+ },
653
+ 12003: {
654
+ errorDescription: ERROR_DESCRIPTIONS.USER_NOT_INVITED_TO_JOIN,
655
+ category: 'expected',
656
+ fatal: true,
657
+ },
658
+ };
659
+
660
+ export const CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = 'js_sdk_call_diagnostic_event_failed_to_send';
@@ -24,6 +24,7 @@ const ClientMetricsBatcher = Batcher.extend({
24
24
  body: {
25
25
  metrics: payload,
26
26
  },
27
+ waitForServiceTimeout: this.webex.config.metrics.waitForServiceTimeout,
27
28
  });
28
29
  },
29
30
  });
package/src/config.js CHANGED
@@ -19,5 +19,25 @@ export default {
19
19
  batcherMaxCalls: 50,
20
20
  batcherMaxWait: 1500,
21
21
  batcherRetryPlateau: 32000,
22
+ waitForServiceTimeout: 15,
22
23
  },
23
24
  };
25
+
26
+ export const OS_NAME = {
27
+ WINDOWS: 'windows',
28
+ MAC: 'mac',
29
+ IOS: 'ios',
30
+ ANDROID: 'android',
31
+ CHROME: 'chrome',
32
+ LINUX: 'linux',
33
+ OTHERS: 'other',
34
+ };
35
+
36
+ export const OSMap = {
37
+ 'Chrome OS': OS_NAME.CHROME,
38
+ macOS: OS_NAME.MAC,
39
+ Windows: OS_NAME.WINDOWS,
40
+ iOS: OS_NAME.IOS,
41
+ Android: OS_NAME.ANDROID,
42
+ Linux: OS_NAME.LINUX,
43
+ };