@wazo/sdk 0.37.18 → 0.37.19
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 +13 -5
- package/esm/__tests__/api-client.test.js +9 -5
- package/esm/__tests__/web-rtc-client.test.js +10 -6
- package/esm/api/agentd.js +2 -2
- package/esm/api/amid.js +2 -2
- package/esm/api/application.js +2 -2
- package/esm/api/auth.js +4 -3
- package/esm/api/call-logd.js +4 -4
- package/esm/api/calld.js +2 -2
- package/esm/api/chatd.js +2 -2
- package/esm/api/confd.js +8 -4
- package/esm/api/ctid-ng.js +2 -2
- package/esm/api/dird.js +2 -2
- package/esm/api/webhookd.js +2 -2
- package/esm/api-client.js +11 -7
- package/esm/checker/Checker.js +11 -7
- package/esm/checker/checks/aor.js +11 -7
- package/esm/checker/checks/api.js +11 -7
- package/esm/checker/checks/ice-ipv4.js +1 -1
- package/esm/checker/checks/index.js +12 -8
- package/esm/checker/checks/symmetric-nat.js +1 -1
- package/esm/checker/checks/wazo-websocket.js +2 -2
- package/esm/checker/checks/webrtc-transport.js +12 -8
- package/esm/checker/checks/webrtc.js +12 -8
- package/esm/domain/AdHocAPIConference.js +11 -7
- package/esm/domain/Agent.js +1 -1
- package/esm/domain/BadResponse.js +1 -1
- package/esm/domain/Call.js +1 -1
- package/esm/domain/CallLog.js +3 -3
- package/esm/domain/CallSession.js +1 -1
- package/esm/domain/ChatMessage.js +1 -1
- package/esm/domain/ChatRoom.js +1 -1
- package/esm/domain/Contact.js +2 -1
- package/esm/domain/Country.js +1 -1
- package/esm/domain/Device/DebugDevice.js +1 -1
- package/esm/domain/ExternalApp.js +1 -1
- package/esm/domain/Features.js +11 -6
- package/esm/domain/ForwardOption.js +2 -1
- package/esm/domain/IndirectTransfer.js +1 -1
- package/esm/domain/Line.js +1 -1
- package/esm/domain/Meeting.js +7 -3
- package/esm/domain/NotificationOptions.js +1 -1
- package/esm/domain/Phone/CTIPhone.js +12 -7
- package/esm/domain/Phone/WebRTCPhone.js +3 -2
- package/esm/domain/Profile.js +2 -1
- package/esm/domain/Recording.js +2 -2
- package/esm/domain/Relocation.js +1 -1
- package/esm/domain/Room.js +1 -1
- package/esm/domain/ServerError.js +1 -1
- package/esm/domain/Session.js +2 -2
- package/esm/domain/SipLine.js +1 -1
- package/esm/domain/Subscription.js +1 -1
- package/esm/domain/SwitchboardCall.js +1 -1
- package/esm/domain/Voicemail.js +1 -1
- package/esm/domain/__tests__/CallLog.test.js +2 -2
- package/esm/index.js +12 -8
- package/esm/lib/WazoSessionDescriptionHandler.js +3 -2
- package/esm/service/CallApi.js +11 -7
- package/esm/service/IssueReporter.js +2 -2
- package/esm/service/__tests__/IssueReporter.test.js +1 -1
- package/esm/service/getApiClient.js +12 -7
- package/esm/simple/Auth.js +12 -7
- package/esm/simple/Configuration.js +11 -7
- package/esm/simple/Directory.js +10 -6
- package/esm/simple/Phone.js +11 -7
- package/esm/simple/Websocket.js +2 -2
- package/esm/simple/index.js +11 -7
- package/esm/simple/room/LocalParticipant.js +24 -24
- package/esm/simple/room/Participant.js +23 -21
- package/esm/simple/room/RemoteParticipant.js +25 -25
- package/esm/simple/room/Room.js +24 -21
- package/esm/simple/room/SipRoom.js +12 -10
- package/esm/simple/room/Stream.js +12 -10
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +10 -6
- package/esm/simple/utils.js +10 -6
- package/esm/utils/Emitter.js +1 -1
- package/esm/utils/Heartbeat.js +1 -1
- package/esm/utils/__tests__/api-requester.test.js +1 -1
- package/esm/utils/api-requester.js +3 -2
- package/esm/utils/compare-version.js +1 -1
- package/esm/utils/isMobile.js +1 -1
- package/esm/utils/new-from.js +1 -1
- package/esm/utils/once.js +1 -1
- package/esm/utils/update-from.js +1 -1
- package/esm/web-rtc-client.js +13 -8
- package/esm/websocket-client.js +3 -2
- package/lib/__tests__/api-client.test.js +18 -14
- package/lib/__tests__/web-rtc-client.test.js +27 -23
- package/lib/api/agentd.js +2 -2
- package/lib/api/amid.js +2 -2
- package/lib/api/application.js +2 -2
- package/lib/api/auth.js +3 -3
- package/lib/api/call-logd.js +9 -9
- package/lib/api/calld.js +5 -5
- package/lib/api/chatd.js +3 -3
- package/lib/api/confd.js +8 -4
- package/lib/api/ctid-ng.js +5 -5
- package/lib/api/dird.js +2 -2
- package/lib/api/webhookd.js +2 -2
- package/lib/api-client.js +18 -14
- package/lib/checker/Checker.js +28 -24
- package/lib/checker/checks/aor.js +18 -14
- package/lib/checker/checks/api.js +18 -14
- package/lib/checker/checks/index.js +28 -24
- package/lib/checker/checks/wazo-websocket.js +4 -4
- package/lib/checker/checks/webrtc-transport.js +27 -23
- package/lib/checker/checks/webrtc.js +27 -23
- package/lib/domain/AdHocAPIConference.js +18 -14
- package/lib/domain/Call.js +1 -1
- package/lib/domain/CallLog.js +7 -7
- package/lib/domain/ChatMessage.js +1 -1
- package/lib/domain/Contact.js +1 -1
- package/lib/domain/Features.js +19 -15
- package/lib/domain/ForwardOption.js +1 -1
- package/lib/domain/Meeting.js +6 -2
- package/lib/domain/Phone/CTIPhone.js +20 -16
- package/lib/domain/Phone/WebRTCPhone.js +4 -4
- package/lib/domain/Profile.js +1 -1
- package/lib/domain/Recording.js +3 -3
- package/lib/domain/Voicemail.js +1 -1
- package/lib/domain/__tests__/Call.test.js +1 -1
- package/lib/domain/__tests__/CallLog.test.js +13 -13
- package/lib/domain/__tests__/Voicemail.test.js +1 -1
- package/lib/index.js +31 -27
- package/lib/lib/WazoSessionDescriptionHandler.js +7 -7
- package/lib/service/CallApi.js +18 -14
- package/lib/service/IssueReporter.js +2 -2
- package/lib/service/__tests__/IssueReporter.test.js +2 -2
- package/lib/service/getApiClient.js +19 -15
- package/lib/simple/Auth.js +30 -26
- package/lib/simple/Configuration.js +29 -25
- package/lib/simple/Directory.js +18 -14
- package/lib/simple/Phone.js +29 -25
- package/lib/simple/Websocket.js +4 -4
- package/lib/simple/index.js +29 -25
- package/lib/simple/room/LocalParticipant.js +43 -43
- package/lib/simple/room/Participant.js +41 -39
- package/lib/simple/room/RemoteParticipant.js +44 -44
- package/lib/simple/room/Room.js +42 -40
- package/lib/simple/room/SipRoom.js +31 -29
- package/lib/simple/room/Stream.js +31 -29
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +29 -25
- package/lib/simple/utils.js +29 -25
- package/lib/utils/Emitter.js +1 -1
- package/lib/utils/PhoneNumberUtil.js +2 -2
- package/lib/utils/__tests__/PhoneNumberUtil.test.js +2 -2
- package/lib/utils/__tests__/api-requester.test.js +2 -2
- package/lib/utils/__tests__/sdp.test.js +12 -12
- package/lib/utils/api-requester.js +3 -3
- package/lib/utils/sdp.js +10 -10
- package/lib/web-rtc-client.js +28 -24
- package/lib/websocket-client.js +5 -5
- package/package.json +1 -1
- package/src/domain/CallLog.js +1 -1
- package/src/domain/Meeting.js +6 -2
- package/src/domain/Recording.js +1 -1
- package/src/service/IssueReporter.js +1 -1
- package/src/web-rtc-client.js +1 -1
|
@@ -1886,7 +1886,7 @@ class IssueReporter {
|
|
|
1886
1886
|
payload._retry = retry + 1;
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
|
-
this._sendDebugToGrafana(
|
|
1889
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
1890
1890
|
}, 5000 + retry * 1000);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
@@ -2604,7 +2604,8 @@ class ExternalApp {
|
|
|
2604
2604
|
|
|
2605
2605
|
|
|
2606
2606
|
|
|
2607
|
-
|
|
2607
|
+
|
|
2608
|
+
|
|
2608
2609
|
|
|
2609
2610
|
|
|
2610
2611
|
class Meeting {
|
|
@@ -2616,6 +2617,7 @@ class Meeting {
|
|
|
2616
2617
|
|
|
2617
2618
|
|
|
2618
2619
|
|
|
2620
|
+
|
|
2619
2621
|
|
|
2620
2622
|
|
|
2621
2623
|
static parse(plain ) {
|
|
@@ -2627,6 +2629,7 @@ class Meeting {
|
|
|
2627
2629
|
port: plain.port,
|
|
2628
2630
|
uuid: plain.uuid,
|
|
2629
2631
|
number: plain.number,
|
|
2632
|
+
persistent: plain.persistent,
|
|
2630
2633
|
});
|
|
2631
2634
|
}
|
|
2632
2635
|
|
|
@@ -2634,7 +2637,7 @@ class Meeting {
|
|
|
2634
2637
|
return newFrom(meeting, Meeting);
|
|
2635
2638
|
}
|
|
2636
2639
|
|
|
2637
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
2640
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
2638
2641
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
2639
2642
|
this.uri = uri;
|
|
2640
2643
|
this.name = name;
|
|
@@ -2642,6 +2645,7 @@ class Meeting {
|
|
|
2642
2645
|
this.port = port;
|
|
2643
2646
|
this.uuid = uuid;
|
|
2644
2647
|
this.number = number;
|
|
2648
|
+
this.persistent = persistent;
|
|
2645
2649
|
|
|
2646
2650
|
// Useful to compare instead of instanceof with minified code
|
|
2647
2651
|
this.type = 'Meeting';
|
|
@@ -3576,7 +3580,7 @@ class Recording {
|
|
|
3576
3580
|
|
|
3577
3581
|
|
|
3578
3582
|
|
|
3579
|
-
static parseMany(recordings
|
|
3583
|
+
static parseMany(recordings = []) {
|
|
3580
3584
|
return recordings.map(item => Recording.parse(item));
|
|
3581
3585
|
}
|
|
3582
3586
|
|
|
@@ -3702,7 +3706,7 @@ class CallLog {
|
|
|
3702
3706
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
3703
3707
|
start: moment(plain.start).toDate(),
|
|
3704
3708
|
end: plain.end ? moment(plain.end).toDate() : null,
|
|
3705
|
-
recordings: Recording.parseMany(plain.recordings),
|
|
3709
|
+
recordings: Recording.parseMany(plain.recordings || []),
|
|
3706
3710
|
});
|
|
3707
3711
|
}
|
|
3708
3712
|
|
|
@@ -7292,7 +7296,7 @@ class WebRTCClient extends Emitter {
|
|
|
7292
7296
|
// We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
|
|
7293
7297
|
const transceivers = pc.getTransceivers();
|
|
7294
7298
|
const transceiverIdx = lastIndexOf(transceivers, transceiver =>
|
|
7295
|
-
transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
|
|
7299
|
+
transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
|
|
7296
7300
|
|
|
7297
7301
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
7298
7302
|
} else {
|
|
@@ -13504,7 +13508,7 @@ const Wazo = {
|
|
|
13504
13508
|
SipRoom,
|
|
13505
13509
|
RemoteParticipant,
|
|
13506
13510
|
LocalParticipant,
|
|
13507
|
-
Stream
|
|
13511
|
+
Stream,
|
|
13508
13512
|
createLocalVideoStream,
|
|
13509
13513
|
createLocalAudioStream,
|
|
13510
13514
|
Configuration: Configuration$1,
|
|
@@ -13625,6 +13629,4 @@ class Stream {
|
|
|
13625
13629
|
}
|
|
13626
13630
|
}
|
|
13627
13631
|
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
export { Stream$1 as default };
|
|
13632
|
+
export default Stream;
|
|
@@ -1886,7 +1886,7 @@ class IssueReporter {
|
|
|
1886
1886
|
payload._retry = retry + 1;
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
|
-
this._sendDebugToGrafana(
|
|
1889
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
1890
1890
|
}, 5000 + retry * 1000);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
@@ -2604,7 +2604,8 @@ class ExternalApp {
|
|
|
2604
2604
|
|
|
2605
2605
|
|
|
2606
2606
|
|
|
2607
|
-
|
|
2607
|
+
|
|
2608
|
+
|
|
2608
2609
|
|
|
2609
2610
|
|
|
2610
2611
|
class Meeting {
|
|
@@ -2616,6 +2617,7 @@ class Meeting {
|
|
|
2616
2617
|
|
|
2617
2618
|
|
|
2618
2619
|
|
|
2620
|
+
|
|
2619
2621
|
|
|
2620
2622
|
|
|
2621
2623
|
static parse(plain ) {
|
|
@@ -2627,6 +2629,7 @@ class Meeting {
|
|
|
2627
2629
|
port: plain.port,
|
|
2628
2630
|
uuid: plain.uuid,
|
|
2629
2631
|
number: plain.number,
|
|
2632
|
+
persistent: plain.persistent,
|
|
2630
2633
|
});
|
|
2631
2634
|
}
|
|
2632
2635
|
|
|
@@ -2634,7 +2637,7 @@ class Meeting {
|
|
|
2634
2637
|
return newFrom(meeting, Meeting);
|
|
2635
2638
|
}
|
|
2636
2639
|
|
|
2637
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
2640
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
2638
2641
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
2639
2642
|
this.uri = uri;
|
|
2640
2643
|
this.name = name;
|
|
@@ -2642,6 +2645,7 @@ class Meeting {
|
|
|
2642
2645
|
this.port = port;
|
|
2643
2646
|
this.uuid = uuid;
|
|
2644
2647
|
this.number = number;
|
|
2648
|
+
this.persistent = persistent;
|
|
2645
2649
|
|
|
2646
2650
|
// Useful to compare instead of instanceof with minified code
|
|
2647
2651
|
this.type = 'Meeting';
|
|
@@ -3576,7 +3580,7 @@ class Recording {
|
|
|
3576
3580
|
|
|
3577
3581
|
|
|
3578
3582
|
|
|
3579
|
-
static parseMany(recordings
|
|
3583
|
+
static parseMany(recordings = []) {
|
|
3580
3584
|
return recordings.map(item => Recording.parse(item));
|
|
3581
3585
|
}
|
|
3582
3586
|
|
|
@@ -3702,7 +3706,7 @@ class CallLog {
|
|
|
3702
3706
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
3703
3707
|
start: moment(plain.start).toDate(),
|
|
3704
3708
|
end: plain.end ? moment(plain.end).toDate() : null,
|
|
3705
|
-
recordings: Recording.parseMany(plain.recordings),
|
|
3709
|
+
recordings: Recording.parseMany(plain.recordings || []),
|
|
3706
3710
|
});
|
|
3707
3711
|
}
|
|
3708
3712
|
|
|
@@ -7292,7 +7296,7 @@ class WebRTCClient extends Emitter {
|
|
|
7292
7296
|
// We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
|
|
7293
7297
|
const transceivers = pc.getTransceivers();
|
|
7294
7298
|
const transceiverIdx = lastIndexOf(transceivers, transceiver =>
|
|
7295
|
-
transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
|
|
7299
|
+
transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
|
|
7296
7300
|
|
|
7297
7301
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
7298
7302
|
} else {
|
package/esm/simple/utils.js
CHANGED
|
@@ -1886,7 +1886,7 @@ class IssueReporter {
|
|
|
1886
1886
|
payload._retry = retry + 1;
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
|
-
this._sendDebugToGrafana(
|
|
1889
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
1890
1890
|
}, 5000 + retry * 1000);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
@@ -2604,7 +2604,8 @@ class ExternalApp {
|
|
|
2604
2604
|
|
|
2605
2605
|
|
|
2606
2606
|
|
|
2607
|
-
|
|
2607
|
+
|
|
2608
|
+
|
|
2608
2609
|
|
|
2609
2610
|
|
|
2610
2611
|
class Meeting {
|
|
@@ -2616,6 +2617,7 @@ class Meeting {
|
|
|
2616
2617
|
|
|
2617
2618
|
|
|
2618
2619
|
|
|
2620
|
+
|
|
2619
2621
|
|
|
2620
2622
|
|
|
2621
2623
|
static parse(plain ) {
|
|
@@ -2627,6 +2629,7 @@ class Meeting {
|
|
|
2627
2629
|
port: plain.port,
|
|
2628
2630
|
uuid: plain.uuid,
|
|
2629
2631
|
number: plain.number,
|
|
2632
|
+
persistent: plain.persistent,
|
|
2630
2633
|
});
|
|
2631
2634
|
}
|
|
2632
2635
|
|
|
@@ -2634,7 +2637,7 @@ class Meeting {
|
|
|
2634
2637
|
return newFrom(meeting, Meeting);
|
|
2635
2638
|
}
|
|
2636
2639
|
|
|
2637
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
2640
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
2638
2641
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
2639
2642
|
this.uri = uri;
|
|
2640
2643
|
this.name = name;
|
|
@@ -2642,6 +2645,7 @@ class Meeting {
|
|
|
2642
2645
|
this.port = port;
|
|
2643
2646
|
this.uuid = uuid;
|
|
2644
2647
|
this.number = number;
|
|
2648
|
+
this.persistent = persistent;
|
|
2645
2649
|
|
|
2646
2650
|
// Useful to compare instead of instanceof with minified code
|
|
2647
2651
|
this.type = 'Meeting';
|
|
@@ -3576,7 +3580,7 @@ class Recording {
|
|
|
3576
3580
|
|
|
3577
3581
|
|
|
3578
3582
|
|
|
3579
|
-
static parseMany(recordings
|
|
3583
|
+
static parseMany(recordings = []) {
|
|
3580
3584
|
return recordings.map(item => Recording.parse(item));
|
|
3581
3585
|
}
|
|
3582
3586
|
|
|
@@ -3702,7 +3706,7 @@ class CallLog {
|
|
|
3702
3706
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
3703
3707
|
start: moment(plain.start).toDate(),
|
|
3704
3708
|
end: plain.end ? moment(plain.end).toDate() : null,
|
|
3705
|
-
recordings: Recording.parseMany(plain.recordings),
|
|
3709
|
+
recordings: Recording.parseMany(plain.recordings || []),
|
|
3706
3710
|
});
|
|
3707
3711
|
}
|
|
3708
3712
|
|
|
@@ -7292,7 +7296,7 @@ class WebRTCClient extends Emitter {
|
|
|
7292
7296
|
// We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
|
|
7293
7297
|
const transceivers = pc.getTransceivers();
|
|
7294
7298
|
const transceiverIdx = lastIndexOf(transceivers, transceiver =>
|
|
7295
|
-
transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
|
|
7299
|
+
transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
|
|
7296
7300
|
|
|
7297
7301
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
7298
7302
|
} else {
|
package/esm/utils/Emitter.js
CHANGED
package/esm/utils/Heartbeat.js
CHANGED
|
@@ -378,7 +378,7 @@ class IssueReporter {
|
|
|
378
378
|
payload._retry = retry + 1;
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
this._sendDebugToGrafana(
|
|
381
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
382
382
|
}, 5000 + retry * 1000);
|
|
383
383
|
});
|
|
384
384
|
}
|
|
@@ -665,4 +665,5 @@ class ApiRequester {
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
-
export
|
|
668
|
+
export default ApiRequester;
|
|
669
|
+
export { realFetch };
|
package/esm/utils/isMobile.js
CHANGED
package/esm/utils/new-from.js
CHANGED
package/esm/utils/once.js
CHANGED
package/esm/utils/update-from.js
CHANGED
package/esm/web-rtc-client.js
CHANGED
|
@@ -19,7 +19,7 @@ import 'sip.js/lib/platform/web/session-description-handler/session-description-
|
|
|
19
19
|
import moment from 'moment';
|
|
20
20
|
import { Base64 } from 'js-base64';
|
|
21
21
|
import sdpParser from 'sdp-transform';
|
|
22
|
-
import {
|
|
22
|
+
import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
|
|
23
23
|
import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
|
|
24
24
|
|
|
25
25
|
/* */
|
|
@@ -664,7 +664,7 @@ class IssueReporter {
|
|
|
664
664
|
payload._retry = retry + 1;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
this._sendDebugToGrafana(
|
|
667
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
668
668
|
}, 5000 + retry * 1000);
|
|
669
669
|
});
|
|
670
670
|
}
|
|
@@ -3166,7 +3166,8 @@ class ExternalApp {
|
|
|
3166
3166
|
|
|
3167
3167
|
|
|
3168
3168
|
|
|
3169
|
-
|
|
3169
|
+
|
|
3170
|
+
|
|
3170
3171
|
|
|
3171
3172
|
|
|
3172
3173
|
class Meeting {
|
|
@@ -3178,6 +3179,7 @@ class Meeting {
|
|
|
3178
3179
|
|
|
3179
3180
|
|
|
3180
3181
|
|
|
3182
|
+
|
|
3181
3183
|
|
|
3182
3184
|
|
|
3183
3185
|
static parse(plain ) {
|
|
@@ -3189,6 +3191,7 @@ class Meeting {
|
|
|
3189
3191
|
port: plain.port,
|
|
3190
3192
|
uuid: plain.uuid,
|
|
3191
3193
|
number: plain.number,
|
|
3194
|
+
persistent: plain.persistent,
|
|
3192
3195
|
});
|
|
3193
3196
|
}
|
|
3194
3197
|
|
|
@@ -3196,7 +3199,7 @@ class Meeting {
|
|
|
3196
3199
|
return newFrom(meeting, Meeting);
|
|
3197
3200
|
}
|
|
3198
3201
|
|
|
3199
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
3202
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
3200
3203
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
3201
3204
|
this.uri = uri;
|
|
3202
3205
|
this.name = name;
|
|
@@ -3204,6 +3207,7 @@ class Meeting {
|
|
|
3204
3207
|
this.port = port;
|
|
3205
3208
|
this.uuid = uuid;
|
|
3206
3209
|
this.number = number;
|
|
3210
|
+
this.persistent = persistent;
|
|
3207
3211
|
|
|
3208
3212
|
// Useful to compare instead of instanceof with minified code
|
|
3209
3213
|
this.type = 'Meeting';
|
|
@@ -3767,7 +3771,7 @@ class Recording {
|
|
|
3767
3771
|
|
|
3768
3772
|
|
|
3769
3773
|
|
|
3770
|
-
static parseMany(recordings
|
|
3774
|
+
static parseMany(recordings = []) {
|
|
3771
3775
|
return recordings.map(item => Recording.parse(item));
|
|
3772
3776
|
}
|
|
3773
3777
|
|
|
@@ -3893,7 +3897,7 @@ class CallLog {
|
|
|
3893
3897
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
3894
3898
|
start: moment(plain.start).toDate(),
|
|
3895
3899
|
end: plain.end ? moment(plain.end).toDate() : null,
|
|
3896
|
-
recordings: Recording.parseMany(plain.recordings),
|
|
3900
|
+
recordings: Recording.parseMany(plain.recordings || []),
|
|
3897
3901
|
});
|
|
3898
3902
|
}
|
|
3899
3903
|
|
|
@@ -6033,7 +6037,7 @@ class WebRTCClient extends Emitter {
|
|
|
6033
6037
|
// We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
|
|
6034
6038
|
const transceivers = pc.getTransceivers();
|
|
6035
6039
|
const transceiverIdx = lastIndexOf(transceivers, transceiver =>
|
|
6036
|
-
transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
|
|
6040
|
+
transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
|
|
6037
6041
|
|
|
6038
6042
|
videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
|
|
6039
6043
|
} else {
|
|
@@ -7366,4 +7370,5 @@ class WebRTCClient extends Emitter {
|
|
|
7366
7370
|
|
|
7367
7371
|
}
|
|
7368
7372
|
|
|
7369
|
-
export
|
|
7373
|
+
export default WebRTCClient;
|
|
7374
|
+
export { CanceledCallError, events, replaceLocalIpModifier, transportEvents };
|
package/esm/websocket-client.js
CHANGED
|
@@ -373,7 +373,7 @@ class IssueReporter {
|
|
|
373
373
|
payload._retry = retry + 1;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
this._sendDebugToGrafana(
|
|
376
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
377
377
|
}, 5000 + retry * 1000);
|
|
378
378
|
});
|
|
379
379
|
}
|
|
@@ -930,4 +930,5 @@ WebSocketClient.eventLists = [
|
|
|
930
930
|
CONFERENCE_ADHOC_DELETED,
|
|
931
931
|
];
|
|
932
932
|
|
|
933
|
-
export
|
|
933
|
+
export default WebSocketClient;
|
|
934
|
+
export { AGENT_PAUSED, AGENT_STATUS_UPDATE, AGENT_UNPAUSED, APPLICATION_CALL_ANSWERED, APPLICATION_CALL_DELETED, APPLICATION_CALL_DTMF_RECEIVED, APPLICATION_CALL_ENTERED, APPLICATION_CALL_INITIATED, APPLICATION_CALL_UPDATED, APPLICATION_DESTINATION_NODE_CREATED, APPLICATION_NODE_CREATED, APPLICATION_NODE_DELETED, APPLICATION_NODE_UPDATED, APPLICATION_PLAYBACK_CREATED, APPLICATION_PLAYBACK_DELETED, APPLICATION_PROGRESS_STARTED, APPLICATION_PROGRESS_STOPPED, APPLICATION_SNOOP_CREATED, APPLICATION_SNOOP_DELETED, APPLICATION_SNOOP_UPDATED, APPLICATION_USER_OUTGOING_CALL_CREATED, AUTH_SESSION_EXPIRE_SOON, AUTH_USER_EXTERNAL_AUTH_ADDED, AUTH_USER_EXTERNAL_AUTH_DELETED, CALL_ANSWERED, CALL_CREATED, CALL_DTMF_CREATED, CALL_ENDED, CALL_HELD, CALL_LOG_USER_CREATED, CALL_RESUMED, CALL_UPDATED, CHATD_PRESENCE_UPDATED, CHATD_USER_ROOM_CREATED, CHATD_USER_ROOM_MESSAGE_CREATED, CHAT_MESSAGE_RECEIVED, CHAT_MESSAGE_SENT, CONFERENCE_ADHOC_DELETED, CONFERENCE_ADHOC_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_JOINED, CONFERENCE_USER_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_TALK_STARTED, CONFERENCE_USER_PARTICIPANT_TALK_STOPPED, ENDPOINT_STATUS_UPDATE, FAVORITE_ADDED, FAVORITE_DELETED, FAX_OUTBOUND_USER_CREATED, FAX_OUTBOUND_USER_FAILED, FAX_OUTBOUND_USER_SUCCEEDED, HEARTBEAT_ENGINE_VERSION, LINE_STATUS_UPDATED, MEETING_USER_PARTICIPANT_JOINED, MEETING_USER_PARTICIPANT_LEFT, SOCKET_EVENTS, SWITCHBOARD_HELD_CALLS_UPDATED, SWITCHBOARD_HELD_CALL_ANSWERED, SWITCHBOARD_QUEUED_CALLS_UPDATED, SWITCHBOARD_QUEUED_CALL_ANSWERED, TRUNK_STATUS_UPDATED, USERS_FORWARDS_BUSY_UPDATED, USERS_FORWARDS_NOANSWER_UPDATED, USERS_FORWARDS_UNCONDITIONAL_UPDATED, USERS_SERVICES_DND_UPDATED, USER_STATUS_UPDATE, USER_VOICEMAIL_MESSAGE_CREATED, USER_VOICEMAIL_MESSAGE_DELETED, USER_VOICEMAIL_MESSAGE_UPDATED };
|
|
@@ -211,7 +211,7 @@ class IssueReporter {
|
|
|
211
211
|
args.splice(1, 1);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
const date = moment__default[
|
|
214
|
+
const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
|
|
215
215
|
const message = args.join(', ');
|
|
216
216
|
let consoleMessage = message;
|
|
217
217
|
|
|
@@ -388,7 +388,7 @@ class IssueReporter {
|
|
|
388
388
|
payload._retry = retry + 1;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
this._sendDebugToGrafana(
|
|
391
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
392
392
|
}, 5000 + retry * 1000);
|
|
393
393
|
});
|
|
394
394
|
}
|
|
@@ -2591,7 +2591,8 @@ class ExternalApp {
|
|
|
2591
2591
|
|
|
2592
2592
|
|
|
2593
2593
|
|
|
2594
|
-
|
|
2594
|
+
|
|
2595
|
+
|
|
2595
2596
|
|
|
2596
2597
|
|
|
2597
2598
|
class Meeting {
|
|
@@ -2603,6 +2604,7 @@ class Meeting {
|
|
|
2603
2604
|
|
|
2604
2605
|
|
|
2605
2606
|
|
|
2607
|
+
|
|
2606
2608
|
|
|
2607
2609
|
|
|
2608
2610
|
static parse(plain ) {
|
|
@@ -2614,6 +2616,7 @@ class Meeting {
|
|
|
2614
2616
|
port: plain.port,
|
|
2615
2617
|
uuid: plain.uuid,
|
|
2616
2618
|
number: plain.number,
|
|
2619
|
+
persistent: plain.persistent,
|
|
2617
2620
|
});
|
|
2618
2621
|
}
|
|
2619
2622
|
|
|
@@ -2621,7 +2624,7 @@ class Meeting {
|
|
|
2621
2624
|
return newFrom(meeting, Meeting);
|
|
2622
2625
|
}
|
|
2623
2626
|
|
|
2624
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
2627
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
2625
2628
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
2626
2629
|
this.uri = uri;
|
|
2627
2630
|
this.name = name;
|
|
@@ -2629,6 +2632,7 @@ class Meeting {
|
|
|
2629
2632
|
this.port = port;
|
|
2630
2633
|
this.uuid = uuid;
|
|
2631
2634
|
this.number = number;
|
|
2635
|
+
this.persistent = persistent;
|
|
2632
2636
|
|
|
2633
2637
|
// Useful to compare instead of instanceof with minified code
|
|
2634
2638
|
this.type = 'Meeting';
|
|
@@ -2809,7 +2813,7 @@ class ChatMessage {
|
|
|
2809
2813
|
static parse(plain ) {
|
|
2810
2814
|
return new ChatMessage({
|
|
2811
2815
|
uuid: plain.uuid,
|
|
2812
|
-
date: moment__default[
|
|
2816
|
+
date: moment__default['default'](plain.created_at).toDate(),
|
|
2813
2817
|
content: plain.content,
|
|
2814
2818
|
alias: plain.alias,
|
|
2815
2819
|
userUuid: plain.user_uuid,
|
|
@@ -2901,7 +2905,7 @@ class Voicemail {
|
|
|
2901
2905
|
static parse(plain ) {
|
|
2902
2906
|
return new Voicemail({
|
|
2903
2907
|
id: plain.id,
|
|
2904
|
-
date: moment__default[
|
|
2908
|
+
date: moment__default['default'](plain.timestamp * 1000).toDate(),
|
|
2905
2909
|
duration: plain.duration * 1000,
|
|
2906
2910
|
caller: {
|
|
2907
2911
|
name: plain.caller_id_name,
|
|
@@ -3038,7 +3042,7 @@ class Call {
|
|
|
3038
3042
|
onHold: plain.on_hold,
|
|
3039
3043
|
status: plain.status,
|
|
3040
3044
|
lineId: plain.line_id,
|
|
3041
|
-
startingTime: moment__default[
|
|
3045
|
+
startingTime: moment__default['default'](plain.creation_time).toDate(),
|
|
3042
3046
|
talkingToIds: Object.keys(plain.talking_to || {}),
|
|
3043
3047
|
recording: plain.record_state === RECORD_STATE_ACTIVE,
|
|
3044
3048
|
});
|
|
@@ -3192,7 +3196,7 @@ class Recording {
|
|
|
3192
3196
|
|
|
3193
3197
|
|
|
3194
3198
|
|
|
3195
|
-
static parseMany(recordings
|
|
3199
|
+
static parseMany(recordings = []) {
|
|
3196
3200
|
return recordings.map(item => Recording.parse(item));
|
|
3197
3201
|
}
|
|
3198
3202
|
|
|
@@ -3200,8 +3204,8 @@ class Recording {
|
|
|
3200
3204
|
return new Recording({
|
|
3201
3205
|
deleted: plain.deleted,
|
|
3202
3206
|
fileName: plain.filename,
|
|
3203
|
-
end: plain.end_time ? moment__default[
|
|
3204
|
-
start: moment__default[
|
|
3207
|
+
end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
|
|
3208
|
+
start: moment__default['default'](plain.start_time).toDate(),
|
|
3205
3209
|
uuid: plain.uuid,
|
|
3206
3210
|
});
|
|
3207
3211
|
}
|
|
@@ -3299,7 +3303,7 @@ class CallLog {
|
|
|
3299
3303
|
|
|
3300
3304
|
static parse(plain ) {
|
|
3301
3305
|
return new CallLog({
|
|
3302
|
-
answer: plain.answer ? moment__default[
|
|
3306
|
+
answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
|
|
3303
3307
|
answered: plain.answered,
|
|
3304
3308
|
callDirection: plain.call_direction,
|
|
3305
3309
|
destination: {
|
|
@@ -3316,9 +3320,9 @@ class CallLog {
|
|
|
3316
3320
|
},
|
|
3317
3321
|
id: plain.id,
|
|
3318
3322
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
3319
|
-
start: moment__default[
|
|
3320
|
-
end: plain.end ? moment__default[
|
|
3321
|
-
recordings: Recording.parseMany(plain.recordings),
|
|
3323
|
+
start: moment__default['default'](plain.start).toDate(),
|
|
3324
|
+
end: plain.end ? moment__default['default'](plain.end).toDate() : null,
|
|
3325
|
+
recordings: Recording.parseMany(plain.recordings || []),
|
|
3322
3326
|
});
|
|
3323
3327
|
}
|
|
3324
3328
|
|