@wazo/sdk 0.37.42 → 0.37.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wazo-sdk.js +3 -3
- package/esm/__tests__/api-client.test.js +12 -7
- package/esm/__tests__/web-rtc-client.test.js +16 -9
- 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 +17 -10
- package/esm/checker/checks/aor.js +12 -7
- package/esm/checker/checks/api.js +12 -7
- package/esm/checker/checks/index.js +17 -10
- package/esm/checker/checks/wazo-websocket.js +13 -8
- package/esm/checker/checks/webrtc-transport.js +16 -9
- package/esm/checker/checks/webrtc.js +16 -9
- 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 +17 -10
- 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 +17 -10
- package/esm/simple/Configuration.js +17 -10
- package/esm/simple/Directory.js +12 -7
- package/esm/simple/Phone.js +17 -10
- package/esm/simple/Websocket.js +13 -8
- package/esm/simple/index.js +17 -10
- package/esm/simple/room/LocalParticipant.js +17 -10
- package/esm/simple/room/Participant.js +17 -10
- package/esm/simple/room/RemoteParticipant.js +17 -10
- package/esm/simple/room/Room.js +17 -10
- package/esm/simple/room/SipRoom.js +17 -10
- package/esm/simple/room/Stream.js +17 -10
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +17 -10
- package/esm/simple/utils.js +17 -10
- package/esm/utils/__tests__/api-requester.test.js +12 -7
- package/esm/utils/api-requester.js +12 -7
- package/esm/web-rtc-client.js +16 -9
- package/esm/websocket-client.js +13 -8
- package/lib/__tests__/api-client.test.js +12 -7
- package/lib/__tests__/web-rtc-client.test.js +16 -9
- 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 +17 -10
- package/lib/checker/checks/aor.js +12 -7
- package/lib/checker/checks/api.js +12 -7
- package/lib/checker/checks/index.js +17 -10
- package/lib/checker/checks/wazo-websocket.js +13 -8
- package/lib/checker/checks/webrtc-transport.js +16 -9
- package/lib/checker/checks/webrtc.js +16 -9
- 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 +17 -10
- 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 +17 -10
- package/lib/simple/Configuration.js +17 -10
- package/lib/simple/Directory.js +12 -7
- package/lib/simple/Phone.js +17 -10
- package/lib/simple/Websocket.js +13 -8
- package/lib/simple/index.js +17 -10
- package/lib/simple/room/LocalParticipant.js +17 -10
- package/lib/simple/room/Participant.js +17 -10
- package/lib/simple/room/RemoteParticipant.js +17 -10
- package/lib/simple/room/Room.js +17 -10
- package/lib/simple/room/SipRoom.js +17 -10
- package/lib/simple/room/Stream.js +17 -10
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +17 -10
- package/lib/simple/utils.js +17 -10
- package/lib/utils/__tests__/api-requester.test.js +12 -7
- package/lib/utils/api-requester.js +12 -7
- package/lib/web-rtc-client.js +16 -9
- 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/web-rtc-client.js +4 -2
- package/src/websocket-client.js +1 -1
package/esm/web-rtc-client.js
CHANGED
|
@@ -678,13 +678,9 @@ class IssueReporter {
|
|
|
678
678
|
|
|
679
679
|
setTimeout(() => {
|
|
680
680
|
if (isArray) {
|
|
681
|
-
payload = payload.map(message =>
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
});
|
|
685
|
-
} else {
|
|
686
|
-
// $FlowFixMe
|
|
687
|
-
payload._retry = retry + 1;
|
|
681
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
682
|
+
} else if (payload && typeof payload === 'object') {
|
|
683
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
688
684
|
}
|
|
689
685
|
|
|
690
686
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -692,6 +688,15 @@ class IssueReporter {
|
|
|
692
688
|
});
|
|
693
689
|
}
|
|
694
690
|
|
|
691
|
+
_writeRetryCount(message , count ) {
|
|
692
|
+
if (message && typeof message === 'object') {
|
|
693
|
+
// $FlowFixMe
|
|
694
|
+
message._retry = count;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
return message;
|
|
698
|
+
}
|
|
699
|
+
|
|
695
700
|
_isLevelAbove(level1 , level2 ) {
|
|
696
701
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
697
702
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -6105,8 +6110,10 @@ class WebRTCClient extends Emitter {
|
|
|
6105
6110
|
conference: isConference,
|
|
6106
6111
|
};
|
|
6107
6112
|
|
|
6108
|
-
// Avoid sdh to
|
|
6109
|
-
session.sessionDescriptionHandler
|
|
6113
|
+
// Avoid sdh to create a new stream
|
|
6114
|
+
if (session.sessionDescriptionHandler) {
|
|
6115
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6116
|
+
}
|
|
6110
6117
|
|
|
6111
6118
|
// Send re-INVITE
|
|
6112
6119
|
return session.invite(options);
|
package/esm/websocket-client.js
CHANGED
|
@@ -387,13 +387,9 @@ class IssueReporter {
|
|
|
387
387
|
|
|
388
388
|
setTimeout(() => {
|
|
389
389
|
if (isArray) {
|
|
390
|
-
payload = payload.map(message =>
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
});
|
|
394
|
-
} else {
|
|
395
|
-
// $FlowFixMe
|
|
396
|
-
payload._retry = retry + 1;
|
|
390
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
391
|
+
} else if (payload && typeof payload === 'object') {
|
|
392
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
397
393
|
}
|
|
398
394
|
|
|
399
395
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -401,6 +397,15 @@ class IssueReporter {
|
|
|
401
397
|
});
|
|
402
398
|
}
|
|
403
399
|
|
|
400
|
+
_writeRetryCount(message , count ) {
|
|
401
|
+
if (message && typeof message === 'object') {
|
|
402
|
+
// $FlowFixMe
|
|
403
|
+
message._retry = count;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return message;
|
|
407
|
+
}
|
|
408
|
+
|
|
404
409
|
_isLevelAbove(level1 , level2 ) {
|
|
405
410
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
406
411
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -861,7 +866,7 @@ class WebSocketClient extends Emitter {
|
|
|
861
866
|
this.close();
|
|
862
867
|
}
|
|
863
868
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
864
|
-
logger.
|
|
869
|
+
logger.info('Wazo WS url computed to reconnect', { url });
|
|
865
870
|
|
|
866
871
|
return url;
|
|
867
872
|
}
|
|
@@ -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);
|
|
@@ -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);
|
package/lib/api/agentd.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/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);
|
|
@@ -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);
|