@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.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +6 -0
  4. package/esm/__tests__/web-rtc-client.test.js +58 -2
  5. package/esm/api/calld.js +6 -0
  6. package/esm/api/ctid-ng.js +6 -0
  7. package/esm/api-client.js +6 -0
  8. package/esm/checker/Checker.js +8 -2
  9. package/esm/checker/checks/aor.js +6 -0
  10. package/esm/checker/checks/api.js +6 -0
  11. package/esm/checker/checks/index.js +8 -2
  12. package/esm/checker/checks/webrtc-transport.js +8 -2
  13. package/esm/checker/checks/webrtc.js +8 -2
  14. package/esm/domain/AdHocAPIConference.js +6 -0
  15. package/esm/domain/Call.js +6 -0
  16. package/esm/domain/CallSession.js +1 -1
  17. package/esm/domain/Features.js +6 -0
  18. package/esm/domain/Phone/CTIPhone.js +7 -1
  19. package/esm/domain/Phone/WebRTCPhone.js +3 -3
  20. package/esm/domain/__tests__/Call.test.js +6 -0
  21. package/esm/domain/__tests__/CallSession.test.js +1 -1
  22. package/esm/domain/__tests__/IndirectTransfer.test.js +1 -1
  23. package/esm/domain/__tests__/Room.test.js +1 -1
  24. package/esm/index.js +11 -5
  25. package/esm/service/CallApi.js +6 -0
  26. package/esm/service/getApiClient.js +6 -0
  27. package/esm/simple/Auth.js +11 -5
  28. package/esm/simple/Configuration.js +11 -5
  29. package/esm/simple/Directory.js +6 -0
  30. package/esm/simple/Phone.js +11 -5
  31. package/esm/simple/index.js +11 -5
  32. package/esm/simple/room/LocalParticipant.js +11 -5
  33. package/esm/simple/room/Participant.js +11 -5
  34. package/esm/simple/room/RemoteParticipant.js +11 -5
  35. package/esm/simple/room/Room.js +11 -5
  36. package/esm/simple/room/SipRoom.js +11 -5
  37. package/esm/simple/room/Stream.js +11 -5
  38. package/esm/simple/room/__tests__/RemoteParticipant.test.js +11 -5
  39. package/esm/simple/utils.js +11 -5
  40. package/esm/web-rtc-client.js +8 -2
  41. package/lib/__tests__/api-client.test.js +6 -0
  42. package/lib/__tests__/web-rtc-client.test.js +58 -2
  43. package/lib/api/calld.js +6 -0
  44. package/lib/api/ctid-ng.js +6 -0
  45. package/lib/api-client.js +6 -0
  46. package/lib/checker/Checker.js +8 -2
  47. package/lib/checker/checks/aor.js +6 -0
  48. package/lib/checker/checks/api.js +6 -0
  49. package/lib/checker/checks/index.js +8 -2
  50. package/lib/checker/checks/webrtc-transport.js +8 -2
  51. package/lib/checker/checks/webrtc.js +8 -2
  52. package/lib/domain/AdHocAPIConference.js +6 -0
  53. package/lib/domain/Call.js +6 -0
  54. package/lib/domain/CallSession.js +1 -1
  55. package/lib/domain/Features.js +6 -0
  56. package/lib/domain/Phone/CTIPhone.js +7 -1
  57. package/lib/domain/Phone/WebRTCPhone.js +3 -3
  58. package/lib/domain/__tests__/Call.test.js +6 -0
  59. package/lib/domain/__tests__/CallSession.test.js +1 -1
  60. package/lib/domain/__tests__/IndirectTransfer.test.js +1 -1
  61. package/lib/domain/__tests__/Room.test.js +1 -1
  62. package/lib/index.js +11 -5
  63. package/lib/service/CallApi.js +6 -0
  64. package/lib/service/getApiClient.js +6 -0
  65. package/lib/simple/Auth.js +11 -5
  66. package/lib/simple/Configuration.js +11 -5
  67. package/lib/simple/Directory.js +6 -0
  68. package/lib/simple/Phone.js +11 -5
  69. package/lib/simple/index.js +11 -5
  70. package/lib/simple/room/LocalParticipant.js +11 -5
  71. package/lib/simple/room/Participant.js +11 -5
  72. package/lib/simple/room/RemoteParticipant.js +11 -5
  73. package/lib/simple/room/Room.js +11 -5
  74. package/lib/simple/room/SipRoom.js +11 -5
  75. package/lib/simple/room/Stream.js +11 -5
  76. package/lib/simple/room/__tests__/RemoteParticipant.test.js +11 -5
  77. package/lib/simple/utils.js +11 -5
  78. package/lib/web-rtc-client.js +8 -2
  79. package/package.json +1 -1
  80. package/src/__tests__/web-rtc-client.test.js +50 -0
  81. package/src/domain/Call.js +6 -0
  82. package/src/domain/CallSession.js +1 -1
  83. package/src/domain/Phone/WebRTCPhone.js +2 -2
  84. package/src/web-rtc-client.js +2 -2
