@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
@@ -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) {
@@ -13708,7 +13722,7 @@ SwitchboardCall.STATE = {
13708
13722
 
13709
13723
  //
13710
13724
 
13711
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13725
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13712
13726
 
13713
13727
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13714
13728
 
@@ -13722,6 +13736,7 @@ class Features {
13722
13736
 
13723
13737
 
13724
13738
 
13739
+
13725
13740
 
13726
13741
  constructor() {
13727
13742
  this._hasChat = true;
@@ -13730,6 +13745,7 @@ class Features {
13730
13745
  this._hasFax = true;
13731
13746
  this._hasMobileDoubleCall = true;
13732
13747
  this._hasMobileGsm = true;
13748
+ this._hasMeeting = true;
13733
13749
  }
13734
13750
 
13735
13751
  async fetchAccess() {
@@ -13750,6 +13766,7 @@ class Features {
13750
13766
  this._hasFax = this._hasFeatures(scopes, 'fax');
13751
13767
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13752
13768
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13769
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13753
13770
  }
13754
13771
 
13755
13772
  hasChat() { return this._hasChat; }
@@ -13758,6 +13775,7 @@ class Features {
13758
13775
  hasFax() { return this._hasFax; }
13759
13776
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13760
13777
  hasMobileGsm() { return this._hasMobileGsm; }
13778
+ hasMeeting() { return this._hasMeeting; }
13761
13779
 
13762
13780
  _hasFeatures(scopes , featureName ) {
13763
13781
  const scopeName = getScopeName(featureName);
@@ -5786,6 +5786,12 @@ class WebRTCClient extends Emitter {
5786
5786
  };
5787
5787
 
5788
5788
  const ua = new UserAgent(webRTCConfiguration);
5789
+ if (ua.transport && ua.transport.connectPromise) {
5790
+ ua.transport.connectPromise.catch((e => {
5791
+ logger.warn('Transport connect error', e);
5792
+ }));
5793
+ }
5794
+
5789
5795
  ua.transport.onMessage = (rawMessage ) => {
5790
5796
  const message = Parser.parseMessage(rawMessage, ua.transport.logger);
5791
5797
 
@@ -6007,6 +6013,7 @@ class WebRTCClient extends Emitter {
6007
6013
  conference,
6008
6014
  audioOnly,
6009
6015
  },
6016
+ earlyMedia: true,
6010
6017
  };
6011
6018
 
6012
6019
  if (audioOnly) {
@@ -5792,6 +5792,12 @@ class WebRTCClient extends Emitter {
5792
5792
  };
5793
5793
 
5794
5794
  const ua = new userAgent.UserAgent(webRTCConfiguration);
5795
+ if (ua.transport && ua.transport.connectPromise) {
5796
+ ua.transport.connectPromise.catch((e => {
5797
+ logger.warn('Transport connect error', e);
5798
+ }));
5799
+ }
5800
+
5795
5801
  ua.transport.onMessage = (rawMessage ) => {
5796
5802
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
5797
5803
 
@@ -6013,6 +6019,7 @@ class WebRTCClient extends Emitter {
6013
6019
  conference,
6014
6020
  audioOnly,
6015
6021
  },
6022
+ earlyMedia: true,
6016
6023
  };
6017
6024
 
6018
6025
  if (audioOnly) {
@@ -6380,6 +6380,12 @@ class WebRTCClient extends Emitter {
6380
6380
  };
6381
6381
 
6382
6382
  const ua = new userAgent.UserAgent(webRTCConfiguration);
6383
+ if (ua.transport && ua.transport.connectPromise) {
6384
+ ua.transport.connectPromise.catch((e => {
6385
+ logger$1.warn('Transport connect error', e);
6386
+ }));
6387
+ }
6388
+
6383
6389
  ua.transport.onMessage = (rawMessage ) => {
6384
6390
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
6385
6391
 
@@ -6601,6 +6607,7 @@ class WebRTCClient extends Emitter {
6601
6607
  conference,
6602
6608
  audioOnly,
6603
6609
  },
6610
+ earlyMedia: true,
6604
6611
  };
6605
6612
 
6606
6613
  if (audioOnly) {
@@ -6380,6 +6380,12 @@ class WebRTCClient extends Emitter {
6380
6380
  };
6381
6381
 
6382
6382
  const ua = new userAgent.UserAgent(webRTCConfiguration);
6383
+ if (ua.transport && ua.transport.connectPromise) {
6384
+ ua.transport.connectPromise.catch((e => {
6385
+ logger.warn('Transport connect error', e);
6386
+ }));
6387
+ }
6388
+
6383
6389
  ua.transport.onMessage = (rawMessage ) => {
6384
6390
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
6385
6391
 
@@ -6601,6 +6607,7 @@ class WebRTCClient extends Emitter {
6601
6607
  conference,
6602
6608
  audioOnly,
6603
6609
  },
6610
+ earlyMedia: true,
6604
6611
  };
6605
6612
 
6606
6613
  if (audioOnly) {
@@ -5792,6 +5792,12 @@ class WebRTCClient extends Emitter {
5792
5792
  };
5793
5793
 
5794
5794
  const ua = new userAgent.UserAgent(webRTCConfiguration);
5795
+ if (ua.transport && ua.transport.connectPromise) {
5796
+ ua.transport.connectPromise.catch((e => {
5797
+ logger.warn('Transport connect error', e);
5798
+ }));
5799
+ }
5800
+
5795
5801
  ua.transport.onMessage = (rawMessage ) => {
5796
5802
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
5797
5803
 
@@ -6013,6 +6019,7 @@ class WebRTCClient extends Emitter {
6013
6019
  conference,
6014
6020
  audioOnly,
6015
6021
  },
6022
+ earlyMedia: true,
6016
6023
  };
6017
6024
 
6018
6025
  if (audioOnly) {
@@ -5792,6 +5792,12 @@ class WebRTCClient extends Emitter {
5792
5792
  };
5793
5793
 
5794
5794
  const ua = new userAgent.UserAgent(webRTCConfiguration);
5795
+ if (ua.transport && ua.transport.connectPromise) {
5796
+ ua.transport.connectPromise.catch((e => {
5797
+ logger.warn('Transport connect error', e);
5798
+ }));
5799
+ }
5800
+
5795
5801
  ua.transport.onMessage = (rawMessage ) => {
5796
5802
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
5797
5803
 
@@ -6013,6 +6019,7 @@ class WebRTCClient extends Emitter {
6013
6019
  conference,
6014
6020
  audioOnly,
6015
6021
  },
6022
+ earlyMedia: true,
6016
6023
  };
6017
6024
 
6018
6025
  if (audioOnly) {
@@ -4951,7 +4951,7 @@ var getApiClient = (forServer = null) => {
4951
4951
 
4952
4952
  //
4953
4953
 
4954
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
4954
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
4955
4955
 
4956
4956
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
4957
4957
 
@@ -4965,6 +4965,7 @@ class Features {
4965
4965
 
4966
4966
 
4967
4967
 
4968
+
4968
4969
 
4969
4970
  constructor() {
4970
4971
  this._hasChat = true;
@@ -4973,6 +4974,7 @@ class Features {
4973
4974
  this._hasFax = true;
4974
4975
  this._hasMobileDoubleCall = true;
4975
4976
  this._hasMobileGsm = true;
4977
+ this._hasMeeting = true;
4976
4978
  }
4977
4979
 
4978
4980
  async fetchAccess() {
@@ -4993,6 +4995,7 @@ class Features {
4993
4995
  this._hasFax = this._hasFeatures(scopes, 'fax');
4994
4996
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
4995
4997
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
4998
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
4996
4999
  }
4997
5000
 
4998
5001
  hasChat() { return this._hasChat; }
@@ -5001,6 +5004,7 @@ class Features {
5001
5004
  hasFax() { return this._hasFax; }
5002
5005
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
5003
5006
  hasMobileGsm() { return this._hasMobileGsm; }
5007
+ hasMeeting() { return this._hasMeeting; }
5004
5008
 
5005
5009
  _hasFeatures(scopes , featureName ) {
5006
5010
  const scopeName = getScopeName(featureName);
@@ -5777,6 +5777,8 @@ class CTIPhone extends Emitter {
5777
5777
  }
5778
5778
 
5779
5779
  useLocalVideoElement() {}
5780
+
5781
+ setMediaConstraints() {}
5780
5782
  }
5781
5783
 
5782
5784
  exports.TRANSFER_FLOW_ATTENDED = TRANSFER_FLOW_ATTENDED;
package/lib/index.js CHANGED
@@ -4730,6 +4730,8 @@ class CTIPhone extends Emitter {
4730
4730
  }
4731
4731
 
4732
4732
  useLocalVideoElement() {}
4733
+
4734
+ setMediaConstraints() {}
4733
4735
  }
4734
4736
 
4735
4737
  /* */
@@ -6698,6 +6700,12 @@ class WebRTCClient extends Emitter {
6698
6700
  };
6699
6701
 
6700
6702
  const ua = new userAgent.UserAgent(webRTCConfiguration);
6703
+ if (ua.transport && ua.transport.connectPromise) {
6704
+ ua.transport.connectPromise.catch((e => {
6705
+ logger$9.warn('Transport connect error', e);
6706
+ }));
6707
+ }
6708
+
6701
6709
  ua.transport.onMessage = (rawMessage ) => {
6702
6710
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
6703
6711
 
@@ -6919,6 +6927,7 @@ class WebRTCClient extends Emitter {
6919
6927
  conference,
6920
6928
  audioOnly,
6921
6929
  },
6930
+ earlyMedia: true,
6922
6931
  };
6923
6932
 
6924
6933
  if (audioOnly) {
@@ -9230,7 +9239,7 @@ var COUNTRIES = {
9230
9239
 
9231
9240
  //
9232
9241
 
9233
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
9242
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
9234
9243
 
9235
9244
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
9236
9245
 
@@ -9244,6 +9253,7 @@ class Features {
9244
9253
 
9245
9254
 
9246
9255
 
9256
+
9247
9257
 
9248
9258
  constructor() {
9249
9259
  this._hasChat = true;
@@ -9252,6 +9262,7 @@ class Features {
9252
9262
  this._hasFax = true;
9253
9263
  this._hasMobileDoubleCall = true;
9254
9264
  this._hasMobileGsm = true;
9265
+ this._hasMeeting = true;
9255
9266
  }
9256
9267
 
9257
9268
  async fetchAccess() {
@@ -9272,6 +9283,7 @@ class Features {
9272
9283
  this._hasFax = this._hasFeatures(scopes, 'fax');
9273
9284
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
9274
9285
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
9286
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
9275
9287
  }
9276
9288
 
9277
9289
  hasChat() { return this._hasChat; }
@@ -9280,6 +9292,7 @@ class Features {
9280
9292
  hasFax() { return this._hasFax; }
9281
9293
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
9282
9294
  hasMobileGsm() { return this._hasMobileGsm; }
9295
+ hasMeeting() { return this._hasMeeting; }
9283
9296
 
9284
9297
  _hasFeatures(scopes , featureName ) {
9285
9298
  const scopeName = getScopeName(featureName);
@@ -13278,10 +13291,15 @@ class Participant extends Emitter {
13278
13291
  }
13279
13292
  }
13280
13293
 
13281
- broadcastStatus(inboundStatus = null) {
13294
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
13282
13295
  const status = inboundStatus || this.getStatus();
13283
13296
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
13284
13297
 
13298
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
13299
+ // eslint-disable-next-line no-underscore-dangle
13300
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
13301
+ }
13302
+
13285
13303
  this.room.sendSignal({
13286
13304
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
13287
13305
  origin: this.callId,
@@ -13924,7 +13942,7 @@ class Room extends Emitter {
13924
13942
  // callId is null, someone's requesting everyone's state;
13925
13943
  // or callId is set and matches ours;
13926
13944
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
13927
- this.localParticipant.broadcastStatus();
13945
+ this.localParticipant.broadcastStatus(null, true);
13928
13946
  }
13929
13947
 
13930
13948
  // might as well update the requester's status
@@ -14026,7 +14044,7 @@ class Room extends Emitter {
14026
14044
 
14027
14045
  this.connected = true;
14028
14046
 
14029
- localParticipant.broadcastStatus();
14047
+ localParticipant.broadcastStatus(null, true);
14030
14048
 
14031
14049
  // we're in the room, now let's request everyone's status
14032
14050
  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
  /* */
@@ -6877,6 +6879,12 @@ class WebRTCClient extends Emitter {
6877
6879
  };
6878
6880
 
6879
6881
  const ua = new userAgent.UserAgent(webRTCConfiguration);
6882
+ if (ua.transport && ua.transport.connectPromise) {
6883
+ ua.transport.connectPromise.catch((e => {
6884
+ logger$9.warn('Transport connect error', e);
6885
+ }));
6886
+ }
6887
+
6880
6888
  ua.transport.onMessage = (rawMessage ) => {
6881
6889
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
6882
6890
 
@@ -7098,6 +7106,7 @@ class WebRTCClient extends Emitter {
7098
7106
  conference,
7099
7107
  audioOnly,
7100
7108
  },
7109
+ earlyMedia: true,
7101
7110
  };
7102
7111
 
7103
7112
  if (audioOnly) {
@@ -11973,10 +11982,15 @@ class Participant extends Emitter {
11973
11982
  }
11974
11983
  }
11975
11984
 
11976
- broadcastStatus(inboundStatus = null) {
11985
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
11977
11986
  const status = inboundStatus || this.getStatus();
11978
11987
  logger$4.info('broadcasting participant status', { callId: this.callId, status });
11979
11988
 
11989
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
11990
+ // eslint-disable-next-line no-underscore-dangle
11991
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
11992
+ }
11993
+
11980
11994
  this.room.sendSignal({
11981
11995
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
11982
11996
  origin: this.callId,
@@ -12619,7 +12633,7 @@ class Room$1 extends Emitter {
12619
12633
  // callId is null, someone's requesting everyone's state;
12620
12634
  // or callId is set and matches ours;
12621
12635
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12622
- this.localParticipant.broadcastStatus();
12636
+ this.localParticipant.broadcastStatus(null, true);
12623
12637
  }
12624
12638
 
12625
12639
  // might as well update the requester's status
@@ -12721,7 +12735,7 @@ class Room$1 extends Emitter {
12721
12735
 
12722
12736
  this.connected = true;
12723
12737
 
12724
- localParticipant.broadcastStatus();
12738
+ localParticipant.broadcastStatus(null, true);
12725
12739
 
12726
12740
  // we're in the room, now let's request everyone's status
12727
12741
  if (this.localParticipant) {
@@ -13405,7 +13419,7 @@ SwitchboardCall.STATE = {
13405
13419
 
13406
13420
  //
13407
13421
 
13408
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13422
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13409
13423
 
13410
13424
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13411
13425
 
@@ -13419,6 +13433,7 @@ class Features {
13419
13433
 
13420
13434
 
13421
13435
 
13436
+
13422
13437
 
13423
13438
  constructor() {
13424
13439
  this._hasChat = true;
@@ -13427,6 +13442,7 @@ class Features {
13427
13442
  this._hasFax = true;
13428
13443
  this._hasMobileDoubleCall = true;
13429
13444
  this._hasMobileGsm = true;
13445
+ this._hasMeeting = true;
13430
13446
  }
13431
13447
 
13432
13448
  async fetchAccess() {
@@ -13447,6 +13463,7 @@ class Features {
13447
13463
  this._hasFax = this._hasFeatures(scopes, 'fax');
13448
13464
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13449
13465
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13466
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13450
13467
  }
13451
13468
 
13452
13469
  hasChat() { return this._hasChat; }
@@ -13455,6 +13472,7 @@ class Features {
13455
13472
  hasFax() { return this._hasFax; }
13456
13473
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13457
13474
  hasMobileGsm() { return this._hasMobileGsm; }
13475
+ hasMeeting() { return this._hasMeeting; }
13458
13476
 
13459
13477
  _hasFeatures(scopes , featureName ) {
13460
13478
  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
  /* */
@@ -6875,6 +6877,12 @@ class WebRTCClient extends Emitter {
6875
6877
  };
6876
6878
 
6877
6879
  const ua = new userAgent.UserAgent(webRTCConfiguration);
6880
+ if (ua.transport && ua.transport.connectPromise) {
6881
+ ua.transport.connectPromise.catch((e => {
6882
+ logger$9.warn('Transport connect error', e);
6883
+ }));
6884
+ }
6885
+
6878
6886
  ua.transport.onMessage = (rawMessage ) => {
6879
6887
  const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
6880
6888
 
@@ -7096,6 +7104,7 @@ class WebRTCClient extends Emitter {
7096
7104
  conference,
7097
7105
  audioOnly,
7098
7106
  },
7107
+ earlyMedia: true,
7099
7108
  };
7100
7109
 
7101
7110
  if (audioOnly) {
@@ -11971,10 +11980,15 @@ class Participant extends Emitter {
11971
11980
  }
11972
11981
  }
11973
11982
 
11974
- broadcastStatus(inboundStatus = null) {
11983
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
11975
11984
  const status = inboundStatus || this.getStatus();
11976
11985
  logger$4.info('broadcasting participant status', { callId: this.callId, status });
11977
11986
 
11987
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
11988
+ // eslint-disable-next-line no-underscore-dangle
11989
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
11990
+ }
11991
+
11978
11992
  this.room.sendSignal({
11979
11993
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
11980
11994
  origin: this.callId,
@@ -12617,7 +12631,7 @@ class Room$1 extends Emitter {
12617
12631
  // callId is null, someone's requesting everyone's state;
12618
12632
  // or callId is set and matches ours;
12619
12633
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12620
- this.localParticipant.broadcastStatus();
12634
+ this.localParticipant.broadcastStatus(null, true);
12621
12635
  }
12622
12636
 
12623
12637
  // might as well update the requester's status
@@ -12719,7 +12733,7 @@ class Room$1 extends Emitter {
12719
12733
 
12720
12734
  this.connected = true;
12721
12735
 
12722
- localParticipant.broadcastStatus();
12736
+ localParticipant.broadcastStatus(null, true);
12723
12737
 
12724
12738
  // we're in the room, now let's request everyone's status
12725
12739
  if (this.localParticipant) {
@@ -13386,7 +13400,7 @@ SwitchboardCall.STATE = {
13386
13400
 
13387
13401
  //
13388
13402
 
13389
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13403
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13390
13404
 
13391
13405
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13392
13406
 
@@ -13400,6 +13414,7 @@ class Features {
13400
13414
 
13401
13415
 
13402
13416
 
13417
+
13403
13418
 
13404
13419
  constructor() {
13405
13420
  this._hasChat = true;
@@ -13408,6 +13423,7 @@ class Features {
13408
13423
  this._hasFax = true;
13409
13424
  this._hasMobileDoubleCall = true;
13410
13425
  this._hasMobileGsm = true;
13426
+ this._hasMeeting = true;
13411
13427
  }
13412
13428
 
13413
13429
  async fetchAccess() {
@@ -13428,6 +13444,7 @@ class Features {
13428
13444
  this._hasFax = this._hasFeatures(scopes, 'fax');
13429
13445
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13430
13446
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13447
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13431
13448
  }
13432
13449
 
13433
13450
  hasChat() { return this._hasChat; }
@@ -13436,6 +13453,7 @@ class Features {
13436
13453
  hasFax() { return this._hasFax; }
13437
13454
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13438
13455
  hasMobileGsm() { return this._hasMobileGsm; }
13456
+ hasMeeting() { return this._hasMeeting; }
13439
13457
 
13440
13458
  _hasFeatures(scopes , featureName ) {
13441
13459
  const scopeName = getScopeName(featureName);