@wazo/sdk 0.37.40 → 0.37.41

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.
@@ -9122,7 +9122,7 @@ class WebRTCPhone extends Emitter {
9122
9122
  // When stopping screenshare and we had video before that, we have to re-upgrade
9123
9123
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9124
9124
  // We have to downgrade to audio.
9125
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9125
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9126
9126
  const constraints = { audio: false, video: screenshareStopped };
9127
9127
 
9128
9128
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9566,7 +9566,7 @@ class WebRTCPhone extends Emitter {
9566
9566
 
9567
9567
  logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9568
9568
 
9569
- // Stop screenshre if needed
9569
+ // Stop screenshare if needed
9570
9570
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9571
9571
  this.lastScreenShare = this.currentScreenShare;
9572
9572
  await this.stopScreenSharing(false, callSession);
@@ -10142,7 +10142,7 @@ class WebRTCPhone extends Emitter {
10142
10142
  });
10143
10143
 
10144
10144
  this.client.on(this.client.DISCONNECTED, () => {
10145
- logger$8.warn('WebRTC client disconnected');
10145
+ logger$8.info('WebRTC client disconnected');
10146
10146
 
10147
10147
  this.eventEmitter.emit(ON_UNREGISTERED);
10148
10148
 
@@ -10328,7 +10328,7 @@ class WebRTCPhone extends Emitter {
10328
10328
  endTime: fromSession ? fromSession.endTime : null,
10329
10329
  answered: state === sessionState.SessionState.Established,
10330
10330
  paused: this.client.isCallHeld(sipSession),
10331
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10331
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10332
10332
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10333
10333
  number,
10334
10334
  ringing: false,
@@ -9122,7 +9122,7 @@ class WebRTCPhone extends Emitter {
9122
9122
  // When stopping screenshare and we had video before that, we have to re-upgrade
9123
9123
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9124
9124
  // We have to downgrade to audio.
9125
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9125
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9126
9126
  const constraints = { audio: false, video: screenshareStopped };
9127
9127
 
9128
9128
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9566,7 +9566,7 @@ class WebRTCPhone extends Emitter {
9566
9566
 
9567
9567
  logger$8.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9568
9568
 
9569
- // Stop screenshre if needed
9569
+ // Stop screenshare if needed
9570
9570
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9571
9571
  this.lastScreenShare = this.currentScreenShare;
9572
9572
  await this.stopScreenSharing(false, callSession);
@@ -10142,7 +10142,7 @@ class WebRTCPhone extends Emitter {
10142
10142
  });
10143
10143
 
10144
10144
  this.client.on(this.client.DISCONNECTED, () => {
10145
- logger$8.warn('WebRTC client disconnected');
10145
+ logger$8.info('WebRTC client disconnected');
10146
10146
 
10147
10147
  this.eventEmitter.emit(ON_UNREGISTERED);
10148
10148
 
@@ -10328,7 +10328,7 @@ class WebRTCPhone extends Emitter {
10328
10328
  endTime: fromSession ? fromSession.endTime : null,
10329
10329
  answered: state === sessionState.SessionState.Established,
10330
10330
  paused: this.client.isCallHeld(sipSession),
10331
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10331
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10332
10332
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10333
10333
  number,
10334
10334
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9406,7 +9406,7 @@ class WebRTCPhone extends Emitter {
9406
9406
  // When stopping screenshare and we had video before that, we have to re-upgrade
9407
9407
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9408
9408
  // We have to downgrade to audio.
9409
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9409
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9410
9410
  const constraints = { audio: false, video: screenshareStopped };
9411
9411
 
9412
9412
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9850,7 +9850,7 @@ class WebRTCPhone extends Emitter {
9850
9850
 
9851
9851
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9852
9852
 
9853
- // Stop screenshre if needed
9853
+ // Stop screenshare if needed
9854
9854
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9855
9855
  this.lastScreenShare = this.currentScreenShare;
9856
9856
  await this.stopScreenSharing(false, callSession);
@@ -10426,7 +10426,7 @@ class WebRTCPhone extends Emitter {
10426
10426
  });
10427
10427
 
10428
10428
  this.client.on(this.client.DISCONNECTED, () => {
10429
- logger$7.warn('WebRTC client disconnected');
10429
+ logger$7.info('WebRTC client disconnected');
10430
10430
 
10431
10431
  this.eventEmitter.emit(ON_UNREGISTERED);
10432
10432
 
@@ -10612,7 +10612,7 @@ class WebRTCPhone extends Emitter {
10612
10612
  endTime: fromSession ? fromSession.endTime : null,
10613
10613
  answered: state === sessionState.SessionState.Established,
10614
10614
  paused: this.client.isCallHeld(sipSession),
10615
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10615
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10616
10616
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10617
10617
  number,
10618
10618
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9404,7 +9404,7 @@ class WebRTCPhone extends Emitter {
9404
9404
  // When stopping screenshare and we had video before that, we have to re-upgrade
9405
9405
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9406
9406
  // We have to downgrade to audio.
9407
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9407
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9408
9408
  const constraints = { audio: false, video: screenshareStopped };
9409
9409
 
9410
9410
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9848,7 +9848,7 @@ class WebRTCPhone extends Emitter {
9848
9848
 
9849
9849
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9850
9850
 
9851
- // Stop screenshre if needed
9851
+ // Stop screenshare if needed
9852
9852
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9853
9853
  this.lastScreenShare = this.currentScreenShare;
9854
9854
  await this.stopScreenSharing(false, callSession);
@@ -10424,7 +10424,7 @@ class WebRTCPhone extends Emitter {
10424
10424
  });
10425
10425
 
10426
10426
  this.client.on(this.client.DISCONNECTED, () => {
10427
- logger$7.warn('WebRTC client disconnected');
10427
+ logger$7.info('WebRTC client disconnected');
10428
10428
 
10429
10429
  this.eventEmitter.emit(ON_UNREGISTERED);
10430
10430
 
@@ -10610,7 +10610,7 @@ class WebRTCPhone extends Emitter {
10610
10610
  endTime: fromSession ? fromSession.endTime : null,
10611
10611
  answered: state === sessionState.SessionState.Established,
10612
10612
  paused: this.client.isCallHeld(sipSession),
10613
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10613
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10614
10614
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10615
10615
  number,
10616
10616
  ringing: false,
@@ -9406,7 +9406,7 @@ class WebRTCPhone extends Emitter {
9406
9406
  // When stopping screenshare and we had video before that, we have to re-upgrade
9407
9407
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
9408
9408
  // We have to downgrade to audio.
9409
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
9409
+ const screenshareStopped = this.currentScreenShare.hadVideo;
9410
9410
  const constraints = { audio: false, video: screenshareStopped };
9411
9411
 
9412
9412
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -9850,7 +9850,7 @@ class WebRTCPhone extends Emitter {
9850
9850
 
9851
9851
  logger$7.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
9852
9852
 
9853
- // Stop screenshre if needed
9853
+ // Stop screenshare if needed
9854
9854
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
9855
9855
  this.lastScreenShare = this.currentScreenShare;
9856
9856
  await this.stopScreenSharing(false, callSession);
@@ -10426,7 +10426,7 @@ class WebRTCPhone extends Emitter {
10426
10426
  });
10427
10427
 
10428
10428
  this.client.on(this.client.DISCONNECTED, () => {
10429
- logger$7.warn('WebRTC client disconnected');
10429
+ logger$7.info('WebRTC client disconnected');
10430
10430
 
10431
10431
  this.eventEmitter.emit(ON_UNREGISTERED);
10432
10432
 
@@ -10612,7 +10612,7 @@ class WebRTCPhone extends Emitter {
10612
10612
  endTime: fromSession ? fromSession.endTime : null,
10613
10613
  answered: state === sessionState.SessionState.Established,
10614
10614
  paused: this.client.isCallHeld(sipSession),
10615
- isCaller: 'incoming' in extra ? !extra.incoming : false,
10615
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
10616
10616
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
10617
10617
  number,
10618
10618
  ringing: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazo/sdk",
3
- "version": "0.37.40",
3
+ "version": "0.37.41",
4
4
  "description": "Wazo's JavaScript Software Development Kit.",
5
5
  "main": "dist/wazo-sdk.js",
6
6
  "author": "Wazo (http://wazo.io)",
@@ -543,7 +543,7 @@ export default class WebRTCPhone extends Emitter implements Phone {
543
543
  // When stopping screenshare and we had video before that, we have to re-upgrade
544
544
  // When upgrading directly to screenshare (eg: we don't have a videoLocalStream to replace)
545
545
  // We have to downgrade to audio.
546
- const screenshareStopped = this.currentScreenShare.sender && this.currentScreenShare.hadVideo;
546
+ const screenshareStopped = this.currentScreenShare.hadVideo;
547
547
  const constraints = { audio: false, video: screenshareStopped };
548
548
 
549
549
  // We have to remove the video sender to be able to re-upgrade to video in `sendReinvite` below
@@ -987,7 +987,7 @@ export default class WebRTCPhone extends Emitter implements Phone {
987
987
 
988
988
  logger.info('WebRTC hold sip session', { sipId: sipSession.id, hasVideo });
989
989
 
990
- // Stop screenshre if needed
990
+ // Stop screenshare if needed
991
991
  if (this.currentScreenShare && this.currentScreenShare.sipSessionId === sessionId) {
992
992
  this.lastScreenShare = this.currentScreenShare;
993
993
  await this.stopScreenSharing(false, callSession);
@@ -1563,7 +1563,7 @@ export default class WebRTCPhone extends Emitter implements Phone {
1563
1563
  });
1564
1564
 
1565
1565
  this.client.on(this.client.DISCONNECTED, () => {
1566
- logger.warn('WebRTC client disconnected');
1566
+ logger.info('WebRTC client disconnected');
1567
1567
 
1568
1568
  this.eventEmitter.emit(ON_UNREGISTERED);
1569
1569
 
@@ -1751,7 +1751,7 @@ export default class WebRTCPhone extends Emitter implements Phone {
1751
1751
  endTime: fromSession ? fromSession.endTime : null,
1752
1752
  answered: state === SessionState.Established,
1753
1753
  paused: this.client.isCallHeld(sipSession),
1754
- isCaller: 'incoming' in extra ? !extra.incoming : false,
1754
+ isCaller: fromSession ? fromSession.isCaller : ('incoming' in extra ? !extra.incoming : false),
1755
1755
  cameraEnabled: fromSession ? fromSession.isCameraEnabled() : this.client.hasVideo(sessionId),
1756
1756
  number,
1757
1757
  ringing: false,