@@ -3079,6 +3079,7 @@ const RECORD_STATE_ACTIVE = 'active';
3079
3079
 
3080
3080
 
3081
3081
 
3082
+
3082
3083
 
3083
3084
 
3084
3085
 
@@ -3089,6 +3090,7 @@ const RECORD_STATE_ACTIVE = 'active';
3089
3090
 
3090
3091
 
3091
3092
 
3093
+
3092
3094
 
3093
3095
 
3094
3096
 
@@ -3117,6 +3119,7 @@ class Call {
3117
3119
 
3118
3120
 
3119
3121
 
3122
+
3120
3123
 
3121
3124
 
3122
3125
 
@@ -3141,6 +3144,7 @@ class Call {
3141
3144
  calleeNumber: plain.peer_caller_id_number,
3142
3145
  dialedExtension: plain.dialed_extension,
3143
3146
  isCaller: plain.is_caller,
3147
+ isVideo: plain.is_video,
3144
3148
  muted: plain.muted,
3145
3149
  onHold: plain.on_hold,
3146
3150
  status: plain.status,
@@ -3164,6 +3168,7 @@ class Call {
3164
3168
  calleeNumber,
3165
3169
  dialedExtension,
3166
3170
  isCaller,
3171
+ isVideo,
3167
3172
  lineId,
3168
3173
  muted,
3169
3174
  onHold,
@@ -3187,6 +3192,7 @@ class Call {
3187
3192
  this.startingTime = startingTime;
3188
3193
  this.talkingToIds = talkingToIds || [];
3189
3194
  this.recording = recording;
3195
+ this.isVideo = !!isVideo;
3190
3196
 
3191
3197
  // Useful to compare instead of instanceof with minified code
3192
3198
  this.type = 'Call';
@@ -7009,11 +7015,11 @@ class WebRTCClient extends Emitter {
7009
7015
  });
7010
7016
  }
7011
7017
 
7012
- changeAudioInputDevice(id , session ) {
7018
+ changeAudioInputDevice(id , session , force ) {
7013
7019
  const currentId = this.getAudioDeviceId();
7014
7020
  logger.info('setting audio input device', { id, currentId, session: !!session });
7015
7021
 
7016
- if (id === currentId) {
7022
+ if (!force && id === currentId) {
7017
7023
  return null;
7018
7024
  }
7019
7025
 
@@ -3616,6 +3616,7 @@ const RECORD_STATE_ACTIVE = 'active';
3616
3616
 
3617
3617
 
3618
3618
 
3619
+
3619
3620
 
3620
3621
 
3621
3622
 
@@ -3626,6 +3627,7 @@ const RECORD_STATE_ACTIVE = 'active';
3626
3627
 
3627
3628
 
3628
3629
 
3630
+
3629
3631
 
3630
3632
 
3631
3633
 
@@ -3654,6 +3656,7 @@ class Call {
3654
3656
 
3655
3657
 
3656
3658
 
3659
+
3657
3660
 
3658
3661
 
3659
3662
 
@@ -3678,6 +3681,7 @@ class Call {
3678
3681
  calleeNumber: plain.peer_caller_id_number,
3679
3682
  dialedExtension: plain.dialed_extension,
3680
3683
  isCaller: plain.is_caller,
3684
+ isVideo: plain.is_video,
3681
3685
  muted: plain.muted,
3682
3686
  onHold: plain.on_hold,
3683
3687
  status: plain.status,
@@ -3701,6 +3705,7 @@ class Call {
3701
3705
  calleeNumber,
3702
3706
  dialedExtension,
3703
3707
  isCaller,
3708
+ isVideo,
3704
3709
  lineId,
3705
3710
  muted,
3706
3711
  onHold,
@@ -3724,6 +3729,7 @@ class Call {
3724
3729
  this.startingTime = startingTime;
3725
3730
  this.talkingToIds = talkingToIds || [];
3726
3731
  this.recording = recording;
3732
+ this.isVideo = !!isVideo;
3727
3733
 
3728
3734
  // Useful to compare instead of instanceof with minified code
3729
3735
  this.type = 'Call';
@@ -6423,11 +6429,11 @@ class WebRTCClient extends Emitter {
6423
6429
  });
6424
6430
  }
6425
6431
 
6426
- changeAudioInputDevice(id , session ) {
6432
+ changeAudioInputDevice(id , session , force ) {
6427
6433
  const currentId = this.getAudioDeviceId();
6428
6434
  logger.info('setting audio input device', { id, currentId, session: !!session });
6429
6435
 
6430
- if (id === currentId) {
6436
+ if (!force && id === currentId) {
6431
6437
  return null;
6432
6438
  }
6433
6439
 
@@ -3616,6 +3616,7 @@ const RECORD_STATE_ACTIVE = 'active';
3616
3616
 
3617
3617
 
3618
3618
 
3619
+
3619
3620
 
3620
3621
 
3621
3622
 
@@ -3626,6 +3627,7 @@ const RECORD_STATE_ACTIVE = 'active';
3626
3627
 
3627
3628
 
3628
3629
 
3630
+
3629
3631
 
3630
3632
 
3631
3633
 
@@ -3654,6 +3656,7 @@ class Call {
3654
3656
 
3655
3657
 
3656
3658
 
3659
+
3657
3660
 
3658
3661
 
3659
3662
 
@@ -3678,6 +3681,7 @@ class Call {
3678
3681
  calleeNumber: plain.peer_caller_id_number,
3679
3682
  dialedExtension: plain.dialed_extension,
3680
3683
  isCaller: plain.is_caller,
3684
+ isVideo: plain.is_video,
3681
3685
  muted: plain.muted,
3682
3686
  onHold: plain.on_hold,
3683
3687
  status: plain.status,
@@ -3701,6 +3705,7 @@ class Call {
3701
3705
  calleeNumber,
3702
3706
  dialedExtension,
3703
3707
  isCaller,
3708
+ isVideo,
3704
3709
  lineId,
3705
3710
  muted,
3706
3711
  onHold,
@@ -3724,6 +3729,7 @@ class Call {
3724
3729
  this.startingTime = startingTime;
3725
3730
  this.talkingToIds = talkingToIds || [];
3726
3731
  this.recording = recording;
3732
+ this.isVideo = !!isVideo;
3727
3733
 
3728
3734
  // Useful to compare instead of instanceof with minified code
3729
3735
  this.type = 'Call';
@@ -6423,11 +6429,11 @@ class WebRTCClient extends Emitter {
6423
6429
  });
6424
6430
  }
6425
6431
 
6426
- changeAudioInputDevice(id , session ) {
6432
+ changeAudioInputDevice(id , session , force ) {
6427
6433
  const currentId = this.getAudioDeviceId();
6428
6434
  logger.info('setting audio input device', { id, currentId, session: !!session });
6429
6435
 
6430
- if (id === currentId) {
6436
+ if (!force && id === currentId) {
6431
6437
  return null;
6432
6438
  }
6433
6439
 
@@ -36,6 +36,7 @@ const RECORD_STATE_ACTIVE = 'active';
36
36
 
37
37
 
38
38
 
39
+
39
40
 
40
41
 
41
42
 
@@ -46,6 +47,7 @@ const RECORD_STATE_ACTIVE = 'active';
46
47
 
47
48
 
48
49
 
50
+
49
51
 
50
52
 
51
53
 
@@ -74,6 +76,7 @@ class Call {
74
76
 
75
77
 
76
78
 
79
+
77
80
 
78
81
 
79
82
 
@@ -98,6 +101,7 @@ class Call {
98
101
  calleeNumber: plain.peer_caller_id_number,
99
102
  dialedExtension: plain.dialed_extension,
100
103
  isCaller: plain.is_caller,
104
+ isVideo: plain.is_video,
101
105
  muted: plain.muted,
102
106
  onHold: plain.on_hold,
103
107
  status: plain.status,
@@ -121,6 +125,7 @@ class Call {
121
125
  calleeNumber,
122
126
  dialedExtension,
123
127
  isCaller,
128
+ isVideo,
124
129
  lineId,
125
130
  muted,
126
131
  onHold,
@@ -144,6 +149,7 @@ class Call {
144
149
  this.startingTime = startingTime;
145
150
  this.talkingToIds = talkingToIds || [];
146
151
  this.recording = recording;
152
+ this.isVideo = !!isVideo;
147
153
 
148
154
  // Useful to compare instead of instanceof with minified code
149
155
  this.type = 'Call';
@@ -31,6 +31,7 @@ const RECORD_STATE_ACTIVE = 'active';
31
31
 
32
32
 
33
33
 
34
+
34
35
 
35
36
 
36
37
 
@@ -41,6 +42,7 @@ const RECORD_STATE_ACTIVE = 'active';
41
42
 
42
43
 
43
44
 
45
+
44
46
 
45
47
 
46
48
 
@@ -69,6 +71,7 @@ class Call {
69
71
 
70
72
 
71
73
 
74
+
72
75
 
73
76
 
74
77
 
@@ -93,6 +96,7 @@ class Call {
93
96
  calleeNumber: plain.peer_caller_id_number,
94
97
  dialedExtension: plain.dialed_extension,
95
98
  isCaller: plain.is_caller,
99
+ isVideo: plain.is_video,
96
100
  muted: plain.muted,
97
101
  onHold: plain.on_hold,
98
102
  status: plain.status,
@@ -116,6 +120,7 @@ class Call {
116
120
  calleeNumber,
117
121
  dialedExtension,
118
122
  isCaller,
123
+ isVideo,
119
124
  lineId,
120
125
  muted,
121
126
  onHold,
@@ -139,6 +144,7 @@ class Call {
139
144
  this.startingTime = startingTime;
140
145
  this.talkingToIds = talkingToIds || [];
141
146
  this.recording = recording;
147
+ this.isVideo = !!isVideo;
142
148
 
143
149
  // Useful to compare instead of instanceof with minified code
144
150
  this.type = 'Call';
@@ -416,7 +416,7 @@ class CallSession {
416
416
  ringing: call.isRinging(),
417
417
  answered: call.isUp(),
418
418
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
419
- cameraEnabled: false,
419
+ cameraEnabled: call.isVideo,
420
420
  dialedExtension: call.dialedExtension,
421
421
  call,
422
422
  conference: false, // @FIXME?
@@ -3059,6 +3059,7 @@ const RECORD_STATE_ACTIVE = 'active';
3059
3059
 
3060
3060
 
3061
3061
 
3062
+
3062
3063
 
3063
3064
 
3064
3065
 
@@ -3069,6 +3070,7 @@ const RECORD_STATE_ACTIVE = 'active';
3069
3070
 
3070
3071
 
3071
3072
 
3073
+
3072
3074
 
3073
3075
 
3074
3076
 
@@ -3097,6 +3099,7 @@ class Call {
3097
3099
 
3098
3100
 
3099
3101
 
3102
+
3100
3103
 
3101
3104
 
3102
3105
 
@@ -3121,6 +3124,7 @@ class Call {
3121
3124
  calleeNumber: plain.peer_caller_id_number,
3122
3125
  dialedExtension: plain.dialed_extension,
3123
3126
  isCaller: plain.is_caller,
3127
+ isVideo: plain.is_video,
3124
3128
  muted: plain.muted,
3125
3129
  onHold: plain.on_hold,
3126
3130
  status: plain.status,
@@ -3144,6 +3148,7 @@ class Call {
3144
3148
  calleeNumber,
3145
3149
  dialedExtension,
3146
3150
  isCaller,
3151
+ isVideo,
3147
3152
  lineId,
3148
3153
  muted,
3149
3154
  onHold,
@@ -3167,6 +3172,7 @@ class Call {
3167
3172
  this.startingTime = startingTime;
3168
3173
  this.talkingToIds = talkingToIds || [];
3169
3174
  this.recording = recording;
3175
+ this.isVideo = !!isVideo;
3170
3176
 
3171
3177
  // Useful to compare instead of instanceof with minified code
3172
3178
  this.type = 'Call';
@@ -1522,6 +1522,7 @@ const RECORD_STATE_ACTIVE = 'active';
1522
1522
 
1523
1523
 
1524
1524
 
1525
+
1525
1526
 
1526
1527
 
1527
1528
 
@@ -1532,6 +1533,7 @@ const RECORD_STATE_ACTIVE = 'active';
1532
1533
 
1533
1534
 
1534
1535
 
1536
+
1535
1537
 
1536
1538
 
1537
1539
 
@@ -1560,6 +1562,7 @@ class Call {
1560
1562
 
1561
1563
 
1562
1564
 
1565
+
1563
1566
 
1564
1567
 
1565
1568
 
@@ -1584,6 +1587,7 @@ class Call {
1584
1587
  calleeNumber: plain.peer_caller_id_number,
1585
1588
  dialedExtension: plain.dialed_extension,
1586
1589
  isCaller: plain.is_caller,
1590
+ isVideo: plain.is_video,
1587
1591
  muted: plain.muted,
1588
1592
  onHold: plain.on_hold,
1589
1593
  status: plain.status,
@@ -1607,6 +1611,7 @@ class Call {
1607
1611
  calleeNumber,
1608
1612
  dialedExtension,
1609
1613
  isCaller,
1614
+ isVideo,
1610
1615
  lineId,
1611
1616
  muted,
1612
1617
  onHold,
@@ -1630,6 +1635,7 @@ class Call {
1630
1635
  this.startingTime = startingTime;
1631
1636
  this.talkingToIds = talkingToIds || [];
1632
1637
  this.recording = recording;
1638
+ this.isVideo = !!isVideo;
1633
1639
 
1634
1640
  // Useful to compare instead of instanceof with minified code
1635
1641
  this.type = 'Call';
@@ -2103,7 +2109,7 @@ class CallSession {
2103
2109
  ringing: call.isRinging(),
2104
2110
  answered: call.isUp(),
2105
2111
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
2106
- cameraEnabled: false,
2112
+ cameraEnabled: call.isVideo,
2107
2113
  dialedExtension: call.dialedExtension,
2108
2114
  call,
2109
2115
  conference: false, // @FIXME?
@@ -445,7 +445,7 @@ class CallSession {
445
445
  ringing: call.isRinging(),
446
446
  answered: call.isUp(),
447
447
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
448
- cameraEnabled: false,
448
+ cameraEnabled: call.isVideo,
449
449
  dialedExtension: call.dialedExtension,
450
450
  call,
451
451
  conference: false, // @FIXME?
@@ -1579,10 +1579,10 @@ class WebRTCPhone extends Emitter {
1579
1579
  this.audioRingVolume = volume;
1580
1580
  }
1581
1581
 
1582
- changeAudioInputDevice(id ) {
1582
+ changeAudioInputDevice(id , force ) {
1583
1583
  logger.info('WebRTC phone - changeAudio input device', { deviceId: id });
1584
1584
 
1585
- return this.client.changeAudioInputDevice(id, this.currentSipSession);
1585
+ return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
1586
1586
  }
1587
1587
 
1588
1588
  changeVideoInputDevice(id ) {
@@ -31,6 +31,7 @@ const RECORD_STATE_ACTIVE = 'active';
31
31
 
32
32
 
33
33
 
34
+
34
35
 
35
36
 
36
37
 
@@ -41,6 +42,7 @@ const RECORD_STATE_ACTIVE = 'active';
41
42
 
42
43
 
43
44
 
45
+
44
46
 
45
47
 
46
48
 
@@ -69,6 +71,7 @@ class Call {
69
71
 
70
72
 
71
73
 
74
+
72
75
 
73
76
 
74
77
 
@@ -93,6 +96,7 @@ class Call {
93
96
  calleeNumber: plain.peer_caller_id_number,
94
97
  dialedExtension: plain.dialed_extension,
95
98
  isCaller: plain.is_caller,
99
+ isVideo: plain.is_video,
96
100
  muted: plain.muted,
97
101
  onHold: plain.on_hold,
98
102
  status: plain.status,
@@ -116,6 +120,7 @@ class Call {
116
120
  calleeNumber,
117
121
  dialedExtension,
118
122
  isCaller,
123
+ isVideo,
119
124
  lineId,
120
125
  muted,
121
126
  onHold,
@@ -139,6 +144,7 @@ class Call {
139
144
  this.startingTime = startingTime;
140
145
  this.talkingToIds = talkingToIds || [];
141
146
  this.recording = recording;
147
+ this.isVideo = !!isVideo;
142
148
 
143
149
  // Useful to compare instead of instanceof with minified code
144
150
  this.type = 'Call';
@@ -416,7 +416,7 @@ class CallSession {
416
416
  ringing: call.isRinging(),
417
417
  answered: call.isUp(),
418
418
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
419
- cameraEnabled: false,
419
+ cameraEnabled: call.isVideo,
420
420
  dialedExtension: call.dialedExtension,
421
421
  call,
422
422
  conference: false, // @FIXME?
@@ -416,7 +416,7 @@ class CallSession {
416
416
  ringing: call.isRinging(),
417
417
  answered: call.isUp(),
418
418
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
419
- cameraEnabled: false,
419
+ cameraEnabled: call.isVideo,
420
420
  dialedExtension: call.dialedExtension,
421
421
  call,
422
422
  conference: false, // @FIXME?
@@ -416,7 +416,7 @@ class CallSession {
416
416
  ringing: call.isRinging(),
417
417
  answered: call.isUp(),
418
418
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
419
- cameraEnabled: false,
419
+ cameraEnabled: call.isVideo,
420
420
  dialedExtension: call.dialedExtension,
421
421
  call,
422
422
  conference: false, // @FIXME?
package/lib/index.js CHANGED
@@ -3083,6 +3083,7 @@ const RECORD_STATE_ACTIVE = 'active';
3083
3083
 
3084
3084
 
3085
3085
 
3086
+
3086
3087
 
3087
3088
 
3088
3089
 
@@ -3093,6 +3094,7 @@ const RECORD_STATE_ACTIVE = 'active';
3093
3094
 
3094
3095
 
3095
3096
 
3097
+
3096
3098
 
3097
3099
 
3098
3100
 
@@ -3121,6 +3123,7 @@ class Call {
3121
3123
 
3122
3124
 
3123
3125
 
3126
+
3124
3127
 
3125
3128
 
3126
3129
 
@@ -3145,6 +3148,7 @@ class Call {
3145
3148
  calleeNumber: plain.peer_caller_id_number,
3146
3149
  dialedExtension: plain.dialed_extension,
3147
3150
  isCaller: plain.is_caller,
3151
+ isVideo: plain.is_video,
3148
3152
  muted: plain.muted,
3149
3153
  onHold: plain.on_hold,
3150
3154
  status: plain.status,
@@ -3168,6 +3172,7 @@ class Call {
3168
3172
  calleeNumber,
3169
3173
  dialedExtension,
3170
3174
  isCaller,
3175
+ isVideo,
3171
3176
  lineId,
3172
3177
  muted,
3173
3178
  onHold,
@@ -3191,6 +3196,7 @@ class Call {
3191
3196
  this.startingTime = startingTime;
3192
3197
  this.talkingToIds = talkingToIds || [];
3193
3198
  this.recording = recording;
3199
+ this.isVideo = !!isVideo;
3194
3200
 
3195
3201
  // Useful to compare instead of instanceof with minified code
3196
3202
  this.type = 'Call';
@@ -3664,7 +3670,7 @@ class CallSession {
3664
3670
  ringing: call.isRinging(),
3665
3671
  answered: call.isUp(),
3666
3672
  answeredBySystem: call.isUp() && call.talkingToIds.length === 0,
3667
- cameraEnabled: false,
3673
+ cameraEnabled: call.isVideo,
3668
3674
  dialedExtension: call.dialedExtension,
3669
3675
  call,
3670
3676
  conference: false, // @FIXME?
@@ -7319,11 +7325,11 @@ class WebRTCClient extends Emitter {
7319
7325
  });
7320
7326
  }
7321
7327
 
7322
- changeAudioInputDevice(id , session ) {
7328
+ changeAudioInputDevice(id , session , force ) {
7323
7329
  const currentId = this.getAudioDeviceId();
7324
7330
  logger$9.info('setting audio input device', { id, currentId, session: !!session });
7325
7331
 
7326
- if (id === currentId) {
7332
+ if (!force && id === currentId) {
7327
7333
  return null;
7328
7334
  }
7329
7335
 
@@ -10020,10 +10026,10 @@ class WebRTCPhone extends Emitter {
10020
10026
  this.audioRingVolume = volume;
10021
10027
  }
10022
10028
 
10023
- changeAudioInputDevice(id ) {
10029
+ changeAudioInputDevice(id , force ) {
10024
10030
  logger$7.info('WebRTC phone - changeAudio input device', { deviceId: id });
10025
10031
 
10026
- return this.client.changeAudioInputDevice(id, this.currentSipSession);
10032
+ return this.client.changeAudioInputDevice(id, this.currentSipSession, force);
10027
10033
  }
10028
10034
 
10029
10035
  changeVideoInputDevice(id ) {
@@ -36,6 +36,7 @@ const RECORD_STATE_ACTIVE = 'active';
36
36
 
37
37
 
38
38
 
39
+
39
40
 
40
41
 
41
42
 
@@ -46,6 +47,7 @@ const RECORD_STATE_ACTIVE = 'active';
46
47
 
47
48
 
48
49
 
50
+
49
51
 
50
52
 
51
53
 
@@ -74,6 +76,7 @@ class Call {
74
76
 
75
77
 
76
78
 
79
+
77
80
 
78
81
 
79
82
 
@@ -98,6 +101,7 @@ class Call {
98
101
  calleeNumber: plain.peer_caller_id_number,
99
102
  dialedExtension: plain.dialed_extension,
100
103
  isCaller: plain.is_caller,
104
+ isVideo: plain.is_video,
101
105
  muted: plain.muted,
102
106
  onHold: plain.on_hold,
103
107
  status: plain.status,
@@ -121,6 +125,7 @@ class Call {
121
125
  calleeNumber,
122
126
  dialedExtension,
123
127
  isCaller,
128
+ isVideo,
124
129
  lineId,
125
130
  muted,
126
131
  onHold,
@@ -144,6 +149,7 @@ class Call {
144
149
  this.startingTime = startingTime;
145
150
  this.talkingToIds = talkingToIds || [];
146
151
  this.recording = recording;
152
+ this.isVideo = !!isVideo;
147
153
 
148
154
  // Useful to compare instead of instanceof with minified code
149
155
  this.type = 'Call';
@@ -3059,6 +3059,7 @@ const RECORD_STATE_ACTIVE = 'active';
3059
3059
 
3060
3060
 
3061
3061
 
3062
+
3062
3063
 
3063
3064
 
3064
3065
 
@@ -3069,6 +3070,7 @@ const RECORD_STATE_ACTIVE = 'active';
3069
3070
 
3070
3071
 
3071
3072
 
3073
+
3072
3074
 
3073
3075
 
3074
3076
 
@@ -3097,6 +3099,7 @@ class Call {
3097
3099
 
3098
3100
 
3099
3101
 
3102
+
3100
3103
 
3101
3104
 
3102
3105
 
@@ -3121,6 +3124,7 @@ class Call {
3121
3124
  calleeNumber: plain.peer_caller_id_number,
3122
3125
  dialedExtension: plain.dialed_extension,
3123
3126
  isCaller: plain.is_caller,
3127
+ isVideo: plain.is_video,
3124
3128
  muted: plain.muted,
3125
3129
  onHold: plain.on_hold,
3126
3130
  status: plain.status,
@@ -3144,6 +3148,7 @@ class Call {
3144
3148
  calleeNumber,
3145
3149
  dialedExtension,
3146
3150
  isCaller,
3151
+ isVideo,
3147
3152
  lineId,
3148
3153
  muted,
3149
3154
  onHold,
@@ -3167,6 +3172,7 @@ class Call {
3167
3172
  this.startingTime = startingTime;
3168
3173
  this.talkingToIds = talkingToIds || [];
3169
3174
  this.recording = recording;
3175
+ this.isVideo = !!isVideo;
3170
3176
 
3171
3177
  // Useful to compare instead of instanceof with minified code
3172
3178
  this.type = 'Call';