@webex/internal-plugin-metrics 3.0.0-bnr.5 → 3.0.0-next.2

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