@wazo/sdk 0.37.42 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -0
- package/dist/wazo-sdk.js +5 -5
- package/esm/__tests__/api-client.test.js +12 -7
- package/esm/__tests__/web-rtc-client.test.js +17 -10
- package/esm/api/agentd.js +12 -7
- package/esm/api/amid.js +12 -7
- package/esm/api/application.js +12 -7
- package/esm/api/auth.js +12 -7
- package/esm/api/call-logd.js +12 -7
- package/esm/api/calld.js +12 -7
- package/esm/api/chatd.js +12 -7
- package/esm/api/confd.js +12 -7
- package/esm/api/ctid-ng.js +12 -7
- package/esm/api/dird.js +12 -7
- package/esm/api/webhookd.js +12 -7
- package/esm/api-client.js +12 -7
- package/esm/checker/Checker.js +18 -11
- package/esm/checker/checks/aor.js +12 -7
- package/esm/checker/checks/api.js +12 -7
- package/esm/checker/checks/index.js +18 -11
- package/esm/checker/checks/wazo-websocket.js +13 -8
- package/esm/checker/checks/webrtc-transport.js +17 -10
- package/esm/checker/checks/webrtc.js +17 -10
- package/esm/domain/AdHocAPIConference.js +12 -7
- package/esm/domain/Features.js +12 -7
- package/esm/domain/Phone/CTIPhone.js +12 -7
- package/esm/domain/Phone/WebRTCPhone.js +12 -7
- package/esm/index.js +347 -11
- package/esm/lib/WazoSessionDescriptionHandler.js +12 -7
- package/esm/service/CallApi.js +12 -7
- package/esm/service/IssueReporter.js +12 -7
- package/esm/service/__tests__/IssueReporter.test.js +18 -7
- package/esm/service/getApiClient.js +12 -7
- package/esm/simple/Auth.js +347 -11
- package/esm/simple/Configuration.js +347 -11
- package/esm/simple/Directory.js +12 -7
- package/esm/simple/Phone.js +347 -11
- package/esm/simple/Softphone.js +329 -0
- package/esm/simple/Websocket.js +13 -8
- package/esm/simple/index.js +347 -11
- package/esm/simple/room/LocalParticipant.js +347 -11
- package/esm/simple/room/Participant.js +347 -11
- package/esm/simple/room/RemoteParticipant.js +347 -11
- package/esm/simple/room/Room.js +347 -11
- package/esm/simple/room/SipRoom.js +347 -11
- package/esm/simple/room/Stream.js +347 -11
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +347 -11
- package/esm/simple/utils.js +347 -11
- package/esm/utils/__tests__/api-requester.test.js +12 -7
- package/esm/utils/api-requester.js +12 -7
- package/esm/web-rtc-client.js +17 -10
- package/esm/websocket-client.js +13 -8
- package/lib/__tests__/api-client.test.js +12 -7
- package/lib/__tests__/web-rtc-client.test.js +17 -10
- package/lib/api/agentd.js +12 -7
- package/lib/api/amid.js +12 -7
- package/lib/api/application.js +12 -7
- package/lib/api/auth.js +12 -7
- package/lib/api/call-logd.js +12 -7
- package/lib/api/calld.js +12 -7
- package/lib/api/chatd.js +12 -7
- package/lib/api/confd.js +12 -7
- package/lib/api/ctid-ng.js +12 -7
- package/lib/api/dird.js +12 -7
- package/lib/api/webhookd.js +12 -7
- package/lib/api-client.js +12 -7
- package/lib/checker/Checker.js +18 -11
- package/lib/checker/checks/aor.js +12 -7
- package/lib/checker/checks/api.js +12 -7
- package/lib/checker/checks/index.js +18 -11
- package/lib/checker/checks/wazo-websocket.js +13 -8
- package/lib/checker/checks/webrtc-transport.js +17 -10
- package/lib/checker/checks/webrtc.js +17 -10
- package/lib/domain/AdHocAPIConference.js +12 -7
- package/lib/domain/Features.js +12 -7
- package/lib/domain/Phone/CTIPhone.js +12 -7
- package/lib/domain/Phone/WebRTCPhone.js +12 -7
- package/lib/index.js +347 -11
- package/lib/lib/WazoSessionDescriptionHandler.js +12 -7
- package/lib/service/CallApi.js +12 -7
- package/lib/service/IssueReporter.js +12 -7
- package/lib/service/__tests__/IssueReporter.test.js +18 -7
- package/lib/service/getApiClient.js +12 -7
- package/lib/simple/Auth.js +347 -11
- package/lib/simple/Configuration.js +347 -11
- package/lib/simple/Directory.js +12 -7
- package/lib/simple/Phone.js +347 -11
- package/lib/simple/Softphone.js +331 -0
- package/lib/simple/Websocket.js +13 -8
- package/lib/simple/index.js +347 -11
- package/lib/simple/room/LocalParticipant.js +347 -11
- package/lib/simple/room/Participant.js +347 -11
- package/lib/simple/room/RemoteParticipant.js +347 -11
- package/lib/simple/room/Room.js +347 -11
- package/lib/simple/room/SipRoom.js +347 -11
- package/lib/simple/room/Stream.js +347 -11
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +347 -11
- package/lib/simple/utils.js +347 -11
- package/lib/utils/__tests__/api-requester.test.js +12 -7
- package/lib/utils/api-requester.js +12 -7
- package/lib/web-rtc-client.js +17 -10
- package/lib/websocket-client.js +13 -8
- package/package.json +1 -1
- package/src/service/IssueReporter.js +12 -7
- package/src/service/__tests__/IssueReporter.test.js +6 -0
- package/src/simple/Softphone.js +327 -0
- package/src/simple/index.js +2 -0
- package/src/web-rtc-client.js +5 -3
- package/src/websocket-client.js +1 -1
package/lib/api/amid.js
CHANGED
|
@@ -337,13 +337,9 @@ class IssueReporter {
|
|
|
337
337
|
|
|
338
338
|
setTimeout(() => {
|
|
339
339
|
if (isArray) {
|
|
340
|
-
payload = payload.map(message =>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
});
|
|
344
|
-
} else {
|
|
345
|
-
// $FlowFixMe
|
|
346
|
-
payload._retry = retry + 1;
|
|
340
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
341
|
+
} else if (payload && typeof payload === 'object') {
|
|
342
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
347
343
|
}
|
|
348
344
|
|
|
349
345
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -351,6 +347,15 @@ class IssueReporter {
|
|
|
351
347
|
});
|
|
352
348
|
}
|
|
353
349
|
|
|
350
|
+
_writeRetryCount(message , count ) {
|
|
351
|
+
if (message && typeof message === 'object') {
|
|
352
|
+
// $FlowFixMe
|
|
353
|
+
message._retry = count;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return message;
|
|
357
|
+
}
|
|
358
|
+
|
|
354
359
|
_isLevelAbove(level1 , level2 ) {
|
|
355
360
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
356
361
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/application.js
CHANGED
|
@@ -398,13 +398,9 @@ class IssueReporter {
|
|
|
398
398
|
|
|
399
399
|
setTimeout(() => {
|
|
400
400
|
if (isArray) {
|
|
401
|
-
payload = payload.map(message =>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
});
|
|
405
|
-
} else {
|
|
406
|
-
// $FlowFixMe
|
|
407
|
-
payload._retry = retry + 1;
|
|
401
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
402
|
+
} else if (payload && typeof payload === 'object') {
|
|
403
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
408
404
|
}
|
|
409
405
|
|
|
410
406
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -412,6 +408,15 @@ class IssueReporter {
|
|
|
412
408
|
});
|
|
413
409
|
}
|
|
414
410
|
|
|
411
|
+
_writeRetryCount(message , count ) {
|
|
412
|
+
if (message && typeof message === 'object') {
|
|
413
|
+
// $FlowFixMe
|
|
414
|
+
message._retry = count;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return message;
|
|
418
|
+
}
|
|
419
|
+
|
|
415
420
|
_isLevelAbove(level1 , level2 ) {
|
|
416
421
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
417
422
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/auth.js
CHANGED
|
@@ -401,13 +401,9 @@ class IssueReporter {
|
|
|
401
401
|
|
|
402
402
|
setTimeout(() => {
|
|
403
403
|
if (isArray) {
|
|
404
|
-
payload = payload.map(message =>
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
});
|
|
408
|
-
} else {
|
|
409
|
-
// $FlowFixMe
|
|
410
|
-
payload._retry = retry + 1;
|
|
404
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
405
|
+
} else if (payload && typeof payload === 'object') {
|
|
406
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
411
407
|
}
|
|
412
408
|
|
|
413
409
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -415,6 +411,15 @@ class IssueReporter {
|
|
|
415
411
|
});
|
|
416
412
|
}
|
|
417
413
|
|
|
414
|
+
_writeRetryCount(message , count ) {
|
|
415
|
+
if (message && typeof message === 'object') {
|
|
416
|
+
// $FlowFixMe
|
|
417
|
+
message._retry = count;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
return message;
|
|
421
|
+
}
|
|
422
|
+
|
|
418
423
|
_isLevelAbove(level1 , level2 ) {
|
|
419
424
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
420
425
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/call-logd.js
CHANGED
|
@@ -338,13 +338,9 @@ class IssueReporter {
|
|
|
338
338
|
|
|
339
339
|
setTimeout(() => {
|
|
340
340
|
if (isArray) {
|
|
341
|
-
payload = payload.map(message =>
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
});
|
|
345
|
-
} else {
|
|
346
|
-
// $FlowFixMe
|
|
347
|
-
payload._retry = retry + 1;
|
|
341
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
342
|
+
} else if (payload && typeof payload === 'object') {
|
|
343
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
348
344
|
}
|
|
349
345
|
|
|
350
346
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -352,6 +348,15 @@ class IssueReporter {
|
|
|
352
348
|
});
|
|
353
349
|
}
|
|
354
350
|
|
|
351
|
+
_writeRetryCount(message , count ) {
|
|
352
|
+
if (message && typeof message === 'object') {
|
|
353
|
+
// $FlowFixMe
|
|
354
|
+
message._retry = count;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return message;
|
|
358
|
+
}
|
|
359
|
+
|
|
355
360
|
_isLevelAbove(level1 , level2 ) {
|
|
356
361
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
357
362
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/calld.js
CHANGED
|
@@ -399,13 +399,9 @@ class IssueReporter {
|
|
|
399
399
|
|
|
400
400
|
setTimeout(() => {
|
|
401
401
|
if (isArray) {
|
|
402
|
-
payload = payload.map(message =>
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
});
|
|
406
|
-
} else {
|
|
407
|
-
// $FlowFixMe
|
|
408
|
-
payload._retry = retry + 1;
|
|
402
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
403
|
+
} else if (payload && typeof payload === 'object') {
|
|
404
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
409
405
|
}
|
|
410
406
|
|
|
411
407
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -413,6 +409,15 @@ class IssueReporter {
|
|
|
413
409
|
});
|
|
414
410
|
}
|
|
415
411
|
|
|
412
|
+
_writeRetryCount(message , count ) {
|
|
413
|
+
if (message && typeof message === 'object') {
|
|
414
|
+
// $FlowFixMe
|
|
415
|
+
message._retry = count;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return message;
|
|
419
|
+
}
|
|
420
|
+
|
|
416
421
|
_isLevelAbove(level1 , level2 ) {
|
|
417
422
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
418
423
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/chatd.js
CHANGED
|
@@ -398,13 +398,9 @@ class IssueReporter {
|
|
|
398
398
|
|
|
399
399
|
setTimeout(() => {
|
|
400
400
|
if (isArray) {
|
|
401
|
-
payload = payload.map(message =>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
});
|
|
405
|
-
} else {
|
|
406
|
-
// $FlowFixMe
|
|
407
|
-
payload._retry = retry + 1;
|
|
401
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
402
|
+
} else if (payload && typeof payload === 'object') {
|
|
403
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
408
404
|
}
|
|
409
405
|
|
|
410
406
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -412,6 +408,15 @@ class IssueReporter {
|
|
|
412
408
|
});
|
|
413
409
|
}
|
|
414
410
|
|
|
411
|
+
_writeRetryCount(message , count ) {
|
|
412
|
+
if (message && typeof message === 'object') {
|
|
413
|
+
// $FlowFixMe
|
|
414
|
+
message._retry = count;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return message;
|
|
418
|
+
}
|
|
419
|
+
|
|
415
420
|
_isLevelAbove(level1 , level2 ) {
|
|
416
421
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
417
422
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/confd.js
CHANGED
|
@@ -398,13 +398,9 @@ class IssueReporter {
|
|
|
398
398
|
|
|
399
399
|
setTimeout(() => {
|
|
400
400
|
if (isArray) {
|
|
401
|
-
payload = payload.map(message =>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
});
|
|
405
|
-
} else {
|
|
406
|
-
// $FlowFixMe
|
|
407
|
-
payload._retry = retry + 1;
|
|
401
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
402
|
+
} else if (payload && typeof payload === 'object') {
|
|
403
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
408
404
|
}
|
|
409
405
|
|
|
410
406
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -412,6 +408,15 @@ class IssueReporter {
|
|
|
412
408
|
});
|
|
413
409
|
}
|
|
414
410
|
|
|
411
|
+
_writeRetryCount(message , count ) {
|
|
412
|
+
if (message && typeof message === 'object') {
|
|
413
|
+
// $FlowFixMe
|
|
414
|
+
message._retry = count;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return message;
|
|
418
|
+
}
|
|
419
|
+
|
|
415
420
|
_isLevelAbove(level1 , level2 ) {
|
|
416
421
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
417
422
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/ctid-ng.js
CHANGED
|
@@ -402,13 +402,9 @@ class IssueReporter {
|
|
|
402
402
|
|
|
403
403
|
setTimeout(() => {
|
|
404
404
|
if (isArray) {
|
|
405
|
-
payload = payload.map(message =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
});
|
|
409
|
-
} else {
|
|
410
|
-
// $FlowFixMe
|
|
411
|
-
payload._retry = retry + 1;
|
|
405
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
406
|
+
} else if (payload && typeof payload === 'object') {
|
|
407
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
412
408
|
}
|
|
413
409
|
|
|
414
410
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -416,6 +412,15 @@ class IssueReporter {
|
|
|
416
412
|
});
|
|
417
413
|
}
|
|
418
414
|
|
|
415
|
+
_writeRetryCount(message , count ) {
|
|
416
|
+
if (message && typeof message === 'object') {
|
|
417
|
+
// $FlowFixMe
|
|
418
|
+
message._retry = count;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return message;
|
|
422
|
+
}
|
|
423
|
+
|
|
419
424
|
_isLevelAbove(level1 , level2 ) {
|
|
420
425
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
421
426
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/dird.js
CHANGED
|
@@ -400,13 +400,9 @@ class IssueReporter {
|
|
|
400
400
|
|
|
401
401
|
setTimeout(() => {
|
|
402
402
|
if (isArray) {
|
|
403
|
-
payload = payload.map(message =>
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
});
|
|
407
|
-
} else {
|
|
408
|
-
// $FlowFixMe
|
|
409
|
-
payload._retry = retry + 1;
|
|
403
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
404
|
+
} else if (payload && typeof payload === 'object') {
|
|
405
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
410
406
|
}
|
|
411
407
|
|
|
412
408
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -414,6 +410,15 @@ class IssueReporter {
|
|
|
414
410
|
});
|
|
415
411
|
}
|
|
416
412
|
|
|
413
|
+
_writeRetryCount(message , count ) {
|
|
414
|
+
if (message && typeof message === 'object') {
|
|
415
|
+
// $FlowFixMe
|
|
416
|
+
message._retry = count;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return message;
|
|
420
|
+
}
|
|
421
|
+
|
|
417
422
|
_isLevelAbove(level1 , level2 ) {
|
|
418
423
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
419
424
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api/webhookd.js
CHANGED
|
@@ -337,13 +337,9 @@ class IssueReporter {
|
|
|
337
337
|
|
|
338
338
|
setTimeout(() => {
|
|
339
339
|
if (isArray) {
|
|
340
|
-
payload = payload.map(message =>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
});
|
|
344
|
-
} else {
|
|
345
|
-
// $FlowFixMe
|
|
346
|
-
payload._retry = retry + 1;
|
|
340
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
341
|
+
} else if (payload && typeof payload === 'object') {
|
|
342
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
347
343
|
}
|
|
348
344
|
|
|
349
345
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -351,6 +347,15 @@ class IssueReporter {
|
|
|
351
347
|
});
|
|
352
348
|
}
|
|
353
349
|
|
|
350
|
+
_writeRetryCount(message , count ) {
|
|
351
|
+
if (message && typeof message === 'object') {
|
|
352
|
+
// $FlowFixMe
|
|
353
|
+
message._retry = count;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return message;
|
|
357
|
+
}
|
|
358
|
+
|
|
354
359
|
_isLevelAbove(level1 , level2 ) {
|
|
355
360
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
356
361
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/api-client.js
CHANGED
|
@@ -402,13 +402,9 @@ class IssueReporter {
|
|
|
402
402
|
|
|
403
403
|
setTimeout(() => {
|
|
404
404
|
if (isArray) {
|
|
405
|
-
payload = payload.map(message =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
});
|
|
409
|
-
} else {
|
|
410
|
-
// $FlowFixMe
|
|
411
|
-
payload._retry = retry + 1;
|
|
405
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
406
|
+
} else if (payload && typeof payload === 'object') {
|
|
407
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
412
408
|
}
|
|
413
409
|
|
|
414
410
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -416,6 +412,15 @@ class IssueReporter {
|
|
|
416
412
|
});
|
|
417
413
|
}
|
|
418
414
|
|
|
415
|
+
_writeRetryCount(message , count ) {
|
|
416
|
+
if (message && typeof message === 'object') {
|
|
417
|
+
// $FlowFixMe
|
|
418
|
+
message._retry = count;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return message;
|
|
422
|
+
}
|
|
423
|
+
|
|
419
424
|
_isLevelAbove(level1 , level2 ) {
|
|
420
425
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
421
426
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/lib/checker/Checker.js
CHANGED
|
@@ -424,13 +424,9 @@ class IssueReporter {
|
|
|
424
424
|
|
|
425
425
|
setTimeout(() => {
|
|
426
426
|
if (isArray) {
|
|
427
|
-
payload = payload.map(message =>
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
});
|
|
431
|
-
} else {
|
|
432
|
-
// $FlowFixMe
|
|
433
|
-
payload._retry = retry + 1;
|
|
427
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
428
|
+
} else if (payload && typeof payload === 'object') {
|
|
429
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
434
430
|
}
|
|
435
431
|
|
|
436
432
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -438,6 +434,15 @@ class IssueReporter {
|
|
|
438
434
|
});
|
|
439
435
|
}
|
|
440
436
|
|
|
437
|
+
_writeRetryCount(message , count ) {
|
|
438
|
+
if (message && typeof message === 'object') {
|
|
439
|
+
// $FlowFixMe
|
|
440
|
+
message._retry = count;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return message;
|
|
444
|
+
}
|
|
445
|
+
|
|
441
446
|
_isLevelAbove(level1 , level2 ) {
|
|
442
447
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
443
448
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -5317,7 +5322,7 @@ class WebSocketClient extends Emitter {
|
|
|
5317
5322
|
this.close();
|
|
5318
5323
|
}
|
|
5319
5324
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
5320
|
-
logger$2.
|
|
5325
|
+
logger$2.info('Wazo WS url computed to reconnect', { url });
|
|
5321
5326
|
|
|
5322
5327
|
return url;
|
|
5323
5328
|
}
|
|
@@ -6697,8 +6702,10 @@ class WebRTCClient extends Emitter {
|
|
|
6697
6702
|
conference: isConference,
|
|
6698
6703
|
};
|
|
6699
6704
|
|
|
6700
|
-
// Avoid sdh to
|
|
6701
|
-
session.sessionDescriptionHandler
|
|
6705
|
+
// Avoid sdh to create a new stream
|
|
6706
|
+
if (session.sessionDescriptionHandler) {
|
|
6707
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6708
|
+
}
|
|
6702
6709
|
|
|
6703
6710
|
// Send re-INVITE
|
|
6704
6711
|
return session.invite(options);
|
|
@@ -7541,7 +7548,7 @@ class WebRTCClient extends Emitter {
|
|
|
7541
7548
|
}
|
|
7542
7549
|
|
|
7543
7550
|
async _onHeartbeatTimeout() {
|
|
7544
|
-
logger$1.
|
|
7551
|
+
logger$1.warn('sdk webrtc heartbeat timed out', { userAgent: !!this.userAgent, cb: !!this.heartbeatTimeoutCb });
|
|
7545
7552
|
|
|
7546
7553
|
if (this.heartbeatTimeoutCb) {
|
|
7547
7554
|
this.heartbeatTimeoutCb();
|
|
@@ -402,13 +402,9 @@ class IssueReporter {
|
|
|
402
402
|
|
|
403
403
|
setTimeout(() => {
|
|
404
404
|
if (isArray) {
|
|
405
|
-
payload = payload.map(message =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
});
|
|
409
|
-
} else {
|
|
410
|
-
// $FlowFixMe
|
|
411
|
-
payload._retry = retry + 1;
|
|
405
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
406
|
+
} else if (payload && typeof payload === 'object') {
|
|
407
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
412
408
|
}
|
|
413
409
|
|
|
414
410
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -416,6 +412,15 @@ class IssueReporter {
|
|
|
416
412
|
});
|
|
417
413
|
}
|
|
418
414
|
|
|
415
|
+
_writeRetryCount(message , count ) {
|
|
416
|
+
if (message && typeof message === 'object') {
|
|
417
|
+
// $FlowFixMe
|
|
418
|
+
message._retry = count;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return message;
|
|
422
|
+
}
|
|
423
|
+
|
|
419
424
|
_isLevelAbove(level1 , level2 ) {
|
|
420
425
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
421
426
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -402,13 +402,9 @@ class IssueReporter {
|
|
|
402
402
|
|
|
403
403
|
setTimeout(() => {
|
|
404
404
|
if (isArray) {
|
|
405
|
-
payload = payload.map(message =>
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
});
|
|
409
|
-
} else {
|
|
410
|
-
// $FlowFixMe
|
|
411
|
-
payload._retry = retry + 1;
|
|
405
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
406
|
+
} else if (payload && typeof payload === 'object') {
|
|
407
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
412
408
|
}
|
|
413
409
|
|
|
414
410
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -416,6 +412,15 @@ class IssueReporter {
|
|
|
416
412
|
});
|
|
417
413
|
}
|
|
418
414
|
|
|
415
|
+
_writeRetryCount(message , count ) {
|
|
416
|
+
if (message && typeof message === 'object') {
|
|
417
|
+
// $FlowFixMe
|
|
418
|
+
message._retry = count;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return message;
|
|
422
|
+
}
|
|
423
|
+
|
|
419
424
|
_isLevelAbove(level1 , level2 ) {
|
|
420
425
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
421
426
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -424,13 +424,9 @@ class IssueReporter {
|
|
|
424
424
|
|
|
425
425
|
setTimeout(() => {
|
|
426
426
|
if (isArray) {
|
|
427
|
-
payload = payload.map(message =>
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
});
|
|
431
|
-
} else {
|
|
432
|
-
// $FlowFixMe
|
|
433
|
-
payload._retry = retry + 1;
|
|
427
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
428
|
+
} else if (payload && typeof payload === 'object') {
|
|
429
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
434
430
|
}
|
|
435
431
|
|
|
436
432
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -438,6 +434,15 @@ class IssueReporter {
|
|
|
438
434
|
});
|
|
439
435
|
}
|
|
440
436
|
|
|
437
|
+
_writeRetryCount(message , count ) {
|
|
438
|
+
if (message && typeof message === 'object') {
|
|
439
|
+
// $FlowFixMe
|
|
440
|
+
message._retry = count;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return message;
|
|
444
|
+
}
|
|
445
|
+
|
|
441
446
|
_isLevelAbove(level1 , level2 ) {
|
|
442
447
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
443
448
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -5317,7 +5322,7 @@ class WebSocketClient extends Emitter {
|
|
|
5317
5322
|
this.close();
|
|
5318
5323
|
}
|
|
5319
5324
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
5320
|
-
logger$1.
|
|
5325
|
+
logger$1.info('Wazo WS url computed to reconnect', { url });
|
|
5321
5326
|
|
|
5322
5327
|
return url;
|
|
5323
5328
|
}
|
|
@@ -6697,8 +6702,10 @@ class WebRTCClient extends Emitter {
|
|
|
6697
6702
|
conference: isConference,
|
|
6698
6703
|
};
|
|
6699
6704
|
|
|
6700
|
-
// Avoid sdh to
|
|
6701
|
-
session.sessionDescriptionHandler
|
|
6705
|
+
// Avoid sdh to create a new stream
|
|
6706
|
+
if (session.sessionDescriptionHandler) {
|
|
6707
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6708
|
+
}
|
|
6702
6709
|
|
|
6703
6710
|
// Send re-INVITE
|
|
6704
6711
|
return session.invite(options);
|
|
@@ -7541,7 +7548,7 @@ class WebRTCClient extends Emitter {
|
|
|
7541
7548
|
}
|
|
7542
7549
|
|
|
7543
7550
|
async _onHeartbeatTimeout() {
|
|
7544
|
-
logger.
|
|
7551
|
+
logger.warn('sdk webrtc heartbeat timed out', { userAgent: !!this.userAgent, cb: !!this.heartbeatTimeoutCb });
|
|
7545
7552
|
|
|
7546
7553
|
if (this.heartbeatTimeoutCb) {
|
|
7547
7554
|
this.heartbeatTimeoutCb();
|
|
@@ -395,13 +395,9 @@ class IssueReporter {
|
|
|
395
395
|
|
|
396
396
|
setTimeout(() => {
|
|
397
397
|
if (isArray) {
|
|
398
|
-
payload = payload.map(message =>
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
});
|
|
402
|
-
} else {
|
|
403
|
-
// $FlowFixMe
|
|
404
|
-
payload._retry = retry + 1;
|
|
398
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
399
|
+
} else if (payload && typeof payload === 'object') {
|
|
400
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
405
401
|
}
|
|
406
402
|
|
|
407
403
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -409,6 +405,15 @@ class IssueReporter {
|
|
|
409
405
|
});
|
|
410
406
|
}
|
|
411
407
|
|
|
408
|
+
_writeRetryCount(message , count ) {
|
|
409
|
+
if (message && typeof message === 'object') {
|
|
410
|
+
// $FlowFixMe
|
|
411
|
+
message._retry = count;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return message;
|
|
415
|
+
}
|
|
416
|
+
|
|
412
417
|
_isLevelAbove(level1 , level2 ) {
|
|
413
418
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
414
419
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -869,7 +874,7 @@ class WebSocketClient extends Emitter {
|
|
|
869
874
|
this.close();
|
|
870
875
|
}
|
|
871
876
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
872
|
-
logger.
|
|
877
|
+
logger.info('Wazo WS url computed to reconnect', { url });
|
|
873
878
|
|
|
874
879
|
return url;
|
|
875
880
|
}
|
|
@@ -687,13 +687,9 @@ class IssueReporter {
|
|
|
687
687
|
|
|
688
688
|
setTimeout(() => {
|
|
689
689
|
if (isArray) {
|
|
690
|
-
payload = payload.map(message =>
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
});
|
|
694
|
-
} else {
|
|
695
|
-
// $FlowFixMe
|
|
696
|
-
payload._retry = retry + 1;
|
|
690
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
691
|
+
} else if (payload && typeof payload === 'object') {
|
|
692
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
697
693
|
}
|
|
698
694
|
|
|
699
695
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -701,6 +697,15 @@ class IssueReporter {
|
|
|
701
697
|
});
|
|
702
698
|
}
|
|
703
699
|
|
|
700
|
+
_writeRetryCount(message , count ) {
|
|
701
|
+
if (message && typeof message === 'object') {
|
|
702
|
+
// $FlowFixMe
|
|
703
|
+
message._retry = count;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
return message;
|
|
707
|
+
}
|
|
708
|
+
|
|
704
709
|
_isLevelAbove(level1 , level2 ) {
|
|
705
710
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
706
711
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -6111,8 +6116,10 @@ class WebRTCClient extends Emitter {
|
|
|
6111
6116
|
conference: isConference,
|
|
6112
6117
|
};
|
|
6113
6118
|
|
|
6114
|
-
// Avoid sdh to
|
|
6115
|
-
session.sessionDescriptionHandler
|
|
6119
|
+
// Avoid sdh to create a new stream
|
|
6120
|
+
if (session.sessionDescriptionHandler) {
|
|
6121
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6122
|
+
}
|
|
6116
6123
|
|
|
6117
6124
|
// Send re-INVITE
|
|
6118
6125
|
return session.invite(options);
|
|
@@ -6955,7 +6962,7 @@ class WebRTCClient extends Emitter {
|
|
|
6955
6962
|
}
|
|
6956
6963
|
|
|
6957
6964
|
async _onHeartbeatTimeout() {
|
|
6958
|
-
logger.
|
|
6965
|
+
logger.warn('sdk webrtc heartbeat timed out', { userAgent: !!this.userAgent, cb: !!this.heartbeatTimeoutCb });
|
|
6959
6966
|
|
|
6960
6967
|
if (this.heartbeatTimeoutCb) {
|
|
6961
6968
|
this.heartbeatTimeoutCb();
|