@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
|
@@ -692,7 +692,7 @@ class IssueReporter {
|
|
|
692
692
|
payload._retry = retry + 1;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
this._sendDebugToGrafana(
|
|
695
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
696
696
|
}, 5000 + retry * 1000);
|
|
697
697
|
});
|
|
698
698
|
}
|
|
@@ -2630,7 +2630,8 @@ class ExternalApp {
|
|
|
2630
2630
|
|
|
2631
2631
|
|
|
2632
2632
|
|
|
2633
|
-
|
|
2633
|
+
|
|
2634
|
+
|
|
2634
2635
|
|
|
2635
2636
|
|
|
2636
2637
|
class Meeting {
|
|
@@ -2642,6 +2643,7 @@ class Meeting {
|
|
|
2642
2643
|
|
|
2643
2644
|
|
|
2644
2645
|
|
|
2646
|
+
|
|
2645
2647
|
|
|
2646
2648
|
|
|
2647
2649
|
static parse(plain ) {
|
|
@@ -2653,6 +2655,7 @@ class Meeting {
|
|
|
2653
2655
|
port: plain.port,
|
|
2654
2656
|
uuid: plain.uuid,
|
|
2655
2657
|
number: plain.number,
|
|
2658
|
+
persistent: plain.persistent,
|
|
2656
2659
|
});
|
|
2657
2660
|
}
|
|
2658
2661
|
|
|
@@ -2660,7 +2663,7 @@ class Meeting {
|
|
|
2660
2663
|
return newFrom(meeting, Meeting);
|
|
2661
2664
|
}
|
|
2662
2665
|
|
|
2663
|
-
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
|
|
2666
|
+
constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
|
|
2664
2667
|
this.guestSipAuthorization = guestSipAuthorization;
|
|
2665
2668
|
this.uri = uri;
|
|
2666
2669
|
this.name = name;
|
|
@@ -2668,6 +2671,7 @@ class Meeting {
|
|
|
2668
2671
|
this.port = port;
|
|
2669
2672
|
this.uuid = uuid;
|
|
2670
2673
|
this.number = number;
|
|
2674
|
+
this.persistent = persistent;
|
|
2671
2675
|
|
|
2672
2676
|
// Useful to compare instead of instanceof with minified code
|
|
2673
2677
|
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 {
|
|
@@ -11331,7 +11335,7 @@ var Websocket$1 = global.wazoWebsocketInstance;
|
|
|
11331
11335
|
|
|
11332
11336
|
const logger$3 = IssueReporter$1.loggerFor('sdk-sip-room');
|
|
11333
11337
|
|
|
11334
|
-
class SipRoom extends Room
|
|
11338
|
+
class SipRoom extends Room {
|
|
11335
11339
|
|
|
11336
11340
|
static async connect({ extension, constraints, audioOnly = false, extra, room } ) {
|
|
11337
11341
|
logger$3.info('connecting to sip room', { extension, audioOnly, room: !!room });
|
|
@@ -11666,7 +11670,7 @@ class NotificationOptions {
|
|
|
11666
11670
|
|
|
11667
11671
|
|
|
11668
11672
|
// Represents a conference room, like `9000`.
|
|
11669
|
-
class Room$
|
|
11673
|
+
class Room$1 {
|
|
11670
11674
|
|
|
11671
11675
|
|
|
11672
11676
|
|
|
@@ -11687,7 +11691,7 @@ class Room$2 {
|
|
|
11687
11691
|
}
|
|
11688
11692
|
|
|
11689
11693
|
connect(callSession ) {
|
|
11690
|
-
return new Room$
|
|
11694
|
+
return new Room$1({ ...this, connectedCallSession: callSession });
|
|
11691
11695
|
}
|
|
11692
11696
|
|
|
11693
11697
|
has(callSession ) {
|
|
@@ -11696,7 +11700,7 @@ class Room$2 {
|
|
|
11696
11700
|
|
|
11697
11701
|
addParticipant(uuid , extension , talking = null) {
|
|
11698
11702
|
if (!this.participants.some(participant => participant.uuid === uuid || participant.extension === extension)) {
|
|
11699
|
-
return new Room$
|
|
11703
|
+
return new Room$1({ ...this, participants: [...this.participants, { uuid, extension, talking }] });
|
|
11700
11704
|
}
|
|
11701
11705
|
|
|
11702
11706
|
return this;
|
|
@@ -11715,7 +11719,7 @@ class Room$2 {
|
|
|
11715
11719
|
updatedParticipants.push(participant);
|
|
11716
11720
|
}
|
|
11717
11721
|
|
|
11718
|
-
return new Room$
|
|
11722
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
11719
11723
|
}
|
|
11720
11724
|
|
|
11721
11725
|
updateParticipantByExtension(extension , participant , shouldAdd = false) {
|
|
@@ -11731,7 +11735,7 @@ class Room$2 {
|
|
|
11731
11735
|
updatedParticipants.push(participant);
|
|
11732
11736
|
}
|
|
11733
11737
|
|
|
11734
|
-
return new Room$
|
|
11738
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
11735
11739
|
}
|
|
11736
11740
|
|
|
11737
11741
|
hasCallWithId(id ) {
|
|
@@ -11739,18 +11743,18 @@ class Room$2 {
|
|
|
11739
11743
|
}
|
|
11740
11744
|
|
|
11741
11745
|
disconnect() {
|
|
11742
|
-
return new Room$
|
|
11746
|
+
return new Room$1({ ...this, connectedCallSession: null });
|
|
11743
11747
|
}
|
|
11744
11748
|
|
|
11745
11749
|
removeParticipantWithUUID(uuid ) {
|
|
11746
|
-
return new Room$
|
|
11750
|
+
return new Room$1({
|
|
11747
11751
|
...this,
|
|
11748
11752
|
participants: this.participants.filter(participant => participant.uuid !== uuid),
|
|
11749
11753
|
});
|
|
11750
11754
|
}
|
|
11751
11755
|
|
|
11752
11756
|
removeParticipantWithExtension(extension ) {
|
|
11753
|
-
return new Room$
|
|
11757
|
+
return new Room$1({
|
|
11754
11758
|
...this,
|
|
11755
11759
|
participants: this.participants.filter(participant => participant.extension !== extension),
|
|
11756
11760
|
});
|
|
@@ -11761,7 +11765,7 @@ class Room$2 {
|
|
|
11761
11765
|
}
|
|
11762
11766
|
|
|
11763
11767
|
static newFrom(room ) {
|
|
11764
|
-
return newFrom(room, Room$
|
|
11768
|
+
return newFrom(room, Room$1);
|
|
11765
11769
|
}
|
|
11766
11770
|
}
|
|
11767
11771
|
|
|
@@ -12432,7 +12436,7 @@ const Wazo = {
|
|
|
12432
12436
|
Auth: Auth$1,
|
|
12433
12437
|
Phone: Phone$1,
|
|
12434
12438
|
Websocket: Websocket$1,
|
|
12435
|
-
Room
|
|
12439
|
+
Room,
|
|
12436
12440
|
SipRoom,
|
|
12437
12441
|
RemoteParticipant,
|
|
12438
12442
|
LocalParticipant,
|
|
@@ -12465,7 +12469,7 @@ const Wazo = {
|
|
|
12465
12469
|
Session,
|
|
12466
12470
|
Voicemail,
|
|
12467
12471
|
Relocation,
|
|
12468
|
-
ConferenceRoom: Room$
|
|
12472
|
+
ConferenceRoom: Room$1,
|
|
12469
12473
|
CallSession,
|
|
12470
12474
|
IndirectTransfer,
|
|
12471
12475
|
SwitchboardCall,
|
|
@@ -13335,8 +13339,6 @@ class Room extends Emitter {
|
|
|
13335
13339
|
}
|
|
13336
13340
|
}
|
|
13337
13341
|
|
|
13338
|
-
var Room$1 = Room;
|
|
13339
|
-
|
|
13340
13342
|
//
|
|
13341
13343
|
|
|
13342
13344
|
const logger = IssueReporter$1.loggerFor('room');
|
|
@@ -13627,4 +13629,4 @@ class Participant extends Emitter {
|
|
|
13627
13629
|
}
|
|
13628
13630
|
}
|
|
13629
13631
|
|
|
13630
|
-
export
|
|
13632
|
+
export default Participant;
|
|
@@ -401,7 +401,7 @@ class IssueReporter {
|
|
|
401
401
|
payload._retry = retry + 1;
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
-
this._sendDebugToGrafana(
|
|
404
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
405
405
|
}, 5000 + retry * 1000);
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -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 {
|
|
@@ -11331,7 +11335,7 @@ var Websocket$1 = global.wazoWebsocketInstance;
|
|
|
11331
11335
|
|
|
11332
11336
|
const logger$3 = IssueReporter$1.loggerFor('sdk-sip-room');
|
|
11333
11337
|
|
|
11334
|
-
class SipRoom extends Room
|
|
11338
|
+
class SipRoom extends Room {
|
|
11335
11339
|
|
|
11336
11340
|
static async connect({ extension, constraints, audioOnly = false, extra, room } ) {
|
|
11337
11341
|
logger$3.info('connecting to sip room', { extension, audioOnly, room: !!room });
|
|
@@ -11945,7 +11949,7 @@ class NotificationOptions {
|
|
|
11945
11949
|
|
|
11946
11950
|
|
|
11947
11951
|
// Represents a conference room, like `9000`.
|
|
11948
|
-
class Room$
|
|
11952
|
+
class Room$1 {
|
|
11949
11953
|
|
|
11950
11954
|
|
|
11951
11955
|
|
|
@@ -11966,7 +11970,7 @@ class Room$2 {
|
|
|
11966
11970
|
}
|
|
11967
11971
|
|
|
11968
11972
|
connect(callSession ) {
|
|
11969
|
-
return new Room$
|
|
11973
|
+
return new Room$1({ ...this, connectedCallSession: callSession });
|
|
11970
11974
|
}
|
|
11971
11975
|
|
|
11972
11976
|
has(callSession ) {
|
|
@@ -11975,7 +11979,7 @@ class Room$2 {
|
|
|
11975
11979
|
|
|
11976
11980
|
addParticipant(uuid , extension , talking = null) {
|
|
11977
11981
|
if (!this.participants.some(participant => participant.uuid === uuid || participant.extension === extension)) {
|
|
11978
|
-
return new Room$
|
|
11982
|
+
return new Room$1({ ...this, participants: [...this.participants, { uuid, extension, talking }] });
|
|
11979
11983
|
}
|
|
11980
11984
|
|
|
11981
11985
|
return this;
|
|
@@ -11994,7 +11998,7 @@ class Room$2 {
|
|
|
11994
11998
|
updatedParticipants.push(participant);
|
|
11995
11999
|
}
|
|
11996
12000
|
|
|
11997
|
-
return new Room$
|
|
12001
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
11998
12002
|
}
|
|
11999
12003
|
|
|
12000
12004
|
updateParticipantByExtension(extension , participant , shouldAdd = false) {
|
|
@@ -12010,7 +12014,7 @@ class Room$2 {
|
|
|
12010
12014
|
updatedParticipants.push(participant);
|
|
12011
12015
|
}
|
|
12012
12016
|
|
|
12013
|
-
return new Room$
|
|
12017
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
12014
12018
|
}
|
|
12015
12019
|
|
|
12016
12020
|
hasCallWithId(id ) {
|
|
@@ -12018,18 +12022,18 @@ class Room$2 {
|
|
|
12018
12022
|
}
|
|
12019
12023
|
|
|
12020
12024
|
disconnect() {
|
|
12021
|
-
return new Room$
|
|
12025
|
+
return new Room$1({ ...this, connectedCallSession: null });
|
|
12022
12026
|
}
|
|
12023
12027
|
|
|
12024
12028
|
removeParticipantWithUUID(uuid ) {
|
|
12025
|
-
return new Room$
|
|
12029
|
+
return new Room$1({
|
|
12026
12030
|
...this,
|
|
12027
12031
|
participants: this.participants.filter(participant => participant.uuid !== uuid),
|
|
12028
12032
|
});
|
|
12029
12033
|
}
|
|
12030
12034
|
|
|
12031
12035
|
removeParticipantWithExtension(extension ) {
|
|
12032
|
-
return new Room$
|
|
12036
|
+
return new Room$1({
|
|
12033
12037
|
...this,
|
|
12034
12038
|
participants: this.participants.filter(participant => participant.extension !== extension),
|
|
12035
12039
|
});
|
|
@@ -12040,7 +12044,7 @@ class Room$2 {
|
|
|
12040
12044
|
}
|
|
12041
12045
|
|
|
12042
12046
|
static newFrom(room ) {
|
|
12043
|
-
return newFrom(room, Room$
|
|
12047
|
+
return newFrom(room, Room$1);
|
|
12044
12048
|
}
|
|
12045
12049
|
}
|
|
12046
12050
|
|
|
@@ -12711,9 +12715,9 @@ const Wazo = {
|
|
|
12711
12715
|
Auth: Auth$1,
|
|
12712
12716
|
Phone: Phone$1,
|
|
12713
12717
|
Websocket: Websocket$1,
|
|
12714
|
-
Room
|
|
12718
|
+
Room,
|
|
12715
12719
|
SipRoom,
|
|
12716
|
-
RemoteParticipant
|
|
12720
|
+
RemoteParticipant,
|
|
12717
12721
|
LocalParticipant,
|
|
12718
12722
|
Stream,
|
|
12719
12723
|
createLocalVideoStream,
|
|
@@ -12744,7 +12748,7 @@ const Wazo = {
|
|
|
12744
12748
|
Session,
|
|
12745
12749
|
Voicemail,
|
|
12746
12750
|
Relocation,
|
|
12747
|
-
ConferenceRoom: Room$
|
|
12751
|
+
ConferenceRoom: Room$1,
|
|
12748
12752
|
CallSession,
|
|
12749
12753
|
IndirectTransfer,
|
|
12750
12754
|
SwitchboardCall,
|
|
@@ -13485,7 +13489,7 @@ class Room extends Emitter {
|
|
|
13485
13489
|
_isParticipantJoining(participant ) {
|
|
13486
13490
|
this.__associateStreams(participant);
|
|
13487
13491
|
// @VALIDATE: no need to publicize ourselves, no?
|
|
13488
|
-
if (participant instanceof RemoteParticipant
|
|
13492
|
+
if (participant instanceof RemoteParticipant) {
|
|
13489
13493
|
this.eventEmitter.emit(this.CONFERENCE_USER_PARTICIPANT_JOINED, participant);
|
|
13490
13494
|
}
|
|
13491
13495
|
}
|
|
@@ -13614,8 +13618,6 @@ class Room extends Emitter {
|
|
|
13614
13618
|
}
|
|
13615
13619
|
}
|
|
13616
13620
|
|
|
13617
|
-
var Room$1 = Room;
|
|
13618
|
-
|
|
13619
13621
|
//
|
|
13620
13622
|
|
|
13621
13623
|
class RemoteParticipant extends Participant {
|
|
@@ -13627,6 +13629,4 @@ class RemoteParticipant extends Participant {
|
|
|
13627
13629
|
}
|
|
13628
13630
|
}
|
|
13629
13631
|
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
export { RemoteParticipant$1 as default };
|
|
13632
|
+
export default RemoteParticipant;
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -401,7 +401,7 @@ class IssueReporter {
|
|
|
401
401
|
payload._retry = retry + 1;
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
-
this._sendDebugToGrafana(
|
|
404
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
405
405
|
}, 5000 + retry * 1000);
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -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 {
|
|
@@ -11331,7 +11335,7 @@ var Websocket$1 = global.wazoWebsocketInstance;
|
|
|
11331
11335
|
|
|
11332
11336
|
const logger$3 = IssueReporter$1.loggerFor('sdk-sip-room');
|
|
11333
11337
|
|
|
11334
|
-
class SipRoom extends Room
|
|
11338
|
+
class SipRoom extends Room {
|
|
11335
11339
|
|
|
11336
11340
|
static async connect({ extension, constraints, audioOnly = false, extra, room } ) {
|
|
11337
11341
|
logger$3.info('connecting to sip room', { extension, audioOnly, room: !!room });
|
|
@@ -11956,7 +11960,7 @@ class NotificationOptions {
|
|
|
11956
11960
|
|
|
11957
11961
|
|
|
11958
11962
|
// Represents a conference room, like `9000`.
|
|
11959
|
-
class Room$
|
|
11963
|
+
class Room$1 {
|
|
11960
11964
|
|
|
11961
11965
|
|
|
11962
11966
|
|
|
@@ -11977,7 +11981,7 @@ class Room$2 {
|
|
|
11977
11981
|
}
|
|
11978
11982
|
|
|
11979
11983
|
connect(callSession ) {
|
|
11980
|
-
return new Room$
|
|
11984
|
+
return new Room$1({ ...this, connectedCallSession: callSession });
|
|
11981
11985
|
}
|
|
11982
11986
|
|
|
11983
11987
|
has(callSession ) {
|
|
@@ -11986,7 +11990,7 @@ class Room$2 {
|
|
|
11986
11990
|
|
|
11987
11991
|
addParticipant(uuid , extension , talking = null) {
|
|
11988
11992
|
if (!this.participants.some(participant => participant.uuid === uuid || participant.extension === extension)) {
|
|
11989
|
-
return new Room$
|
|
11993
|
+
return new Room$1({ ...this, participants: [...this.participants, { uuid, extension, talking }] });
|
|
11990
11994
|
}
|
|
11991
11995
|
|
|
11992
11996
|
return this;
|
|
@@ -12005,7 +12009,7 @@ class Room$2 {
|
|
|
12005
12009
|
updatedParticipants.push(participant);
|
|
12006
12010
|
}
|
|
12007
12011
|
|
|
12008
|
-
return new Room$
|
|
12012
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
12009
12013
|
}
|
|
12010
12014
|
|
|
12011
12015
|
updateParticipantByExtension(extension , participant , shouldAdd = false) {
|
|
@@ -12021,7 +12025,7 @@ class Room$2 {
|
|
|
12021
12025
|
updatedParticipants.push(participant);
|
|
12022
12026
|
}
|
|
12023
12027
|
|
|
12024
|
-
return new Room$
|
|
12028
|
+
return new Room$1({ ...this, participants: updatedParticipants });
|
|
12025
12029
|
}
|
|
12026
12030
|
|
|
12027
12031
|
hasCallWithId(id ) {
|
|
@@ -12029,18 +12033,18 @@ class Room$2 {
|
|
|
12029
12033
|
}
|
|
12030
12034
|
|
|
12031
12035
|
disconnect() {
|
|
12032
|
-
return new Room$
|
|
12036
|
+
return new Room$1({ ...this, connectedCallSession: null });
|
|
12033
12037
|
}
|
|
12034
12038
|
|
|
12035
12039
|
removeParticipantWithUUID(uuid ) {
|
|
12036
|
-
return new Room$
|
|
12040
|
+
return new Room$1({
|
|
12037
12041
|
...this,
|
|
12038
12042
|
participants: this.participants.filter(participant => participant.uuid !== uuid),
|
|
12039
12043
|
});
|
|
12040
12044
|
}
|
|
12041
12045
|
|
|
12042
12046
|
removeParticipantWithExtension(extension ) {
|
|
12043
|
-
return new Room$
|
|
12047
|
+
return new Room$1({
|
|
12044
12048
|
...this,
|
|
12045
12049
|
participants: this.participants.filter(participant => participant.extension !== extension),
|
|
12046
12050
|
});
|
|
@@ -12051,7 +12055,7 @@ class Room$2 {
|
|
|
12051
12055
|
}
|
|
12052
12056
|
|
|
12053
12057
|
static newFrom(room ) {
|
|
12054
|
-
return newFrom(room, Room$
|
|
12058
|
+
return newFrom(room, Room$1);
|
|
12055
12059
|
}
|
|
12056
12060
|
}
|
|
12057
12061
|
|
|
@@ -12722,7 +12726,7 @@ const Wazo = {
|
|
|
12722
12726
|
Auth: Auth$1,
|
|
12723
12727
|
Phone: Phone$1,
|
|
12724
12728
|
Websocket: Websocket$1,
|
|
12725
|
-
Room
|
|
12729
|
+
Room,
|
|
12726
12730
|
SipRoom,
|
|
12727
12731
|
RemoteParticipant,
|
|
12728
12732
|
LocalParticipant,
|
|
@@ -12755,7 +12759,7 @@ const Wazo = {
|
|
|
12755
12759
|
Session,
|
|
12756
12760
|
Voicemail,
|
|
12757
12761
|
Relocation,
|
|
12758
|
-
ConferenceRoom: Room$
|
|
12762
|
+
ConferenceRoom: Room$1,
|
|
12759
12763
|
CallSession,
|
|
12760
12764
|
IndirectTransfer,
|
|
12761
12765
|
SwitchboardCall,
|
|
@@ -13625,6 +13629,5 @@ class Room extends Emitter {
|
|
|
13625
13629
|
}
|
|
13626
13630
|
}
|
|
13627
13631
|
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
export { SIGNAL_TYPE_PARTICIPANT_REQUEST, SIGNAL_TYPE_PARTICIPANT_UPDATE, Room$1 as default };
|
|
13632
|
+
export default Room;
|
|
13633
|
+
export { SIGNAL_TYPE_PARTICIPANT_REQUEST, SIGNAL_TYPE_PARTICIPANT_UPDATE };
|
|
@@ -666,7 +666,7 @@ class IssueReporter {
|
|
|
666
666
|
payload._retry = retry + 1;
|
|
667
667
|
}
|
|
668
668
|
|
|
669
|
-
this._sendDebugToGrafana(
|
|
669
|
+
this._sendDebugToGrafana(payload, retry + 1);
|
|
670
670
|
}, 5000 + retry * 1000);
|
|
671
671
|
});
|
|
672
672
|
}
|
|
@@ -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 {
|
|
@@ -13420,7 +13424,7 @@ const Wazo = {
|
|
|
13420
13424
|
Phone: Phone$1,
|
|
13421
13425
|
Websocket: Websocket$1,
|
|
13422
13426
|
Room: Room$1,
|
|
13423
|
-
SipRoom
|
|
13427
|
+
SipRoom,
|
|
13424
13428
|
RemoteParticipant,
|
|
13425
13429
|
LocalParticipant,
|
|
13426
13430
|
Stream,
|
|
@@ -13625,6 +13629,4 @@ class SipRoom extends Room$1 {
|
|
|
13625
13629
|
|
|
13626
13630
|
}
|
|
13627
13631
|
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
export { SipRoom$1 as default };
|
|
13632
|
+
export default SipRoom;
|