@wazo/sdk 0.38.12 → 0.38.15
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 +2 -2
- package/esm/__tests__/web-rtc-client.test.js +7 -0
- package/esm/checker/Checker.js +7 -0
- package/esm/checker/checks/index.js +7 -0
- package/esm/checker/checks/webrtc-transport.js +7 -0
- package/esm/checker/checks/webrtc.js +7 -0
- package/esm/domain/Features.js +5 -1
- package/esm/domain/Phone/CTIPhone.js +2 -0
- package/esm/index.js +22 -4
- package/esm/simple/Auth.js +22 -4
- package/esm/simple/Configuration.js +22 -4
- package/esm/simple/Phone.js +22 -4
- package/esm/simple/index.js +22 -4
- package/esm/simple/room/LocalParticipant.js +5525 -5507
- package/esm/simple/room/Participant.js +5529 -5511
- package/esm/simple/room/RemoteParticipant.js +22 -4
- package/esm/simple/room/Room.js +22 -4
- package/esm/simple/room/SipRoom.js +22 -4
- package/esm/simple/room/Stream.js +22 -4
- package/esm/simple/room/__tests__/Participant.test.js +22 -4
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +22 -4
- package/esm/simple/utils.js +22 -4
- package/esm/web-rtc-client.js +7 -0
- package/lib/__tests__/web-rtc-client.test.js +7 -0
- package/lib/checker/Checker.js +7 -0
- package/lib/checker/checks/index.js +7 -0
- package/lib/checker/checks/webrtc-transport.js +7 -0
- package/lib/checker/checks/webrtc.js +7 -0
- package/lib/domain/Features.js +5 -1
- package/lib/domain/Phone/CTIPhone.js +2 -0
- package/lib/index.js +22 -4
- package/lib/simple/Auth.js +22 -4
- package/lib/simple/Configuration.js +22 -4
- package/lib/simple/Phone.js +22 -4
- package/lib/simple/index.js +22 -4
- package/lib/simple/room/LocalParticipant.js +6451 -6433
- package/lib/simple/room/Participant.js +7352 -7334
- package/lib/simple/room/RemoteParticipant.js +22 -4
- package/lib/simple/room/Room.js +22 -4
- package/lib/simple/room/SipRoom.js +22 -4
- package/lib/simple/room/Stream.js +22 -4
- package/lib/simple/room/__tests__/Participant.test.js +22 -4
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +22 -4
- package/lib/simple/utils.js +22 -4
- package/lib/web-rtc-client.js +7 -0
- package/package.json +1 -1
- package/src/domain/Features.js +5 -1
- package/src/domain/Phone/CTIPhone.js +2 -0
- package/src/domain/Phone/Phone.js +2 -0
- package/src/simple/room/Participant.js +7 -1
- package/src/simple/room/Room.js +2 -2
- package/src/web-rtc-client.js +7 -0
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12431,10 +12440,15 @@ class Participant extends Emitter {
|
|
|
12431
12440
|
}
|
|
12432
12441
|
}
|
|
12433
12442
|
|
|
12434
|
-
broadcastStatus(inboundStatus = null) {
|
|
12443
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12435
12444
|
const status = inboundStatus || this.getStatus();
|
|
12436
12445
|
logger$2.info('broadcasting participant status', { callId: this.callId, status });
|
|
12437
12446
|
|
|
12447
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12448
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12449
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12450
|
+
}
|
|
12451
|
+
|
|
12438
12452
|
this.room.sendSignal({
|
|
12439
12453
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12440
12454
|
origin: this.callId,
|
|
@@ -12877,7 +12891,7 @@ SwitchboardCall.STATE = {
|
|
|
12877
12891
|
|
|
12878
12892
|
//
|
|
12879
12893
|
|
|
12880
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
12894
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
12881
12895
|
|
|
12882
12896
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
12883
12897
|
|
|
@@ -12891,6 +12905,7 @@ class Features {
|
|
|
12891
12905
|
|
|
12892
12906
|
|
|
12893
12907
|
|
|
12908
|
+
|
|
12894
12909
|
|
|
12895
12910
|
constructor() {
|
|
12896
12911
|
this._hasChat = true;
|
|
@@ -12899,6 +12914,7 @@ class Features {
|
|
|
12899
12914
|
this._hasFax = true;
|
|
12900
12915
|
this._hasMobileDoubleCall = true;
|
|
12901
12916
|
this._hasMobileGsm = true;
|
|
12917
|
+
this._hasMeeting = true;
|
|
12902
12918
|
}
|
|
12903
12919
|
|
|
12904
12920
|
async fetchAccess() {
|
|
@@ -12919,6 +12935,7 @@ class Features {
|
|
|
12919
12935
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
12920
12936
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
12921
12937
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
12938
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
12922
12939
|
}
|
|
12923
12940
|
|
|
12924
12941
|
hasChat() { return this._hasChat; }
|
|
@@ -12927,6 +12944,7 @@ class Features {
|
|
|
12927
12944
|
hasFax() { return this._hasFax; }
|
|
12928
12945
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
12929
12946
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
12947
|
+
hasMeeting() { return this._hasMeeting; }
|
|
12930
12948
|
|
|
12931
12949
|
_hasFeatures(scopes , featureName ) {
|
|
12932
12950
|
const scopeName = getScopeName(featureName);
|
|
@@ -14480,7 +14498,7 @@ class Room extends Emitter {
|
|
|
14480
14498
|
// callId is null, someone's requesting everyone's state;
|
|
14481
14499
|
// or callId is set and matches ours;
|
|
14482
14500
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
14483
|
-
this.localParticipant.broadcastStatus();
|
|
14501
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
14484
14502
|
}
|
|
14485
14503
|
|
|
14486
14504
|
// might as well update the requester's status
|
|
@@ -14582,7 +14600,7 @@ class Room extends Emitter {
|
|
|
14582
14600
|
|
|
14583
14601
|
this.connected = true;
|
|
14584
14602
|
|
|
14585
|
-
localParticipant.broadcastStatus();
|
|
14603
|
+
localParticipant.broadcastStatus(null, true);
|
|
14586
14604
|
|
|
14587
14605
|
// we're in the room, now let's request everyone's status
|
|
14588
14606
|
if (this.localParticipant) {
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12431,10 +12440,15 @@ class Participant extends Emitter {
|
|
|
12431
12440
|
}
|
|
12432
12441
|
}
|
|
12433
12442
|
|
|
12434
|
-
broadcastStatus(inboundStatus = null) {
|
|
12443
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12435
12444
|
const status = inboundStatus || this.getStatus();
|
|
12436
12445
|
logger$2.info('broadcasting participant status', { callId: this.callId, status });
|
|
12437
12446
|
|
|
12447
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12448
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12449
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12450
|
+
}
|
|
12451
|
+
|
|
12438
12452
|
this.room.sendSignal({
|
|
12439
12453
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12440
12454
|
origin: this.callId,
|
|
@@ -12888,7 +12902,7 @@ SwitchboardCall.STATE = {
|
|
|
12888
12902
|
|
|
12889
12903
|
//
|
|
12890
12904
|
|
|
12891
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
12905
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
12892
12906
|
|
|
12893
12907
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
12894
12908
|
|
|
@@ -12902,6 +12916,7 @@ class Features {
|
|
|
12902
12916
|
|
|
12903
12917
|
|
|
12904
12918
|
|
|
12919
|
+
|
|
12905
12920
|
|
|
12906
12921
|
constructor() {
|
|
12907
12922
|
this._hasChat = true;
|
|
@@ -12910,6 +12925,7 @@ class Features {
|
|
|
12910
12925
|
this._hasFax = true;
|
|
12911
12926
|
this._hasMobileDoubleCall = true;
|
|
12912
12927
|
this._hasMobileGsm = true;
|
|
12928
|
+
this._hasMeeting = true;
|
|
12913
12929
|
}
|
|
12914
12930
|
|
|
12915
12931
|
async fetchAccess() {
|
|
@@ -12930,6 +12946,7 @@ class Features {
|
|
|
12930
12946
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
12931
12947
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
12932
12948
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
12949
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
12933
12950
|
}
|
|
12934
12951
|
|
|
12935
12952
|
hasChat() { return this._hasChat; }
|
|
@@ -12938,6 +12955,7 @@ class Features {
|
|
|
12938
12955
|
hasFax() { return this._hasFax; }
|
|
12939
12956
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
12940
12957
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
12958
|
+
hasMeeting() { return this._hasMeeting; }
|
|
12941
12959
|
|
|
12942
12960
|
_hasFeatures(scopes , featureName ) {
|
|
12943
12961
|
const scopeName = getScopeName(featureName);
|
|
@@ -14491,7 +14509,7 @@ class Room extends Emitter {
|
|
|
14491
14509
|
// callId is null, someone's requesting everyone's state;
|
|
14492
14510
|
// or callId is set and matches ours;
|
|
14493
14511
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
14494
|
-
this.localParticipant.broadcastStatus();
|
|
14512
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
14495
14513
|
}
|
|
14496
14514
|
|
|
14497
14515
|
// might as well update the requester's status
|
|
@@ -14593,7 +14611,7 @@ class Room extends Emitter {
|
|
|
14593
14611
|
|
|
14594
14612
|
this.connected = true;
|
|
14595
14613
|
|
|
14596
|
-
localParticipant.broadcastStatus();
|
|
14614
|
+
localParticipant.broadcastStatus(null, true);
|
|
14597
14615
|
|
|
14598
14616
|
// we're in the room, now let's request everyone's status
|
|
14599
14617
|
if (this.localParticipant) {
|
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12292,10 +12301,15 @@ class Participant extends Emitter {
|
|
|
12292
12301
|
}
|
|
12293
12302
|
}
|
|
12294
12303
|
|
|
12295
|
-
broadcastStatus(inboundStatus = null) {
|
|
12304
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12296
12305
|
const status = inboundStatus || this.getStatus();
|
|
12297
12306
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12298
12307
|
|
|
12308
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12309
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12310
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12299
12313
|
this.room.sendSignal({
|
|
12300
12314
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12301
12315
|
origin: this.callId,
|
|
@@ -12938,7 +12952,7 @@ class Room$1 extends Emitter {
|
|
|
12938
12952
|
// callId is null, someone's requesting everyone's state;
|
|
12939
12953
|
// or callId is set and matches ours;
|
|
12940
12954
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12941
|
-
this.localParticipant.broadcastStatus();
|
|
12955
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12942
12956
|
}
|
|
12943
12957
|
|
|
12944
12958
|
// might as well update the requester's status
|
|
@@ -13040,7 +13054,7 @@ class Room$1 extends Emitter {
|
|
|
13040
13054
|
|
|
13041
13055
|
this.connected = true;
|
|
13042
13056
|
|
|
13043
|
-
localParticipant.broadcastStatus();
|
|
13057
|
+
localParticipant.broadcastStatus(null, true);
|
|
13044
13058
|
|
|
13045
13059
|
// we're in the room, now let's request everyone's status
|
|
13046
13060
|
if (this.localParticipant) {
|
|
@@ -13585,7 +13599,7 @@ SwitchboardCall.STATE = {
|
|
|
13585
13599
|
|
|
13586
13600
|
//
|
|
13587
13601
|
|
|
13588
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13602
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13589
13603
|
|
|
13590
13604
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13591
13605
|
|
|
@@ -13599,6 +13613,7 @@ class Features {
|
|
|
13599
13613
|
|
|
13600
13614
|
|
|
13601
13615
|
|
|
13616
|
+
|
|
13602
13617
|
|
|
13603
13618
|
constructor() {
|
|
13604
13619
|
this._hasChat = true;
|
|
@@ -13607,6 +13622,7 @@ class Features {
|
|
|
13607
13622
|
this._hasFax = true;
|
|
13608
13623
|
this._hasMobileDoubleCall = true;
|
|
13609
13624
|
this._hasMobileGsm = true;
|
|
13625
|
+
this._hasMeeting = true;
|
|
13610
13626
|
}
|
|
13611
13627
|
|
|
13612
13628
|
async fetchAccess() {
|
|
@@ -13627,6 +13643,7 @@ class Features {
|
|
|
13627
13643
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13628
13644
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13629
13645
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13646
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13630
13647
|
}
|
|
13631
13648
|
|
|
13632
13649
|
hasChat() { return this._hasChat; }
|
|
@@ -13635,6 +13652,7 @@ class Features {
|
|
|
13635
13652
|
hasFax() { return this._hasFax; }
|
|
13636
13653
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13637
13654
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13655
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13638
13656
|
|
|
13639
13657
|
_hasFeatures(scopes , featureName ) {
|
|
13640
13658
|
const scopeName = getScopeName(featureName);
|
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12292,10 +12301,15 @@ class Participant extends Emitter {
|
|
|
12292
12301
|
}
|
|
12293
12302
|
}
|
|
12294
12303
|
|
|
12295
|
-
broadcastStatus(inboundStatus = null) {
|
|
12304
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12296
12305
|
const status = inboundStatus || this.getStatus();
|
|
12297
12306
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12298
12307
|
|
|
12308
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12309
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12310
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12299
12313
|
this.room.sendSignal({
|
|
12300
12314
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12301
12315
|
origin: this.callId,
|
|
@@ -12938,7 +12952,7 @@ class Room$1 extends Emitter {
|
|
|
12938
12952
|
// callId is null, someone's requesting everyone's state;
|
|
12939
12953
|
// or callId is set and matches ours;
|
|
12940
12954
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12941
|
-
this.localParticipant.broadcastStatus();
|
|
12955
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12942
12956
|
}
|
|
12943
12957
|
|
|
12944
12958
|
// might as well update the requester's status
|
|
@@ -13040,7 +13054,7 @@ class Room$1 extends Emitter {
|
|
|
13040
13054
|
|
|
13041
13055
|
this.connected = true;
|
|
13042
13056
|
|
|
13043
|
-
localParticipant.broadcastStatus();
|
|
13057
|
+
localParticipant.broadcastStatus(null, true);
|
|
13044
13058
|
|
|
13045
13059
|
// we're in the room, now let's request everyone's status
|
|
13046
13060
|
if (this.localParticipant) {
|
|
@@ -13666,7 +13680,7 @@ SwitchboardCall.STATE = {
|
|
|
13666
13680
|
|
|
13667
13681
|
//
|
|
13668
13682
|
|
|
13669
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13683
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13670
13684
|
|
|
13671
13685
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13672
13686
|
|
|
@@ -13680,6 +13694,7 @@ class Features {
|
|
|
13680
13694
|
|
|
13681
13695
|
|
|
13682
13696
|
|
|
13697
|
+
|
|
13683
13698
|
|
|
13684
13699
|
constructor() {
|
|
13685
13700
|
this._hasChat = true;
|
|
@@ -13688,6 +13703,7 @@ class Features {
|
|
|
13688
13703
|
this._hasFax = true;
|
|
13689
13704
|
this._hasMobileDoubleCall = true;
|
|
13690
13705
|
this._hasMobileGsm = true;
|
|
13706
|
+
this._hasMeeting = true;
|
|
13691
13707
|
}
|
|
13692
13708
|
|
|
13693
13709
|
async fetchAccess() {
|
|
@@ -13708,6 +13724,7 @@ class Features {
|
|
|
13708
13724
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13709
13725
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13710
13726
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13727
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13711
13728
|
}
|
|
13712
13729
|
|
|
13713
13730
|
hasChat() { return this._hasChat; }
|
|
@@ -13716,6 +13733,7 @@ class Features {
|
|
|
13716
13733
|
hasFax() { return this._hasFax; }
|
|
13717
13734
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13718
13735
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13736
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13719
13737
|
|
|
13720
13738
|
_hasFeatures(scopes , featureName ) {
|
|
13721
13739
|
const scopeName = getScopeName(featureName);
|
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12292,10 +12301,15 @@ class Participant extends Emitter {
|
|
|
12292
12301
|
}
|
|
12293
12302
|
}
|
|
12294
12303
|
|
|
12295
|
-
broadcastStatus(inboundStatus = null) {
|
|
12304
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12296
12305
|
const status = inboundStatus || this.getStatus();
|
|
12297
12306
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12298
12307
|
|
|
12308
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12309
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12310
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12299
12313
|
this.room.sendSignal({
|
|
12300
12314
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12301
12315
|
origin: this.callId,
|
|
@@ -12938,7 +12952,7 @@ class Room$1 extends Emitter {
|
|
|
12938
12952
|
// callId is null, someone's requesting everyone's state;
|
|
12939
12953
|
// or callId is set and matches ours;
|
|
12940
12954
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12941
|
-
this.localParticipant.broadcastStatus();
|
|
12955
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12942
12956
|
}
|
|
12943
12957
|
|
|
12944
12958
|
// might as well update the requester's status
|
|
@@ -13040,7 +13054,7 @@ class Room$1 extends Emitter {
|
|
|
13040
13054
|
|
|
13041
13055
|
this.connected = true;
|
|
13042
13056
|
|
|
13043
|
-
localParticipant.broadcastStatus();
|
|
13057
|
+
localParticipant.broadcastStatus(null, true);
|
|
13044
13058
|
|
|
13045
13059
|
// we're in the room, now let's request everyone's status
|
|
13046
13060
|
if (this.localParticipant) {
|
|
@@ -13724,7 +13738,7 @@ SwitchboardCall.STATE = {
|
|
|
13724
13738
|
|
|
13725
13739
|
//
|
|
13726
13740
|
|
|
13727
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13741
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13728
13742
|
|
|
13729
13743
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13730
13744
|
|
|
@@ -13738,6 +13752,7 @@ class Features {
|
|
|
13738
13752
|
|
|
13739
13753
|
|
|
13740
13754
|
|
|
13755
|
+
|
|
13741
13756
|
|
|
13742
13757
|
constructor() {
|
|
13743
13758
|
this._hasChat = true;
|
|
@@ -13746,6 +13761,7 @@ class Features {
|
|
|
13746
13761
|
this._hasFax = true;
|
|
13747
13762
|
this._hasMobileDoubleCall = true;
|
|
13748
13763
|
this._hasMobileGsm = true;
|
|
13764
|
+
this._hasMeeting = true;
|
|
13749
13765
|
}
|
|
13750
13766
|
|
|
13751
13767
|
async fetchAccess() {
|
|
@@ -13766,6 +13782,7 @@ class Features {
|
|
|
13766
13782
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13767
13783
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13768
13784
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13785
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13769
13786
|
}
|
|
13770
13787
|
|
|
13771
13788
|
hasChat() { return this._hasChat; }
|
|
@@ -13774,6 +13791,7 @@ class Features {
|
|
|
13774
13791
|
hasFax() { return this._hasFax; }
|
|
13775
13792
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13776
13793
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13794
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13777
13795
|
|
|
13778
13796
|
_hasFeatures(scopes , featureName ) {
|
|
13779
13797
|
const scopeName = getScopeName(featureName);
|
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12292,10 +12301,15 @@ class Participant extends Emitter {
|
|
|
12292
12301
|
}
|
|
12293
12302
|
}
|
|
12294
12303
|
|
|
12295
|
-
broadcastStatus(inboundStatus = null) {
|
|
12304
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12296
12305
|
const status = inboundStatus || this.getStatus();
|
|
12297
12306
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12298
12307
|
|
|
12308
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12309
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12310
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12299
12313
|
this.room.sendSignal({
|
|
12300
12314
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12301
12315
|
origin: this.callId,
|
|
@@ -12938,7 +12952,7 @@ class Room$1 extends Emitter {
|
|
|
12938
12952
|
// callId is null, someone's requesting everyone's state;
|
|
12939
12953
|
// or callId is set and matches ours;
|
|
12940
12954
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12941
|
-
this.localParticipant.broadcastStatus();
|
|
12955
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12942
12956
|
}
|
|
12943
12957
|
|
|
12944
12958
|
// might as well update the requester's status
|
|
@@ -13040,7 +13054,7 @@ class Room$1 extends Emitter {
|
|
|
13040
13054
|
|
|
13041
13055
|
this.connected = true;
|
|
13042
13056
|
|
|
13043
|
-
localParticipant.broadcastStatus();
|
|
13057
|
+
localParticipant.broadcastStatus(null, true);
|
|
13044
13058
|
|
|
13045
13059
|
// we're in the room, now let's request everyone's status
|
|
13046
13060
|
if (this.localParticipant) {
|
|
@@ -13724,7 +13738,7 @@ SwitchboardCall.STATE = {
|
|
|
13724
13738
|
|
|
13725
13739
|
//
|
|
13726
13740
|
|
|
13727
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13741
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13728
13742
|
|
|
13729
13743
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13730
13744
|
|
|
@@ -13738,6 +13752,7 @@ class Features {
|
|
|
13738
13752
|
|
|
13739
13753
|
|
|
13740
13754
|
|
|
13755
|
+
|
|
13741
13756
|
|
|
13742
13757
|
constructor() {
|
|
13743
13758
|
this._hasChat = true;
|
|
@@ -13746,6 +13761,7 @@ class Features {
|
|
|
13746
13761
|
this._hasFax = true;
|
|
13747
13762
|
this._hasMobileDoubleCall = true;
|
|
13748
13763
|
this._hasMobileGsm = true;
|
|
13764
|
+
this._hasMeeting = true;
|
|
13749
13765
|
}
|
|
13750
13766
|
|
|
13751
13767
|
async fetchAccess() {
|
|
@@ -13766,6 +13782,7 @@ class Features {
|
|
|
13766
13782
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13767
13783
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13768
13784
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13785
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13769
13786
|
}
|
|
13770
13787
|
|
|
13771
13788
|
hasChat() { return this._hasChat; }
|
|
@@ -13774,6 +13791,7 @@ class Features {
|
|
|
13774
13791
|
hasFax() { return this._hasFax; }
|
|
13775
13792
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13776
13793
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13794
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13777
13795
|
|
|
13778
13796
|
_hasFeatures(scopes , featureName ) {
|
|
13779
13797
|
const scopeName = getScopeName(featureName);
|