@webex/internal-plugin-metrics 3.0.0-beta.33 → 3.0.0-beta.331

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