@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.
Files changed (52) hide show
  1. package/dist/wazo-sdk.js +2 -2
  2. package/esm/__tests__/web-rtc-client.test.js +7 -0
  3. package/esm/checker/Checker.js +7 -0
  4. package/esm/checker/checks/index.js +7 -0
  5. package/esm/checker/checks/webrtc-transport.js +7 -0
  6. package/esm/checker/checks/webrtc.js +7 -0
  7. package/esm/domain/Features.js +5 -1
  8. package/esm/domain/Phone/CTIPhone.js +2 -0
  9. package/esm/index.js +22 -4
  10. package/esm/simple/Auth.js +22 -4
  11. package/esm/simple/Configuration.js +22 -4
  12. package/esm/simple/Phone.js +22 -4
  13. package/esm/simple/index.js +22 -4
  14. package/esm/simple/room/LocalParticipant.js +5525 -5507
  15. package/esm/simple/room/Participant.js +5529 -5511
  16. package/esm/simple/room/RemoteParticipant.js +22 -4
  17. package/esm/simple/room/Room.js +22 -4
  18. package/esm/simple/room/SipRoom.js +22 -4
  19. package/esm/simple/room/Stream.js +22 -4
  20. package/esm/simple/room/__tests__/Participant.test.js +22 -4
  21. package/esm/simple/room/__tests__/RemoteParticipant.test.js +22 -4
  22. package/esm/simple/utils.js +22 -4
  23. package/esm/web-rtc-client.js +7 -0
  24. package/lib/__tests__/web-rtc-client.test.js +7 -0
  25. package/lib/checker/Checker.js +7 -0
  26. package/lib/checker/checks/index.js +7 -0
  27. package/lib/checker/checks/webrtc-transport.js +7 -0
  28. package/lib/checker/checks/webrtc.js +7 -0
  29. package/lib/domain/Features.js +5 -1
  30. package/lib/domain/Phone/CTIPhone.js +2 -0
  31. package/lib/index.js +22 -4
  32. package/lib/simple/Auth.js +22 -4
  33. package/lib/simple/Configuration.js +22 -4
  34. package/lib/simple/Phone.js +22 -4
  35. package/lib/simple/index.js +22 -4
  36. package/lib/simple/room/LocalParticipant.js +6451 -6433
  37. package/lib/simple/room/Participant.js +7352 -7334
  38. package/lib/simple/room/RemoteParticipant.js +22 -4
  39. package/lib/simple/room/Room.js +22 -4
  40. package/lib/simple/room/SipRoom.js +22 -4
  41. package/lib/simple/room/Stream.js +22 -4
  42. package/lib/simple/room/__tests__/Participant.test.js +22 -4
  43. package/lib/simple/room/__tests__/RemoteParticipant.test.js +22 -4
  44. package/lib/simple/utils.js +22 -4
  45. package/lib/web-rtc-client.js +7 -0
  46. package/package.json +1 -1
  47. package/src/domain/Features.js +5 -1
  48. package/src/domain/Phone/CTIPhone.js +2 -0
  49. package/src/domain/Phone/Phone.js +2 -0
  50. package/src/simple/room/Participant.js +7 -1
  51. package/src/simple/room/Room.js +2 -2
  52. package/src/web-rtc-client.js +7 -0
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
7206
7208
  };
7207
7209
 
7208
7210
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7211
+ if (ua.transport && ua.transport.connectPromise) {
7212
+ ua.transport.connectPromise.catch((e => {
7213
+ logger$8.warn('Transport connect error', e);
7214
+ }));
7215
+ }
7216
+
7209
7217
  ua.transport.onMessage = (rawMessage ) => {
7210
7218
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7211
7219
 
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
7427
7435
  conference,
7428
7436
  audioOnly,
7429
7437
  },
7438
+ earlyMedia: true,
7430
7439
  };
7431
7440
 
7432
7441
  if (audioOnly) {
@@ -12441,10 +12450,15 @@ class Participant extends Emitter {
12441
12450
  }
12442
12451
  }
12443
12452
 
