@wazo/sdk 0.38.5 → 0.38.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/api-client.test.js +6 -0
- package/esm/__tests__/web-rtc-client.test.js +58 -2
- package/esm/api/calld.js +6 -0
- package/esm/api/ctid-ng.js +6 -0
- package/esm/api-client.js +6 -0
- package/esm/checker/Checker.js +8 -2
- package/esm/checker/checks/aor.js +6 -0
- package/esm/checker/checks/api.js +6 -0
- package/esm/checker/checks/index.js +8 -2
- package/esm/checker/checks/webrtc-transport.js +8 -2
- package/esm/checker/checks/webrtc.js +8 -2
- package/esm/domain/AdHocAPIConference.js +6 -0
- package/esm/domain/Call.js +6 -0
- package/esm/domain/CallSession.js +1 -1
- package/esm/domain/Features.js +6 -0
- package/esm/domain/Phone/CTIPhone.js +7 -1
- package/esm/domain/Phone/WebRTCPhone.js +3 -3
- package/esm/domain/__tests__/Call.test.js +6 -0
- package/esm/domain/__tests__/CallSession.test.js +1 -1
- package/esm/domain/__tests__/IndirectTransfer.test.js +1 -1
- package/esm/domain/__tests__/Room.test.js +1 -1
- package/esm/index.js +11 -5
- package/esm/service/CallApi.js +6 -0
- package/esm/service/getApiClient.js +6 -0
- package/esm/simple/Auth.js +11 -5
- package/esm/simple/Configuration.js +11 -5
- package/esm/simple/Directory.js +6 -0
- package/esm/simple/Phone.js +11 -5
- package/esm/simple/index.js +11 -5
- package/esm/simple/room/LocalParticipant.js +11 -5
- package/esm/simple/room/Participant.js +11 -5
- package/esm/simple/room/RemoteParticipant.js +11 -5
- package/esm/simple/room/Room.js +11 -5
- package/esm/simple/room/SipRoom.js +11 -5
- package/esm/simple/room/Stream.js +11 -5
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +11 -5
- package/esm/simple/utils.js +11 -5
- package/esm/web-rtc-client.js +8 -2
- package/lib/__tests__/api-client.test.js +6 -0
- package/lib/__tests__/web-rtc-client.test.js +58 -2
- package/lib/api/calld.js +6 -0
- package/lib/api/ctid-ng.js +6 -0
- package/lib/api-client.js +6 -0
- package/lib/checker/Checker.js +8 -2
- package/lib/checker/checks/aor.js +6 -0
- package/lib/checker/checks/api.js +6 -0
- package/lib/checker/checks/index.js +8 -2
- package/lib/checker/checks/webrtc-transport.js +8 -2
- package/lib/checker/checks/webrtc.js +8 -2
- package/lib/domain/AdHocAPIConference.js +6 -0
- package/lib/domain/Call.js +6 -0
- package/lib/domain/CallSession.js +1 -1
- package/lib/domain/Features.js +6 -0
- package/lib/domain/Phone/CTIPhone.js +7 -1
- package/lib/domain/Phone/WebRTCPhone.js +3 -3
- package/lib/domain/__tests__/Call.test.js +6 -0
- package/lib/domain/__tests__/CallSession.test.js +1 -1
- package/lib/domain/__tests__/IndirectTransfer.test.js +1 -1
- package/lib/domain/__tests__/Room.test.js +1 -1
- package/lib/index.js +11 -5
- package/lib/service/CallApi.js +6 -0
- package/lib/service/getApiClient.js +6 -0
- package/lib/simple/Auth.js +11 -5
- package/lib/simple/Configuration.js +11 -5
- package/lib/simple/Directory.js +6 -0
- package/lib/simple/Phone.js +11 -5
- package/lib/simple/index.js +11 -5
- package/lib/simple/room/LocalParticipant.js +11 -5
- package/lib/simple/room/Participant.js +11 -5
- package/lib/simple/room/RemoteParticipant.js +11 -5
- package/lib/simple/room/Room.js +11 -5
- package/lib/simple/room/SipRoom.js +11 -5
- package/lib/simple/room/Stream.js +11 -5
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +11 -5
- package/lib/simple/utils.js +11 -5
- package/lib/web-rtc-client.js +8 -2
- package/package.json +1 -1
- package/src/__tests__/web-rtc-client.test.js +50 -0
- package/src/domain/Call.js +6 -0
- package/src/domain/CallSession.js +1 -1
- package/src/domain/Phone/WebRTCPhone.js +2 -2
- package/src/web-rtc-client.js +2 -2
package/esm/domain/Call.js
CHANGED
|
@@ -25,6 +25,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
|
|
@@ -35,6 +36,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
|
|
@@ -63,6 +65,7 @@ class Call {
|
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
|
|
68
|
+
|
|
66
69
|
|
|
67
70
|
|
|
68
71
|
|
|
@@ -87,6 +90,7 @@ class Call {
|
|
|
87
90
|
calleeNumber: plain.peer_caller_id_number,
|
|
88
91
|
dialedExtension: plain.dialed_extension,
|
|
89
92
|
isCaller: plain.is_caller,
|
|
93
|
+
isVideo: plain.is_video,
|
|
90
94
|
muted: plain.muted,
|
|
91
95
|
onHold: plain.on_hold,
|
|
92
96
|
status: plain.status,
|
|
@@ -110,6 +114,7 @@ class Call {
|
|
|
110
114
|
calleeNumber,
|
|
111
115
|
dialedExtension,
|
|
112
116
|
isCaller,
|
|
117
|
+
isVideo,
|
|
113
118
|
lineId,
|
|
114
119
|
muted,
|
|
115
120
|
onHold,
|
|
@@ -133,6 +138,7 @@ class Call {
|
|
|
133
138
|
this.startingTime = startingTime;
|
|
134
139
|
this.talkingToIds = talkingToIds || [];
|
|
135
140
|
this.recording = recording;
|
|
141
|
+
this.isVideo = !!isVideo;
|
|
136
142
|
|
|
137
143
|
// Useful to compare instead of instanceof with minified code
|
|
138
144
|
this.type = 'Call';
|
|
@@ -414,7 +414,7 @@ class CallSession {
|
|
|
414
414
|
ringing: call.isRinging(),
|
|
415
415
|
answered: call.isUp(),
|
|
416
416
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
417
|
-
cameraEnabled:
|
|
417
|
+
cameraEnabled: call.isVideo,
|
|
418
418
|
dialedExtension: call.dialedExtension,
|
|
419
419
|
call,
|
|
420
420
|
conference: false, // @FIXME?
|
package/esm/domain/Features.js
CHANGED
|
@@ -3051,6 +3051,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3051
3051
|
|
|
3052
3052
|
|
|
3053
3053
|
|
|
3054
|
+
|
|
3054
3055
|
|
|
3055
3056
|
|
|
3056
3057
|
|
|
@@ -3061,6 +3062,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3061
3062
|
|
|
3062
3063
|
|
|
3063
3064
|
|
|
3065
|
+
|
|
3064
3066
|
|
|
3065
3067
|
|
|
3066
3068
|
|
|
@@ -3089,6 +3091,7 @@ class Call {
|
|
|
3089
3091
|
|
|
3090
3092
|
|
|
3091
3093
|
|
|
3094
|
+
|
|
3092
3095
|
|
|
3093
3096
|
|
|
3094
3097
|
|
|
@@ -3113,6 +3116,7 @@ class Call {
|
|
|
3113
3116
|
calleeNumber: plain.peer_caller_id_number,
|
|
3114
3117
|
dialedExtension: plain.dialed_extension,
|
|
3115
3118
|
isCaller: plain.is_caller,
|
|
3119
|
+
isVideo: plain.is_video,
|
|
3116
3120
|
muted: plain.muted,
|
|
3117
3121
|
onHold: plain.on_hold,
|
|
3118
3122
|
status: plain.status,
|
|
@@ -3136,6 +3140,7 @@ class Call {
|
|
|
3136
3140
|
calleeNumber,
|
|
3137
3141
|
dialedExtension,
|
|
3138
3142
|
isCaller,
|
|
3143
|
+
isVideo,
|
|
3139
3144
|
lineId,
|
|
3140
3145
|
muted,
|
|
3141
3146
|
onHold,
|
|
@@ -3159,6 +3164,7 @@ class Call {
|
|
|
3159
3164
|
this.startingTime = startingTime;
|
|
3160
3165
|
this.talkingToIds = talkingToIds || [];
|
|
3161
3166
|
this.recording = recording;
|
|
3167
|
+
this.isVideo = !!isVideo;
|
|
3162
3168
|
|
|
3163
3169
|
// Useful to compare instead of instanceof with minified code
|
|
3164
3170
|
this.type = 'Call';
|
|
@@ -1513,6 +1513,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
1513
1513
|
|
|
1514
1514
|
|
|
1515
1515
|
|
|
1516
|
+
|
|
1516
1517
|
|
|
1517
1518
|
|
|
1518
1519
|
|
|
@@ -1523,6 +1524,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
1523
1524
|
|
|
1524
1525
|
|
|
1525
1526
|
|
|
1527
|
+
|
|
1526
1528
|
|
|
1527
1529
|
|
|
1528
1530
|
|
|
@@ -1551,6 +1553,7 @@ class Call {
|
|
|
1551
1553
|
|
|
1552
1554
|
|
|
1553
1555
|
|
|
1556
|
+
|
|
1554
1557
|
|
|
1555
1558
|
|
|
1556
1559
|
|
|
@@ -1575,6 +1578,7 @@ class Call {
|
|
|
1575
1578
|
calleeNumber: plain.peer_caller_id_number,
|
|
1576
1579
|
dialedExtension: plain.dialed_extension,
|
|
1577
1580
|
isCaller: plain.is_caller,
|
|
1581
|
+
isVideo: plain.is_video,
|
|
1578
1582
|
muted: plain.muted,
|
|
1579
1583
|
onHold: plain.on_hold,
|
|
1580
1584
|
status: plain.status,
|
|
@@ -1598,6 +1602,7 @@ class Call {
|
|
|
1598
1602
|
calleeNumber,
|
|
1599
1603
|
dialedExtension,
|
|
1600
1604
|
isCaller,
|
|
1605
|
+
isVideo,
|
|
1601
1606
|
lineId,
|
|
1602
1607
|
muted,
|
|
1603
1608
|
onHold,
|
|
@@ -1621,6 +1626,7 @@ class Call {
|
|
|
1621
1626
|
this.startingTime = startingTime;
|
|
1622
1627
|
this.talkingToIds = talkingToIds || [];
|
|
1623
1628
|
this.recording = recording;
|
|
1629
|
+
this.isVideo = !!isVideo;
|
|
1624
1630
|
|
|
1625
1631
|
// Useful to compare instead of instanceof with minified code
|
|
1626
1632
|
this.type = 'Call';
|
|
@@ -2094,7 +2100,7 @@ class CallSession {
|
|
|
2094
2100
|
ringing: call.isRinging(),
|
|
2095
2101
|
answered: call.isUp(),
|
|
2096
2102
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
2097
|
-
cameraEnabled:
|
|
2103
|
+
cameraEnabled: call.isVideo,
|
|
2098
2104
|
dialedExtension: call.dialedExtension,
|
|
2099
2105
|
call,
|
|
2100
2106
|
conference: false, // @FIXME?
|
|
@@ -436,7 +436,7 @@ class CallSession {
|
|
|
436
436
|
ringing: call.isRinging(),
|
|
437
437
|
answered: call.isUp(),
|
|
438
438
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
439
|
-
cameraEnabled:
|
|
439
|
+
cameraEnabled: call.isVideo,
|
|
440
440
|
dialedExtension: call.dialedExtension,
|
|
441
441
|
call,
|
|
442
442
|
conference: false, // @FIXME?
|
|
@@ -1570,10 +1570,10 @@ class WebRTCPhone extends Emitter {
|
|
|
1570
1570
|
this.audioRingVolume = volume;
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
|
-
changeAudioInputDevice(id ) {
|
|
1573
|
+
changeAudioInputDevice(id , force ) {
|
|
1574
1574
|
logger.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
1575
1575
|
|
|
1576
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
1576
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
1579
|
changeVideoInputDevice(id ) {
|
|
@@ -25,6 +25,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
|
|
@@ -35,6 +36,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
|
|
@@ -63,6 +65,7 @@ class Call {
|
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
|
|
68
|
+
|
|
66
69
|
|
|
67
70
|
|
|
68
71
|
|
|
@@ -87,6 +90,7 @@ class Call {
|
|
|
87
90
|
calleeNumber: plain.peer_caller_id_number,
|
|
88
91
|
dialedExtension: plain.dialed_extension,
|
|
89
92
|
isCaller: plain.is_caller,
|
|
93
|
+
isVideo: plain.is_video,
|
|
90
94
|
muted: plain.muted,
|
|
91
95
|
onHold: plain.on_hold,
|
|
92
96
|
status: plain.status,
|
|
@@ -110,6 +114,7 @@ class Call {
|
|
|
110
114
|
calleeNumber,
|
|
111
115
|
dialedExtension,
|
|
112
116
|
isCaller,
|
|
117
|
+
isVideo,
|
|
113
118
|
lineId,
|
|
114
119
|
muted,
|
|
115
120
|
onHold,
|
|
@@ -133,6 +138,7 @@ class Call {
|
|
|
133
138
|
this.startingTime = startingTime;
|
|
134
139
|
this.talkingToIds = talkingToIds || [];
|
|
135
140
|
this.recording = recording;
|
|
141
|
+
this.isVideo = !!isVideo;
|
|
136
142
|
|
|
137
143
|
// Useful to compare instead of instanceof with minified code
|
|
138
144
|
this.type = 'Call';
|
|
@@ -414,7 +414,7 @@ class CallSession {
|
|
|
414
414
|
ringing: call.isRinging(),
|
|
415
415
|
answered: call.isUp(),
|
|
416
416
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
417
|
-
cameraEnabled:
|
|
417
|
+
cameraEnabled: call.isVideo,
|
|
418
418
|
dialedExtension: call.dialedExtension,
|
|
419
419
|
call,
|
|
420
420
|
conference: false, // @FIXME?
|
|
@@ -414,7 +414,7 @@ class CallSession {
|
|
|
414
414
|
ringing: call.isRinging(),
|
|
415
415
|
answered: call.isUp(),
|
|
416
416
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
417
|
-
cameraEnabled:
|
|
417
|
+
cameraEnabled: call.isVideo,
|
|
418
418
|
dialedExtension: call.dialedExtension,
|
|
419
419
|
call,
|
|
420
420
|
conference: false, // @FIXME?
|
|
@@ -414,7 +414,7 @@ class CallSession {
|
|
|
414
414
|
ringing: call.isRinging(),
|
|
415
415
|
answered: call.isUp(),
|
|
416
416
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
417
|
-
cameraEnabled:
|
|
417
|
+
cameraEnabled: call.isVideo,
|
|
418
418
|
dialedExtension: call.dialedExtension,
|
|
419
419
|
call,
|
|
420
420
|
conference: false, // @FIXME?
|
package/esm/index.js
CHANGED
|
@@ -3072,6 +3072,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
3074
|
|
|
3075
|
+
|
|
3075
3076
|
|
|
3076
3077
|
|
|
3077
3078
|
|
|
@@ -3082,6 +3083,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3084
3085
|
|
|
3086
|
+
|
|
3085
3087
|
|
|
3086
3088
|
|
|
3087
3089
|
|
|
@@ -3110,6 +3112,7 @@ class Call {
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3112
3114
|
|
|
3115
|
+
|
|
3113
3116
|
|
|
3114
3117
|
|
|
3115
3118
|
|
|
@@ -3134,6 +3137,7 @@ class Call {
|
|
|
3134
3137
|
calleeNumber: plain.peer_caller_id_number,
|
|
3135
3138
|
dialedExtension: plain.dialed_extension,
|
|
3136
3139
|
isCaller: plain.is_caller,
|
|
3140
|
+
isVideo: plain.is_video,
|
|
3137
3141
|
muted: plain.muted,
|
|
3138
3142
|
onHold: plain.on_hold,
|
|
3139
3143
|
status: plain.status,
|
|
@@ -3157,6 +3161,7 @@ class Call {
|
|
|
3157
3161
|
calleeNumber,
|
|
3158
3162
|
dialedExtension,
|
|
3159
3163
|
isCaller,
|
|
3164
|
+
isVideo,
|
|
3160
3165
|
lineId,
|
|
3161
3166
|
muted,
|
|
3162
3167
|
onHold,
|
|
@@ -3180,6 +3185,7 @@ class Call {
|
|
|
3180
3185
|
this.startingTime = startingTime;
|
|
3181
3186
|
this.talkingToIds = talkingToIds || [];
|
|
3182
3187
|
this.recording = recording;
|
|
3188
|
+
this.isVideo = !!isVideo;
|
|
3183
3189
|
|
|
3184
3190
|
// Useful to compare instead of instanceof with minified code
|
|
3185
3191
|
this.type = 'Call';
|
|
@@ -3653,7 +3659,7 @@ class CallSession {
|
|
|
3653
3659
|
ringing: call.isRinging(),
|
|
3654
3660
|
answered: call.isUp(),
|
|
3655
3661
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3656
|
-
cameraEnabled:
|
|
3662
|
+
cameraEnabled: call.isVideo,
|
|
3657
3663
|
dialedExtension: call.dialedExtension,
|
|
3658
3664
|
call,
|
|
3659
3665
|
conference: false, // @FIXME?
|
|
@@ -7308,11 +7314,11 @@ class WebRTCClient extends Emitter {
|
|
|
7308
7314
|
});
|
|
7309
7315
|
}
|
|
7310
7316
|
|
|
7311
|
-
changeAudioInputDevice(id , session ) {
|
|
7317
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7312
7318
|
const currentId = this.getAudioDeviceId();
|
|
7313
7319
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7314
7320
|
|
|
7315
|
-
if (id === currentId) {
|
|
7321
|
+
if (!force && id === currentId) {
|
|
7316
7322
|
return null;
|
|
7317
7323
|
}
|
|
7318
7324
|
|
|
@@ -10009,10 +10015,10 @@ class WebRTCPhone extends Emitter {
|
|
|
10009
10015
|
this.audioRingVolume = volume;
|
|
10010
10016
|
}
|
|
10011
10017
|
|
|
10012
|
-
changeAudioInputDevice(id ) {
|
|
10018
|
+
changeAudioInputDevice(id , force ) {
|
|
10013
10019
|
logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
10014
10020
|
|
|
10015
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
10021
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
10016
10022
|
}
|
|
10017
10023
|
|
|
10018
10024
|
changeVideoInputDevice(id ) {
|
package/esm/service/CallApi.js
CHANGED
|
@@ -30,6 +30,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
|
|
@@ -40,6 +41,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
|
|
44
|
+
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
|
|
@@ -68,6 +70,7 @@ class Call {
|
|
|
68
70
|
|
|
69
71
|
|
|
70
72
|
|
|
73
|
+
|
|
71
74
|
|
|
72
75
|
|
|
73
76
|
|
|
@@ -92,6 +95,7 @@ class Call {
|
|
|
92
95
|
calleeNumber: plain.peer_caller_id_number,
|
|
93
96
|
dialedExtension: plain.dialed_extension,
|
|
94
97
|
isCaller: plain.is_caller,
|
|
98
|
+
isVideo: plain.is_video,
|
|
95
99
|
muted: plain.muted,
|
|
96
100
|
onHold: plain.on_hold,
|
|
97
101
|
status: plain.status,
|
|
@@ -115,6 +119,7 @@ class Call {
|
|
|
115
119
|
calleeNumber,
|
|
116
120
|
dialedExtension,
|
|
117
121
|
isCaller,
|
|
122
|
+
isVideo,
|
|
118
123
|
lineId,
|
|
119
124
|
muted,
|
|
120
125
|
onHold,
|
|
@@ -138,6 +143,7 @@ class Call {
|
|
|
138
143
|
this.startingTime = startingTime;
|
|
139
144
|
this.talkingToIds = talkingToIds || [];
|
|
140
145
|
this.recording = recording;
|
|
146
|
+
this.isVideo = !!isVideo;
|
|
141
147
|
|
|
142
148
|
// Useful to compare instead of instanceof with minified code
|
|
143
149
|
this.type = 'Call';
|
|
@@ -3051,6 +3051,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3051
3051
|
|
|
3052
3052
|
|
|
3053
3053
|
|
|
3054
|
+
|
|
3054
3055
|
|
|
3055
3056
|
|
|
3056
3057
|
|
|
@@ -3061,6 +3062,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3061
3062
|
|
|
3062
3063
|
|
|
3063
3064
|
|
|
3065
|
+
|
|
3064
3066
|
|
|
3065
3067
|
|
|
3066
3068
|
|
|
@@ -3089,6 +3091,7 @@ class Call {
|
|
|
3089
3091
|
|
|
3090
3092
|
|
|
3091
3093
|
|
|
3094
|
+
|
|
3092
3095
|
|
|
3093
3096
|
|
|
3094
3097
|
|
|
@@ -3113,6 +3116,7 @@ class Call {
|
|
|
3113
3116
|
calleeNumber: plain.peer_caller_id_number,
|
|
3114
3117
|
dialedExtension: plain.dialed_extension,
|
|
3115
3118
|
isCaller: plain.is_caller,
|
|
3119
|
+
isVideo: plain.is_video,
|
|
3116
3120
|
muted: plain.muted,
|
|
3117
3121
|
onHold: plain.on_hold,
|
|
3118
3122
|
status: plain.status,
|
|
@@ -3136,6 +3140,7 @@ class Call {
|
|
|
3136
3140
|
calleeNumber,
|
|
3137
3141
|
dialedExtension,
|
|
3138
3142
|
isCaller,
|
|
3143
|
+
isVideo,
|
|
3139
3144
|
lineId,
|
|
3140
3145
|
muted,
|
|
3141
3146
|
onHold,
|
|
@@ -3159,6 +3164,7 @@ class Call {
|
|
|
3159
3164
|
this.startingTime = startingTime;
|
|
3160
3165
|
this.talkingToIds = talkingToIds || [];
|
|
3161
3166
|
this.recording = recording;
|
|
3167
|
+
this.isVideo = !!isVideo;
|
|
3162
3168
|
|
|
3163
3169
|
// Useful to compare instead of instanceof with minified code
|
|
3164
3170
|
this.type = 'Call';
|
package/esm/simple/Auth.js
CHANGED
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7486,11 +7492,11 @@ class WebRTCClient extends Emitter {
|
|
|
7486
7492
|
});
|
|
7487
7493
|
}
|
|
7488
7494
|
|
|
7489
|
-
changeAudioInputDevice(id , session ) {
|
|
7495
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7490
7496
|
const currentId = this.getAudioDeviceId();
|
|
7491
7497
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7492
7498
|
|
|
7493
|
-
if (id === currentId) {
|
|
7499
|
+
if (!force && id === currentId) {
|
|
7494
7500
|
return null;
|
|
7495
7501
|
}
|
|
7496
7502
|
|
|
@@ -9286,10 +9292,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9286
9292
|
this.audioRingVolume = volume;
|
|
9287
9293
|
}
|
|
9288
9294
|
|
|
9289
|
-
changeAudioInputDevice(id ) {
|
|
9295
|
+
changeAudioInputDevice(id , force ) {
|
|
9290
9296
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9291
9297
|
|
|
9292
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9298
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9293
9299
|
}
|
|
9294
9300
|
|
|
9295
9301
|
changeVideoInputDevice(id ) {
|
|
@@ -3071,6 +3071,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3071
3071
|
|
|
3072
3072
|
|
|
3073
3073
|
|
|
3074
|
+
|
|
3074
3075
|
|
|
3075
3076
|
|
|
3076
3077
|
|
|
@@ -3081,6 +3082,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3081
3082
|
|
|
3082
3083
|
|
|
3083
3084
|
|
|
3085
|
+
|
|
3084
3086
|
|
|
3085
3087
|
|
|
3086
3088
|
|
|
@@ -3109,6 +3111,7 @@ class Call {
|
|
|
3109
3111
|
|
|
3110
3112
|
|
|
3111
3113
|
|
|
3114
|
+
|
|
3112
3115
|
|
|
3113
3116
|
|
|
3114
3117
|
|
|
@@ -3133,6 +3136,7 @@ class Call {
|
|
|
3133
3136
|
calleeNumber: plain.peer_caller_id_number,
|
|
3134
3137
|
dialedExtension: plain.dialed_extension,
|
|
3135
3138
|
isCaller: plain.is_caller,
|
|
3139
|
+
isVideo: plain.is_video,
|
|
3136
3140
|
muted: plain.muted,
|
|
3137
3141
|
onHold: plain.on_hold,
|
|
3138
3142
|
status: plain.status,
|
|
@@ -3156,6 +3160,7 @@ class Call {
|
|
|
3156
3160
|
calleeNumber,
|
|
3157
3161
|
dialedExtension,
|
|
3158
3162
|
isCaller,
|
|
3163
|
+
isVideo,
|
|
3159
3164
|
lineId,
|
|
3160
3165
|
muted,
|
|
3161
3166
|
onHold,
|
|
@@ -3179,6 +3184,7 @@ class Call {
|
|
|
3179
3184
|
this.startingTime = startingTime;
|
|
3180
3185
|
this.talkingToIds = talkingToIds || [];
|
|
3181
3186
|
this.recording = recording;
|
|
3187
|
+
this.isVideo = !!isVideo;
|
|
3182
3188
|
|
|
3183
3189
|
// Useful to compare instead of instanceof with minified code
|
|
3184
3190
|
this.type = 'Call';
|
|
@@ -3652,7 +3658,7 @@ class CallSession {
|
|
|
3652
3658
|
ringing: call.isRinging(),
|
|
3653
3659
|
answered: call.isUp(),
|
|
3654
3660
|
answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
|
|
3655
|
-
cameraEnabled:
|
|
3661
|
+
cameraEnabled: call.isVideo,
|
|
3656
3662
|
dialedExtension: call.dialedExtension,
|
|
3657
3663
|
call,
|
|
3658
3664
|
conference: false, // @FIXME?
|
|
@@ -7486,11 +7492,11 @@ class WebRTCClient extends Emitter {
|
|
|
7486
7492
|
});
|
|
7487
7493
|
}
|
|
7488
7494
|
|
|
7489
|
-
changeAudioInputDevice(id , session ) {
|
|
7495
|
+
changeAudioInputDevice(id , session , force ) {
|
|
7490
7496
|
const currentId = this.getAudioDeviceId();
|
|
7491
7497
|
logger$9.info('setting audio input device', { id, currentId, session: !!session });
|
|
7492
7498
|
|
|
7493
|
-
if (id === currentId) {
|
|
7499
|
+
if (!force && id === currentId) {
|
|
7494
7500
|
return null;
|
|
7495
7501
|
}
|
|
7496
7502
|
|
|
@@ -9286,10 +9292,10 @@ class WebRTCPhone extends Emitter {
|
|
|
9286
9292
|
this.audioRingVolume = volume;
|
|
9287
9293
|
}
|
|
9288
9294
|
|
|
9289
|
-
changeAudioInputDevice(id ) {
|
|
9295
|
+
changeAudioInputDevice(id , force ) {
|
|
9290
9296
|
logger$8.info('WebRTC phone - changeAudio input device', { deviceId: id });
|
|
9291
9297
|
|
|
9292
|
-
return this.client.changeAudioInputDevice(id, this.currentSipSession);
|
|
9298
|
+
return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
|
|
9293
9299
|
}
|
|
9294
9300
|
|
|
9295
9301
|
changeVideoInputDevice(id ) {
|
package/esm/simple/Directory.js
CHANGED
|
@@ -3051,6 +3051,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3051
3051
|
|
|
3052
3052
|
|
|
3053
3053
|
|
|
3054
|
+
|
|
3054
3055
|
|
|
3055
3056
|
|
|
3056
3057
|
|
|
@@ -3061,6 +3062,7 @@ const RECORD_STATE_ACTIVE = 'active';
|
|
|
3061
3062
|
|
|
3062
3063
|
|
|
3063
3064
|
|
|
3065
|
+
|
|
3064
3066
|
|
|
3065
3067
|
|
|
3066
3068
|
|
|
@@ -3089,6 +3091,7 @@ class Call {
|
|
|
3089
3091
|
|
|
3090
3092
|
|
|
3091
3093
|
|
|
3094
|
+
|
|
3092
3095
|
|
|
3093
3096
|
|
|
3094
3097
|
|
|
@@ -3113,6 +3116,7 @@ class Call {
|
|
|
3113
3116
|
calleeNumber: plain.peer_caller_id_number,
|
|
3114
3117
|
dialedExtension: plain.dialed_extension,
|
|
3115
3118
|
isCaller: plain.is_caller,
|
|
3119
|
+
isVideo: plain.is_video,
|
|
3116
3120
|
muted: plain.muted,
|
|
3117
3121
|
onHold: plain.on_hold,
|
|
3118
3122
|
status: plain.status,
|
|
@@ -3136,6 +3140,7 @@ class Call {
|
|
|
3136
3140
|
calleeNumber,
|
|
3137
3141
|
dialedExtension,
|
|
3138
3142
|
isCaller,
|
|
3143
|
+
isVideo,
|
|
3139
3144
|
lineId,
|
|
3140
3145
|
muted,
|
|
3141
3146
|
onHold,
|
|
@@ -3159,6 +3164,7 @@ class Call {
|
|
|
3159
3164
|
this.startingTime = startingTime;
|
|
3160
3165
|
this.talkingToIds = talkingToIds || [];
|
|
3161
3166
|
this.recording = recording;
|
|
3167
|
+
this.isVideo = !!isVideo;
|
|
3162
3168
|
|
|
3163
3169
|
// Useful to compare instead of instanceof with minified code
|
|
3164
3170
|
this.type = 'Call';
|