@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
|
@@ -396,13 +396,9 @@ class IssueReporter {
|
|
|
396
396
|
|
|
397
397
|
setTimeout(() => {
|
|
398
398
|
if (isArray) {
|
|
399
|
-
payload = payload.map(message =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
// $FlowFixMe
|
|
405
|
-
payload._retry = retry + 1;
|
|
399
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
400
|
+
} else if (payload && typeof payload === 'object') {
|
|
401
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
406
402
|
}
|
|
407
403
|
|
|
408
404
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -410,6 +406,15 @@ class IssueReporter {
|
|
|
410
406
|
});
|
|
411
407
|
}
|
|
412
408
|
|
|
409
|
+
_writeRetryCount(message , count ) {
|
|
410
|
+
if (message && typeof message === 'object') {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
message._retry = count;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
_isLevelAbove(level1 , level2 ) {
|
|
414
419
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
415
420
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -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);
|
|
@@ -6102,8 +6107,10 @@ class WebRTCClient extends Emitter {
|
|
|
6102
6107
|
conference: isConference,
|
|
6103
6108
|
};
|
|
6104
6109
|
|
|
6105
|
-
// Avoid sdh to
|
|
6106
|
-
session.sessionDescriptionHandler
|
|
6110
|
+
// Avoid sdh to create a new stream
|
|
6111
|
+
if (session.sessionDescriptionHandler) {
|
|
6112
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6113
|
+
}
|
|
6107
6114
|
|
|
6108
6115
|
// Send re-INVITE
|
|
6109
6116
|
return session.invite(options);
|
package/esm/api/agentd.js
CHANGED
|
@@ -392,13 +392,9 @@ class IssueReporter {
|
|
|
392
392
|
|
|
393
393
|
setTimeout(() => {
|
|
394
394
|
if (isArray) {
|
|
395
|
-
payload = payload.map(message =>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
// $FlowFixMe
|
|
401
|
-
payload._retry = retry + 1;
|
|
395
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
396
|
+
} else if (payload && typeof payload === 'object') {
|
|
397
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
402
398
|
}
|
|
403
399
|
|
|
404
400
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -406,6 +402,15 @@ class IssueReporter {
|
|
|
406
402
|
});
|
|
407
403
|
}
|
|
408
404
|
|
|
405
|
+
_writeRetryCount(message , count ) {
|
|
406
|
+
if (message && typeof message === 'object') {
|
|
407
|
+
// $FlowFixMe
|
|
408
|
+
message._retry = count;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return message;
|
|
412
|
+
}
|
|
413
|
+
|
|
409
414
|
_isLevelAbove(level1 , level2 ) {
|
|
410
415
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
411
416
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/amid.js
CHANGED
|
@@ -331,13 +331,9 @@ class IssueReporter {
|
|
|
331
331
|
|
|
332
332
|
setTimeout(() => {
|
|
333
333
|
if (isArray) {
|
|
334
|
-
payload = payload.map(message =>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
});
|
|
338
|
-
} else {
|
|
339
|
-
// $FlowFixMe
|
|
340
|
-
payload._retry = retry + 1;
|
|
334
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
335
|
+
} else if (payload && typeof payload === 'object') {
|
|
336
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
341
337
|
}
|
|
342
338
|
|
|
343
339
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -345,6 +341,15 @@ class IssueReporter {
|
|
|
345
341
|
});
|
|
346
342
|
}
|
|
347
343
|
|
|
344
|
+
_writeRetryCount(message , count ) {
|
|
345
|
+
if (message && typeof message === 'object') {
|
|
346
|
+
// $FlowFixMe
|
|
347
|
+
message._retry = count;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return message;
|
|
351
|
+
}
|
|
352
|
+
|
|
348
353
|
_isLevelAbove(level1 , level2 ) {
|
|
349
354
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
350
355
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/application.js
CHANGED
|
@@ -392,13 +392,9 @@ class IssueReporter {
|
|
|
392
392
|
|
|
393
393
|
setTimeout(() => {
|
|
394
394
|
if (isArray) {
|
|
395
|
-
payload = payload.map(message =>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
// $FlowFixMe
|
|
401
|
-
payload._retry = retry + 1;
|
|
395
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
396
|
+
} else if (payload && typeof payload === 'object') {
|
|
397
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
402
398
|
}
|
|
403
399
|
|
|
404
400
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -406,6 +402,15 @@ class IssueReporter {
|
|
|
406
402
|
});
|
|
407
403
|
}
|
|
408
404
|
|
|
405
|
+
_writeRetryCount(message , count ) {
|
|
406
|
+
if (message && typeof message === 'object') {
|
|
407
|
+
// $FlowFixMe
|
|
408
|
+
message._retry = count;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return message;
|
|
412
|
+
}
|
|
413
|
+
|
|
409
414
|
_isLevelAbove(level1 , level2 ) {
|
|
410
415
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
411
416
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/auth.js
CHANGED
|
@@ -393,13 +393,9 @@ class IssueReporter {
|
|
|
393
393
|
|
|
394
394
|
setTimeout(() => {
|
|
395
395
|
if (isArray) {
|
|
396
|
-
payload = payload.map(message =>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
});
|
|
400
|
-
} else {
|
|
401
|
-
// $FlowFixMe
|
|
402
|
-
payload._retry = retry + 1;
|
|
396
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
397
|
+
} else if (payload && typeof payload === 'object') {
|
|
398
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
403
399
|
}
|
|
404
400
|
|
|
405
401
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -407,6 +403,15 @@ class IssueReporter {
|
|
|
407
403
|
});
|
|
408
404
|
}
|
|
409
405
|
|
|
406
|
+
_writeRetryCount(message , count ) {
|
|
407
|
+
if (message && typeof message === 'object') {
|
|
408
|
+
// $FlowFixMe
|
|
409
|
+
message._retry = count;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return message;
|
|
413
|
+
}
|
|
414
|
+
|
|
410
415
|
_isLevelAbove(level1 , level2 ) {
|
|
411
416
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
412
417
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/call-logd.js
CHANGED
|
@@ -332,13 +332,9 @@ class IssueReporter {
|
|
|
332
332
|
|
|
333
333
|
setTimeout(() => {
|
|
334
334
|
if (isArray) {
|
|
335
|
-
payload = payload.map(message =>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
});
|
|
339
|
-
} else {
|
|
340
|
-
// $FlowFixMe
|
|
341
|
-
payload._retry = retry + 1;
|
|
335
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
336
|
+
} else if (payload && typeof payload === 'object') {
|
|
337
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
342
338
|
}
|
|
343
339
|
|
|
344
340
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -346,6 +342,15 @@ class IssueReporter {
|
|
|
346
342
|
});
|
|
347
343
|
}
|
|
348
344
|
|
|
345
|
+
_writeRetryCount(message , count ) {
|
|
346
|
+
if (message && typeof message === 'object') {
|
|
347
|
+
// $FlowFixMe
|
|
348
|
+
message._retry = count;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return message;
|
|
352
|
+
}
|
|
353
|
+
|
|
349
354
|
_isLevelAbove(level1 , level2 ) {
|
|
350
355
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
351
356
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/calld.js
CHANGED
|
@@ -393,13 +393,9 @@ class IssueReporter {
|
|
|
393
393
|
|
|
394
394
|
setTimeout(() => {
|
|
395
395
|
if (isArray) {
|
|
396
|
-
payload = payload.map(message =>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
});
|
|
400
|
-
} else {
|
|
401
|
-
// $FlowFixMe
|
|
402
|
-
payload._retry = retry + 1;
|
|
396
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
397
|
+
} else if (payload && typeof payload === 'object') {
|
|
398
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
403
399
|
}
|
|
404
400
|
|
|
405
401
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -407,6 +403,15 @@ class IssueReporter {
|
|
|
407
403
|
});
|
|
408
404
|
}
|
|
409
405
|
|
|
406
|
+
_writeRetryCount(message , count ) {
|
|
407
|
+
if (message && typeof message === 'object') {
|
|
408
|
+
// $FlowFixMe
|
|
409
|
+
message._retry = count;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return message;
|
|
413
|
+
}
|
|
414
|
+
|
|
410
415
|
_isLevelAbove(level1 , level2 ) {
|
|
411
416
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
412
417
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/chatd.js
CHANGED
|
@@ -392,13 +392,9 @@ class IssueReporter {
|
|
|
392
392
|
|
|
393
393
|
setTimeout(() => {
|
|
394
394
|
if (isArray) {
|
|
395
|
-
payload = payload.map(message =>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
// $FlowFixMe
|
|
401
|
-
payload._retry = retry + 1;
|
|
395
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
396
|
+
} else if (payload && typeof payload === 'object') {
|
|
397
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
402
398
|
}
|
|
403
399
|
|
|
404
400
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -406,6 +402,15 @@ class IssueReporter {
|
|
|
406
402
|
});
|
|
407
403
|
}
|
|
408
404
|
|
|
405
|
+
_writeRetryCount(message , count ) {
|
|
406
|
+
if (message && typeof message === 'object') {
|
|
407
|
+
// $FlowFixMe
|
|
408
|
+
message._retry = count;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return message;
|
|
412
|
+
}
|
|
413
|
+
|
|
409
414
|
_isLevelAbove(level1 , level2 ) {
|
|
410
415
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
411
416
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/confd.js
CHANGED
|
@@ -392,13 +392,9 @@ class IssueReporter {
|
|
|
392
392
|
|
|
393
393
|
setTimeout(() => {
|
|
394
394
|
if (isArray) {
|
|
395
|
-
payload = payload.map(message =>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
// $FlowFixMe
|
|
401
|
-
payload._retry = retry + 1;
|
|
395
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
396
|
+
} else if (payload && typeof payload === 'object') {
|
|
397
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
402
398
|
}
|
|
403
399
|
|
|
404
400
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -406,6 +402,15 @@ class IssueReporter {
|
|
|
406
402
|
});
|
|
407
403
|
}
|
|
408
404
|
|
|
405
|
+
_writeRetryCount(message , count ) {
|
|
406
|
+
if (message && typeof message === 'object') {
|
|
407
|
+
// $FlowFixMe
|
|
408
|
+
message._retry = count;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return message;
|
|
412
|
+
}
|
|
413
|
+
|
|
409
414
|
_isLevelAbove(level1 , level2 ) {
|
|
410
415
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
411
416
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/ctid-ng.js
CHANGED
|
@@ -396,13 +396,9 @@ class IssueReporter {
|
|
|
396
396
|
|
|
397
397
|
setTimeout(() => {
|
|
398
398
|
if (isArray) {
|
|
399
|
-
payload = payload.map(message =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
// $FlowFixMe
|
|
405
|
-
payload._retry = retry + 1;
|
|
399
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
400
|
+
} else if (payload && typeof payload === 'object') {
|
|
401
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
406
402
|
}
|
|
407
403
|
|
|
408
404
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -410,6 +406,15 @@ class IssueReporter {
|
|
|
410
406
|
});
|
|
411
407
|
}
|
|
412
408
|
|
|
409
|
+
_writeRetryCount(message , count ) {
|
|
410
|
+
if (message && typeof message === 'object') {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
message._retry = count;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
_isLevelAbove(level1 , level2 ) {
|
|
414
419
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
415
420
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/dird.js
CHANGED
|
@@ -394,13 +394,9 @@ class IssueReporter {
|
|
|
394
394
|
|
|
395
395
|
setTimeout(() => {
|
|
396
396
|
if (isArray) {
|
|
397
|
-
payload = payload.map(message =>
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
});
|
|
401
|
-
} else {
|
|
402
|
-
// $FlowFixMe
|
|
403
|
-
payload._retry = retry + 1;
|
|
397
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
398
|
+
} else if (payload && typeof payload === 'object') {
|
|
399
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
404
400
|
}
|
|
405
401
|
|
|
406
402
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -408,6 +404,15 @@ class IssueReporter {
|
|
|
408
404
|
});
|
|
409
405
|
}
|
|
410
406
|
|
|
407
|
+
_writeRetryCount(message , count ) {
|
|
408
|
+
if (message && typeof message === 'object') {
|
|
409
|
+
// $FlowFixMe
|
|
410
|
+
message._retry = count;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return message;
|
|
414
|
+
}
|
|
415
|
+
|
|
411
416
|
_isLevelAbove(level1 , level2 ) {
|
|
412
417
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
413
418
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api/webhookd.js
CHANGED
|
@@ -331,13 +331,9 @@ class IssueReporter {
|
|
|
331
331
|
|
|
332
332
|
setTimeout(() => {
|
|
333
333
|
if (isArray) {
|
|
334
|
-
payload = payload.map(message =>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
});
|
|
338
|
-
} else {
|
|
339
|
-
// $FlowFixMe
|
|
340
|
-
payload._retry = retry + 1;
|
|
334
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
335
|
+
} else if (payload && typeof payload === 'object') {
|
|
336
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
341
337
|
}
|
|
342
338
|
|
|
343
339
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -345,6 +341,15 @@ class IssueReporter {
|
|
|
345
341
|
});
|
|
346
342
|
}
|
|
347
343
|
|
|
344
|
+
_writeRetryCount(message , count ) {
|
|
345
|
+
if (message && typeof message === 'object') {
|
|
346
|
+
// $FlowFixMe
|
|
347
|
+
message._retry = count;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return message;
|
|
351
|
+
}
|
|
352
|
+
|
|
348
353
|
_isLevelAbove(level1 , level2 ) {
|
|
349
354
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
350
355
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/api-client.js
CHANGED
|
@@ -396,13 +396,9 @@ class IssueReporter {
|
|
|
396
396
|
|
|
397
397
|
setTimeout(() => {
|
|
398
398
|
if (isArray) {
|
|
399
|
-
payload = payload.map(message =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
// $FlowFixMe
|
|
405
|
-
payload._retry = retry + 1;
|
|
399
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
400
|
+
} else if (payload && typeof payload === 'object') {
|
|
401
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
406
402
|
}
|
|
407
403
|
|
|
408
404
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -410,6 +406,15 @@ class IssueReporter {
|
|
|
410
406
|
});
|
|
411
407
|
}
|
|
412
408
|
|
|
409
|
+
_writeRetryCount(message , count ) {
|
|
410
|
+
if (message && typeof message === 'object') {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
message._retry = count;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
_isLevelAbove(level1 , level2 ) {
|
|
414
419
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
415
420
|
const index2 = LOG_LEVELS.indexOf(level2);
|
package/esm/checker/Checker.js
CHANGED
|
@@ -414,13 +414,9 @@ class IssueReporter {
|
|
|
414
414
|
|
|
415
415
|
setTimeout(() => {
|
|
416
416
|
if (isArray) {
|
|
417
|
-
payload = payload.map(message =>
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
});
|
|
421
|
-
} else {
|
|
422
|
-
// $FlowFixMe
|
|
423
|
-
payload._retry = retry + 1;
|
|
417
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
418
|
+
} else if (payload && typeof payload === 'object') {
|
|
419
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
424
420
|
}
|
|
425
421
|
|
|
426
422
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -428,6 +424,15 @@ class IssueReporter {
|
|
|
428
424
|
});
|
|
429
425
|
}
|
|
430
426
|
|
|
427
|
+
_writeRetryCount(message , count ) {
|
|
428
|
+
if (message && typeof message === 'object') {
|
|
429
|
+
// $FlowFixMe
|
|
430
|
+
message._retry = count;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return message;
|
|
434
|
+
}
|
|
435
|
+
|
|
431
436
|
_isLevelAbove(level1 , level2 ) {
|
|
432
437
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
433
438
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -5307,7 +5312,7 @@ class WebSocketClient extends Emitter {
|
|
|
5307
5312
|
this.close();
|
|
5308
5313
|
}
|
|
5309
5314
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
5310
|
-
logger$2.
|
|
5315
|
+
logger$2.info('Wazo WS url computed to reconnect', { url });
|
|
5311
5316
|
|
|
5312
5317
|
return url;
|
|
5313
5318
|
}
|
|
@@ -6687,8 +6692,10 @@ class WebRTCClient extends Emitter {
|
|
|
6687
6692
|
conference: isConference,
|
|
6688
6693
|
};
|
|
6689
6694
|
|
|
6690
|
-
// Avoid sdh to
|
|
6691
|
-
session.sessionDescriptionHandler
|
|
6695
|
+
// Avoid sdh to create a new stream
|
|
6696
|
+
if (session.sessionDescriptionHandler) {
|
|
6697
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6698
|
+
}
|
|
6692
6699
|
|
|
6693
6700
|
// Send re-INVITE
|
|
6694
6701
|
return session.invite(options);
|
|
@@ -396,13 +396,9 @@ class IssueReporter {
|
|
|
396
396
|
|
|
397
397
|
setTimeout(() => {
|
|
398
398
|
if (isArray) {
|
|
399
|
-
payload = payload.map(message =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
// $FlowFixMe
|
|
405
|
-
payload._retry = retry + 1;
|
|
399
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
400
|
+
} else if (payload && typeof payload === 'object') {
|
|
401
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
406
402
|
}
|
|
407
403
|
|
|
408
404
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -410,6 +406,15 @@ class IssueReporter {
|
|
|
410
406
|
});
|
|
411
407
|
}
|
|
412
408
|
|
|
409
|
+
_writeRetryCount(message , count ) {
|
|
410
|
+
if (message && typeof message === 'object') {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
message._retry = count;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
_isLevelAbove(level1 , level2 ) {
|
|
414
419
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
415
420
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -396,13 +396,9 @@ class IssueReporter {
|
|
|
396
396
|
|
|
397
397
|
setTimeout(() => {
|
|
398
398
|
if (isArray) {
|
|
399
|
-
payload = payload.map(message =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
} else {
|
|
404
|
-
// $FlowFixMe
|
|
405
|
-
payload._retry = retry + 1;
|
|
399
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
400
|
+
} else if (payload && typeof payload === 'object') {
|
|
401
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
406
402
|
}
|
|
407
403
|
|
|
408
404
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -410,6 +406,15 @@ class IssueReporter {
|
|
|
410
406
|
});
|
|
411
407
|
}
|
|
412
408
|
|
|
409
|
+
_writeRetryCount(message , count ) {
|
|
410
|
+
if (message && typeof message === 'object') {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
message._retry = count;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return message;
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
_isLevelAbove(level1 , level2 ) {
|
|
414
419
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
415
420
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -414,13 +414,9 @@ class IssueReporter {
|
|
|
414
414
|
|
|
415
415
|
setTimeout(() => {
|
|
416
416
|
if (isArray) {
|
|
417
|
-
payload = payload.map(message =>
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
});
|
|
421
|
-
} else {
|
|
422
|
-
// $FlowFixMe
|
|
423
|
-
payload._retry = retry + 1;
|
|
417
|
+
payload = payload.map(message => this._writeRetryCount(message, retry + 1));
|
|
418
|
+
} else if (payload && typeof payload === 'object') {
|
|
419
|
+
payload = this._writeRetryCount(payload, retry + 1);
|
|
424
420
|
}
|
|
425
421
|
|
|
426
422
|
this._sendDebugToGrafana(payload, retry + 1);
|
|
@@ -428,6 +424,15 @@ class IssueReporter {
|
|
|
428
424
|
});
|
|
429
425
|
}
|
|
430
426
|
|
|
427
|
+
_writeRetryCount(message , count ) {
|
|
428
|
+
if (message && typeof message === 'object') {
|
|
429
|
+
// $FlowFixMe
|
|
430
|
+
message._retry = count;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return message;
|
|
434
|
+
}
|
|
435
|
+
|
|
431
436
|
_isLevelAbove(level1 , level2 ) {
|
|
432
437
|
const index1 = LOG_LEVELS.indexOf(level1);
|
|
433
438
|
const index2 = LOG_LEVELS.indexOf(level2);
|
|
@@ -5307,7 +5312,7 @@ class WebSocketClient extends Emitter {
|
|
|
5307
5312
|
this.close();
|
|
5308
5313
|
}
|
|
5309
5314
|
const url = `wss://${this.host || ''}/api/websocketd/?token=${this.token || ''}&version=${this.version}`;
|
|
5310
|
-
logger$1.
|
|
5315
|
+
logger$1.info('Wazo WS url computed to reconnect', { url });
|
|
5311
5316
|
|
|
5312
5317
|
return url;
|
|
5313
5318
|
}
|
|
@@ -6687,8 +6692,10 @@ class WebRTCClient extends Emitter {
|
|
|
6687
6692
|
conference: isConference,
|
|
6688
6693
|
};
|
|
6689
6694
|
|
|
6690
|
-
// Avoid sdh to
|
|
6691
|
-
session.sessionDescriptionHandler
|
|
6695
|
+
// Avoid sdh to create a new stream
|
|
6696
|
+
if (session.sessionDescriptionHandler) {
|
|
6697
|
+
session.sessionDescriptionHandler.localMediaStreamConstraints = options.constraints;
|
|
6698
|
+
}
|
|
6692
6699
|
|
|
6693
6700
|
// Send re-INVITE
|
|
6694
6701
|
return session.invite(options);
|