12444
- broadcastStatus(inboundStatus = null) {
12453
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12445
12454
  const status = inboundStatus || this.getStatus();
12446
12455
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12447
12456
 
12457
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12458
+ // eslint-disable-next-line no-underscore-dangle
12459
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12460
+ }
12461
+
12448
12462
  this.room.sendSignal({
12449
12463
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12450
12464
  origin: this.callId,
@@ -12887,7 +12901,7 @@ SwitchboardCall.STATE = {
12887
12901
 
12888
12902
  //
12889
12903
 
12890
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12904
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12891
12905
 
12892
12906
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12893
12907
 
@@ -12901,6 +12915,7 @@ class Features {
12901
12915
 
12902
12916
 
12903
12917
 
12918
+
12904
12919
 
12905
12920
  constructor() {
12906
12921
  this._hasChat = true;
@@ -12909,6 +12924,7 @@ class Features {
12909
12924
  this._hasFax = true;
12910
12925
  this._hasMobileDoubleCall = true;
12911
12926
  this._hasMobileGsm = true;
12927
+ this._hasMeeting = true;
12912
12928
  }
12913
12929
 
12914
12930
  async fetchAccess() {
@@ -12929,6 +12945,7 @@ class Features {
12929
12945
  this._hasFax = this._hasFeatures(scopes, 'fax');
12930
12946
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12931
12947
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12948
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12932
12949
  }
12933
12950
 
12934
12951
  hasChat() { return this._hasChat; }
@@ -12937,6 +12954,7 @@ class Features {
12937
12954
  hasFax() { return this._hasFax; }
12938
12955
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12939
12956
  hasMobileGsm() { return this._hasMobileGsm; }
12957
+ hasMeeting() { return this._hasMeeting; }
12940
12958
 
12941
12959
  _hasFeatures(scopes , featureName ) {
12942
12960
  const scopeName = getScopeName(featureName);
@@ -14490,7 +14508,7 @@ class Room extends Emitter {
14490
14508
  // callId is null, someone's requesting everyone's state;
14491
14509
  // or callId is set and matches ours;
14492
14510
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14493
- this.localParticipant.broadcastStatus();
14511
+ this.localParticipant.broadcastStatus(null, true);
14494
14512
  }
14495
14513
 
14496
14514
  // might as well update the requester's status
@@ -14592,7 +14610,7 @@ class Room extends Emitter {
14592
14610
 
14593
14611
  this.connected = true;
14594
14612
 
14595
- localParticipant.broadcastStatus();
14613
+ localParticipant.broadcastStatus(null, true);
14596
14614
 
14597
14615
  // we're in the room, now let's request everyone's status
14598
14616
  if (this.localParticipant) {
@@ -4618,6 +4618,8 @@ class CTIPhone extends Emitter {
4618
4618
  }
4619
4619
 
4620
4620
  useLocalVideoElement() {}
4621
+
4622
+ setMediaConstraints() {}
4621
4623
  }
4622
4624
 
4623
4625
  /* */
@@ -7208,6 +7210,12 @@ class WebRTCClient extends Emitter {
7208
7210
  };
7209
7211
 
7210
7212
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7213
+ if (ua.transport && ua.transport.connectPromise) {
7214
+ ua.transport.connectPromise.catch((e => {
7215
+ logger$8.warn('Transport connect error', e);
7216
+ }));
7217
+ }
7218
+
7211
7219
  ua.transport.onMessage = (rawMessage ) => {
7212
7220
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7213
7221
 
@@ -7429,6 +7437,7 @@ class WebRTCClient extends Emitter {
7429
7437
  conference,
7430
7438
  audioOnly,
7431
7439
  },
7440
+ earlyMedia: true,
7432
7441
  };
7433
7442
 
7434
7443
  if (audioOnly) {
@@ -12443,10 +12452,15 @@ class Participant extends Emitter {
12443
12452
  }
12444
12453
  }
12445
12454
 
12446
- broadcastStatus(inboundStatus = null) {
12455
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12447
12456
  const status = inboundStatus || this.getStatus();
12448
12457
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12449
12458
 
12459
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12460
+ // eslint-disable-next-line no-underscore-dangle
12461
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12462
+ }
12463
+
12450
12464
  this.room.sendSignal({
12451
12465
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12452
12466
  origin: this.callId,
@@ -12900,7 +12914,7 @@ SwitchboardCall.STATE = {
12900
12914
 
12901
12915
  //
12902
12916
 
12903
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12917
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12904
12918
 
12905
12919
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12906
12920
 
@@ -12914,6 +12928,7 @@ class Features {
12914
12928
 
12915
12929
 
12916
12930
 
12931
+
12917
12932
 
12918
12933
  constructor() {
12919
12934
  this._hasChat = true;
@@ -12922,6 +12937,7 @@ class Features {
12922
12937
  this._hasFax = true;
12923
12938
  this._hasMobileDoubleCall = true;
12924
12939
  this._hasMobileGsm = true;
12940
+ this._hasMeeting = true;
12925
12941
  }
12926
12942
 
12927
12943
  async fetchAccess() {
@@ -12942,6 +12958,7 @@ class Features {
12942
12958
  this._hasFax = this._hasFeatures(scopes, 'fax');
12943
12959
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12944
12960
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12961
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12945
12962
  }
12946
12963
 
12947
12964
  hasChat() { return this._hasChat; }
@@ -12950,6 +12967,7 @@ class Features {
12950
12967
  hasFax() { return this._hasFax; }
12951
12968
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12952
12969
  hasMobileGsm() { return this._hasMobileGsm; }
12970
+ hasMeeting() { return this._hasMeeting; }
12953
12971
 
12954
12972
  _hasFeatures(scopes , featureName ) {
12955
12973
  const scopeName = getScopeName(featureName);
@@ -14503,7 +14521,7 @@ class Room extends Emitter {
14503
14521
  // callId is null, someone's requesting everyone's state;
14504
14522
  // or callId is set and matches ours;
14505
14523
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14506
- this.localParticipant.broadcastStatus();
14524
+ this.localParticipant.broadcastStatus(null, true);
14507
14525
  }
14508
14526
 
14509
14527
  // might as well update the requester's status
@@ -14605,7 +14623,7 @@ class Room extends Emitter {
14605
14623
 
14606
14624
  this.connected = true;
14607
14625
 
14608
- localParticipant.broadcastStatus();
14626
+ localParticipant.broadcastStatus(null, true);
14609
14627
 
14610
14628
  // we're in the room, now let's request everyone's status
14611
14629
  if (this.localParticipant) {
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
7206
7208
  };
7207
7209
 
7208
7210
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7211
+ if (ua.transport && ua.transport.connectPromise) {
7212
+ ua.transport.connectPromise.catch((e => {
7213
+ logger$8.warn('Transport connect error', e);
7214
+ }));
7215
+ }
7216
+
7209
7217
  ua.transport.onMessage = (rawMessage ) => {
7210
7218
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7211
7219
 
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
7427
7435
  conference,
7428
7436
  audioOnly,
7429
7437
  },
7438
+ earlyMedia: true,
7430
7439
  };
7431
7440
 
7432
7441
  if (audioOnly) {
@@ -12302,10 +12311,15 @@ class Participant extends Emitter {
12302
12311
  }
12303
12312
  }
12304
12313
 
12305
- broadcastStatus(inboundStatus = null) {
12314
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12315
  const status = inboundStatus || this.getStatus();
12307
12316
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12317
 
12318
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12319
+ // eslint-disable-next-line no-underscore-dangle
12320
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12321
+ }
12322
+
12309
12323
  this.room.sendSignal({
12310
12324
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12325
  origin: this.callId,
@@ -12948,7 +12962,7 @@ class Room$1 extends Emitter {
12948
12962
  // callId is null, someone's requesting everyone's state;
12949
12963
  // or callId is set and matches ours;
12950
12964
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12965
+ this.localParticipant.broadcastStatus(null, true);
12952
12966
  }
12953
12967
 
12954
12968
  // might as well update the requester's status
@@ -13050,7 +13064,7 @@ class Room$1 extends Emitter {
13050
13064
 
13051
13065
  this.connected = true;
13052
13066
 
13053
- localParticipant.broadcastStatus();
13067
+ localParticipant.broadcastStatus(null, true);
13054
13068
 
13055
13069
  // we're in the room, now let's request everyone's status
13056
13070
  if (this.localParticipant) {
@@ -13595,7 +13609,7 @@ SwitchboardCall.STATE = {
13595
13609
 
13596
13610
  //
13597
13611
 
13598
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13612
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13599
13613
 
13600
13614
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13601
13615
 
@@ -13609,6 +13623,7 @@ class Features {
13609
13623
 
13610
13624
 
13611
13625
 
13626
+
13612
13627
 
13613
13628
  constructor() {
13614
13629
  this._hasChat = true;
@@ -13617,6 +13632,7 @@ class Features {
13617
13632
  this._hasFax = true;
13618
13633
  this._hasMobileDoubleCall = true;
13619
13634
  this._hasMobileGsm = true;
13635
+ this._hasMeeting = true;
13620
13636
  }
13621
13637
 
13622
13638
  async fetchAccess() {
@@ -13637,6 +13653,7 @@ class Features {
13637
13653
  this._hasFax = this._hasFeatures(scopes, 'fax');
13638
13654
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13639
13655
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13656
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13640
13657
  }
13641
13658
 
13642
13659
  hasChat() { return this._hasChat; }
@@ -13645,6 +13662,7 @@ class Features {
13645
13662
  hasFax() { return this._hasFax; }
13646
13663
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13647
13664
  hasMobileGsm() { return this._hasMobileGsm; }
13665
+ hasMeeting() { return this._hasMeeting; }
13648
13666
 
13649
13667
  _hasFeatures(scopes , featureName ) {
13650
13668
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
7206
7208
  };
7207
7209
 
7208
7210
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7211
+ if (ua.transport && ua.transport.connectPromise) {
7212
+ ua.transport.connectPromise.catch((e => {
7213
+ logger$8.warn('Transport connect error', e);
7214
+ }));
7215
+ }
7216
+
7209
7217
  ua.transport.onMessage = (rawMessage ) => {
7210
7218
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7211
7219
 
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
7427
7435
  conference,
7428
7436
  audioOnly,
7429
7437
  },
7438
+ earlyMedia: true,
7430
7439
  };
7431
7440
 
7432
7441
  if (audioOnly) {
@@ -12302,10 +12311,15 @@ class Participant extends Emitter {
12302
12311
  }
12303
12312
  }
12304
12313
 
12305
- broadcastStatus(inboundStatus = null) {
12314
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12315
  const status = inboundStatus || this.getStatus();
12307
12316
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12317
 
12318
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12319
+ // eslint-disable-next-line no-underscore-dangle
12320
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12321
+ }
12322
+
12309
12323
  this.room.sendSignal({
12310
12324
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12325
  origin: this.callId,
@@ -12948,7 +12962,7 @@ class Room$1 extends Emitter {
12948
12962
  // callId is null, someone's requesting everyone's state;
12949
12963
  // or callId is set and matches ours;
12950
12964
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12965
+ this.localParticipant.broadcastStatus(null, true);
12952
12966
  }
12953
12967
 
12954
12968
  // might as well update the requester's status
@@ -13050,7 +13064,7 @@ class Room$1 extends Emitter {
13050
13064
 
13051
13065
  this.connected = true;
13052
13066
 
13053
- localParticipant.broadcastStatus();
13067
+ localParticipant.broadcastStatus(null, true);
13054
13068
 
13055
13069
  // we're in the room, now let's request everyone's status
13056
13070
  if (this.localParticipant) {
@@ -13676,7 +13690,7 @@ SwitchboardCall.STATE = {
13676
13690
 
13677
13691
  //
13678
13692
 
13679
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13693
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13680
13694
 
13681
13695
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13682
13696
 
@@ -13690,6 +13704,7 @@ class Features {
13690
13704
 
13691
13705
 
13692
13706
 
13707
+
13693
13708
 
13694
13709
  constructor() {
13695
13710
  this._hasChat = true;
@@ -13698,6 +13713,7 @@ class Features {
13698
13713
  this._hasFax = true;
13699
13714
  this._hasMobileDoubleCall = true;
13700
13715
  this._hasMobileGsm = true;
13716
+ this._hasMeeting = true;
13701
13717
  }
13702
13718
 
13703
13719
  async fetchAccess() {
@@ -13718,6 +13734,7 @@ class Features {
13718
13734
  this._hasFax = this._hasFeatures(scopes, 'fax');
13719
13735
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13720
13736
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13737
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13721
13738
  }
13722
13739
 
13723
13740
  hasChat() { return this._hasChat; }
@@ -13726,6 +13743,7 @@ class Features {
13726
13743
  hasFax() { return this._hasFax; }
13727
13744
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13728
13745
  hasMobileGsm() { return this._hasMobileGsm; }
13746
+ hasMeeting() { return this._hasMeeting; }
13729
13747
 
13730
13748
  _hasFeatures(scopes , featureName ) {
13731
13749
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
7206
7208
  };
7207
7209
 
7208
7210
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7211
+ if (ua.transport && ua.transport.connectPromise) {
7212
+ ua.transport.connectPromise.catch((e => {
7213
+ logger$8.warn('Transport connect error', e);
7214
+ }));
7215
+ }
7216
+
7209
7217
  ua.transport.onMessage = (rawMessage ) => {
7210
7218
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7211
7219
 
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
7427
7435
  conference,
7428
7436
  audioOnly,
7429
7437
  },
7438
+ earlyMedia: true,
7430
7439
  };
7431
7440
 
7432
7441
  if (audioOnly) {
@@ -12302,10 +12311,15 @@ class Participant extends Emitter {
12302
12311
  }
12303
12312
  }
12304
12313
 
12305
- broadcastStatus(inboundStatus = null) {
12314
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12315
  const status = inboundStatus || this.getStatus();
12307
12316
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12317
 
12318
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12319
+ // eslint-disable-next-line no-underscore-dangle
12320
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12321
+ }
12322
+
12309
12323
  this.room.sendSignal({
12310
12324
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12325
  origin: this.callId,
@@ -12948,7 +12962,7 @@ class Room$1 extends Emitter {
12948
12962
  // callId is null, someone's requesting everyone's state;
12949
12963
  // or callId is set and matches ours;
12950
12964
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12965
+ this.localParticipant.broadcastStatus(null, true);
12952
12966
  }
12953
12967
 
12954
12968
  // might as well update the requester's status
@@ -13050,7 +13064,7 @@ class Room$1 extends Emitter {
13050
13064
 
13051
13065
  this.connected = true;
13052
13066
 
13053
- localParticipant.broadcastStatus();
13067
+ localParticipant.broadcastStatus(null, true);
13054
13068
 
13055
13069
  // we're in the room, now let's request everyone's status
13056
13070
  if (this.localParticipant) {
@@ -13734,7 +13748,7 @@ SwitchboardCall.STATE = {
13734
13748
 
13735
13749
  //
13736
13750
 
13737
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13751
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13738
13752
 
13739
13753
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13740
13754
 
@@ -13748,6 +13762,7 @@ class Features {
13748
13762
 
13749
13763
 
13750
13764
 
13765
+
13751
13766
 
13752
13767
  constructor() {
13753
13768
  this._hasChat = true;
@@ -13756,6 +13771,7 @@ class Features {
13756
13771
  this._hasFax = true;
13757
13772
  this._hasMobileDoubleCall = true;
13758
13773
  this._hasMobileGsm = true;
13774
+ this._hasMeeting = true;
13759
13775
  }
13760
13776
 
13761
13777
  async fetchAccess() {
@@ -13776,6 +13792,7 @@ class Features {
13776
13792
  this._hasFax = this._hasFeatures(scopes, 'fax');
13777
13793
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13778
13794
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13795
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13779
13796
  }
13780
13797
 
13781
13798
  hasChat() { return this._hasChat; }
@@ -13784,6 +13801,7 @@ class Features {
13784
13801
  hasFax() { return this._hasFax; }
13785
13802
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13786
13803
  hasMobileGsm() { return this._hasMobileGsm; }
13804
+ hasMeeting() { return this._hasMeeting; }
13787
13805
 
13788
13806
  _hasFeatures(scopes , featureName ) {
13789
13807
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
7206
7208
  };
7207
7209
 
7208
7210
  const ua = new userAgent.UserAgent(webRTCConfiguration);
7211
+ if (ua.transport && ua.transport.connectPromise) {
7212
+ ua.transport.connectPromise.catch((e => {
7213
+ logger$8.warn('Transport connect error', e);
7214
+ }));
7215
+ }
7216
+
7209
7217
  ua.transport.onMessage = (rawMessage ) => {
7210
7218
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
7211
7219
 
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
7427
7435
  conference,
7428
7436
  audioOnly,
7429
7437
  },
7438
+ earlyMedia: true,
7430
7439
  };
7431
7440
 
7432
7441
  if (audioOnly) {
@@ -12302,10 +12311,15 @@ class Participant extends Emitter {
12302
12311
  }
12303
12312
  }
12304
12313
 
12305
- broadcastStatus(inboundStatus = null) {
12314
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12315
  const status = inboundStatus || this.getStatus();
12307
12316
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12317
 
12318
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12319
+ // eslint-disable-next-line no-underscore-dangle
12320
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12321
+ }
12322
+
12309
12323
  this.room.sendSignal({
12310
12324
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12325
  origin: this.callId,
@@ -12948,7 +12962,7 @@ class Room$1 extends Emitter {
12948
12962
  // callId is null, someone's requesting everyone's state;
12949
12963
  // or callId is set and matches ours;
12950
12964
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12965
+ this.localParticipant.broadcastStatus(null, true);
12952
12966
  }
12953
12967
 
12954
12968
  // might as well update the requester's status
@@ -13050,7 +13064,7 @@ class Room$1 extends Emitter {
13050
13064
 
13051
13065
  this.connected = true;
13052
13066
 
13053
- localParticipant.broadcastStatus();
13067
+ localParticipant.broadcastStatus(null, true);
13054
13068
 
13055
13069
  // we're in the room, now let's request everyone's status
13056
13070
  if (this.localParticipant) {
@@ -13734,7 +13748,7 @@ SwitchboardCall.STATE = {
13734
13748
 
13735
13749
  //
13736
13750
 
13737
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13751
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13738
13752
 
13739
13753
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13740
13754
 
@@ -13748,6 +13762,7 @@ class Features {
13748
13762
 
13749
13763
 
13750
13764
 
13765
+
13751
13766
 
13752
13767
  constructor() {
13753
13768
  this._hasChat = true;
@@ -13756,6 +13771,7 @@ class Features {
13756
13771
  this._hasFax = true;
13757
13772
  this._hasMobileDoubleCall = true;
13758
13773
  this._hasMobileGsm = true;
13774
+ this._hasMeeting = true;
13759
13775
  }
13760
13776
 
13761
13777
  async fetchAccess() {
@@ -13776,6 +13792,7 @@ class Features {
13776
13792
  this._hasFax = this._hasFeatures(scopes, 'fax');
13777
13793
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13778
13794
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13795
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13779
13796
  }
13780
13797
 
13781
13798
  hasChat() { return this._hasChat; }
@@ -13784,6 +13801,7 @@ class Features {
13784
13801
  hasFax() { return this._hasFax; }
13785
13802
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13786
13803
  hasMobileGsm() { return this._hasMobileGsm; }
13804
+ hasMeeting() { return this._hasMeeting; }
13787
13805
 
13788
13806
  _hasFeatures(scopes , featureName ) {
13789
13807
  const scopeName = getScopeName(featureName);