@wazo/sdk 0.37.35 → 0.37.38

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 (102) hide show
  1. package/README.md +8 -2
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +7 -1
  4. package/esm/__tests__/web-rtc-client.test.js +7 -1
  5. package/esm/api/auth.js +2 -1
  6. package/esm/api/call-logd.js +1 -1
  7. package/esm/api/chatd.js +6 -0
  8. package/esm/api/confd.js +6 -0
  9. package/esm/api-client.js +7 -1
  10. package/esm/checker/Checker.js +7 -1
  11. package/esm/checker/checks/aor.js +7 -1
  12. package/esm/checker/checks/api.js +7 -1
  13. package/esm/checker/checks/index.js +7 -1
  14. package/esm/checker/checks/webrtc-transport.js +7 -1
  15. package/esm/checker/checks/webrtc.js +7 -1
  16. package/esm/domain/AdHocAPIConference.js +16 -6
  17. package/esm/domain/CallLog.js +1 -1
  18. package/esm/domain/CallSession.js +14 -0
  19. package/esm/domain/Features.js +7 -1
  20. package/esm/domain/Phone/CTIPhone.js +21 -1
  21. package/esm/domain/Phone/WebRTCPhone.js +42 -11
  22. package/esm/domain/Profile.js +6 -0
  23. package/esm/domain/SwitchboardCall.js +5 -5
  24. package/esm/domain/__tests__/CallLog.test.js +5 -1
  25. package/esm/domain/__tests__/CallSession.test.js +14 -0
  26. package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
  27. package/esm/domain/__tests__/Profile.test.js +6 -0
  28. package/esm/domain/__tests__/Room.test.js +14 -0
  29. package/esm/domain/__tests__/Session.test.js +6 -0
  30. package/esm/index.js +83 -29
  31. package/esm/service/CallApi.js +7 -1
  32. package/esm/service/getApiClient.js +7 -1
  33. package/esm/simple/Auth.js +84 -30
  34. package/esm/simple/Configuration.js +83 -29
  35. package/esm/simple/Directory.js +7 -1
  36. package/esm/simple/Phone.js +83 -29
  37. package/esm/simple/index.js +83 -29
  38. package/esm/simple/room/LocalParticipant.js +83 -29
  39. package/esm/simple/room/Participant.js +83 -29
  40. package/esm/simple/room/RemoteParticipant.js +83 -29
  41. package/esm/simple/room/Room.js +83 -29
  42. package/esm/simple/room/SipRoom.js +83 -29
  43. package/esm/simple/room/Stream.js +83 -29
  44. package/esm/simple/room/__tests__/RemoteParticipant.test.js +83 -29
  45. package/esm/simple/utils.js +83 -29
  46. package/esm/web-rtc-client.js +7 -1
  47. package/lib/__tests__/api-client.test.js +7 -1
  48. package/lib/__tests__/web-rtc-client.test.js +7 -1
  49. package/lib/api/auth.js +3 -0
  50. package/lib/api/call-logd.js +1 -1
  51. package/lib/api/chatd.js +6 -0
  52. package/lib/api/confd.js +6 -0
  53. package/lib/api-client.js +7 -1
  54. package/lib/checker/Checker.js +7 -1
  55. package/lib/checker/checks/aor.js +7 -1
  56. package/lib/checker/checks/api.js +7 -1
  57. package/lib/checker/checks/index.js +7 -1
  58. package/lib/checker/checks/webrtc-transport.js +7 -1
  59. package/lib/checker/checks/webrtc.js +7 -1
  60. package/lib/domain/AdHocAPIConference.js +16 -6
  61. package/lib/domain/CallLog.js +1 -1
  62. package/lib/domain/CallSession.js +14 -0
  63. package/lib/domain/Features.js +7 -1
  64. package/lib/domain/Phone/CTIPhone.js +21 -1
  65. package/lib/domain/Phone/WebRTCPhone.js +42 -11
  66. package/lib/domain/Profile.js +6 -0
  67. package/lib/domain/SwitchboardCall.js +5 -5
  68. package/lib/domain/__tests__/CallLog.test.js +5 -1
  69. package/lib/domain/__tests__/CallSession.test.js +14 -0
  70. package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
  71. package/lib/domain/__tests__/Profile.test.js +6 -0
  72. package/lib/domain/__tests__/Room.test.js +14 -0
  73. package/lib/domain/__tests__/Session.test.js +6 -0
  74. package/lib/index.js +83 -29
  75. package/lib/service/CallApi.js +7 -1
  76. package/lib/service/getApiClient.js +7 -1
  77. package/lib/simple/Auth.js +84 -29
  78. package/lib/simple/Configuration.js +83 -29
  79. package/lib/simple/Directory.js +7 -1
  80. package/lib/simple/Phone.js +83 -29
  81. package/lib/simple/index.js +83 -29
  82. package/lib/simple/room/LocalParticipant.js +83 -29
  83. package/lib/simple/room/Participant.js +83 -29
  84. package/lib/simple/room/RemoteParticipant.js +83 -29
  85. package/lib/simple/room/Room.js +83 -29
  86. package/lib/simple/room/SipRoom.js +83 -29
  87. package/lib/simple/room/Stream.js +83 -29
  88. package/lib/simple/room/__tests__/RemoteParticipant.test.js +83 -29
  89. package/lib/simple/utils.js +83 -29
  90. package/lib/web-rtc-client.js +7 -1
  91. package/package.json +1 -1
  92. package/src/api/auth.js +2 -1
  93. package/src/domain/AdHocAPIConference.js +9 -5
  94. package/src/domain/CallLog.js +1 -1
  95. package/src/domain/CallSession.js +14 -0
  96. package/src/domain/Phone/WebRTCPhone.js +28 -11
  97. package/src/domain/Profile.js +6 -0
  98. package/src/domain/SwitchboardCall.js +5 -5
  99. package/src/domain/__tests__/CallLog.test.js +4 -0
  100. package/src/simple/Auth.js +13 -2
  101. package/src/simple/Phone.js +6 -6
  102. package/src/simple/index.js +2 -1
@@ -384,6 +384,7 @@ const LINE_STATE = {
384
384
 
385
385
 
386
386
 
387
+
387
388
 
388
389
 
389
390
 
@@ -420,6 +421,7 @@ const LINE_STATE = {
420
421
 
421
422
 
422
423
 
424
+
423
425
 
424
426
 
425
427
 
@@ -451,6 +453,7 @@ class Profile {
451
453
 
452
454
 
453
455
 
456
+
454
457
 
455
458
 
456
459
 
@@ -467,6 +470,7 @@ class Profile {
467
470
  lines: plain.lines.map(line => Line.parse(line)),
468
471
  username: plain.username,
469
472
  mobileNumber: plain.mobile_phone_number || '',
473
+ ringSeconds: plain.ring_seconds,
470
474
  forwards: [
471
475
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
472
476
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -503,6 +507,7 @@ class Profile {
503
507
  switchboards,
504
508
  agent,
505
509
  status,
510
+ ringSeconds,
506
511
  sipLines,
507
512
  callPickupTargetUsers,
508
513
  onlineCallRecordEnabled,
@@ -524,6 +529,7 @@ class Profile {
524
529
  this.status = status;
525
530
  this.callPickupTargetUsers = callPickupTargetUsers;
526
531
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
532
+ this.ringSeconds = ringSeconds;
527
533
 
528
534
  this.sipLines = sipLines || [];
529
535
  }
@@ -2202,6 +2208,7 @@ class ApiRequester {
2202
2208
  /* */
2203
2209
 
2204
2210
  const DEFAULT_BACKEND_USER = 'wazo_user';
2211
+ const BACKEND_LDAP_USER = 'ldap_user';
2205
2212
  const DETAULT_EXPIRATION = 3600;
2206
2213
 
2207
2214
  var authMethods = (client , baseUrl ) => ({
@@ -3280,6 +3287,7 @@ var updateFrom = (instance , from ) => {
3280
3287
 
3281
3288
 
3282
3289
 
3290
+
3283
3291
 
3284
3292
 
3285
3293
  class CallSession {
@@ -3342,6 +3350,8 @@ class CallSession {
3342
3350
 
3343
3351
 
3344
3352
 
3353
+
3354
+
3345
3355
 
3346
3356
 
3347
3357
 
@@ -3373,6 +3383,7 @@ class CallSession {
3373
3383
  videoRemotelyDowngraded,
3374
3384
  sipSession,
3375
3385
  answerTime,
3386
+ conference,
3376
3387
  } ) {
3377
3388
  this.callId = callId;
3378
3389
  this.sipCallId = sipCallId;
@@ -3401,6 +3412,7 @@ class CallSession {
3401
3412
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3402
3413
  this.sipSession = sipSession;
3403
3414
  this.answerTime = answerTime || this.answerTime;
3415
+ this.conference = conference;
3404
3416
 
3405
3417
  // Useful to compare instead of instanceof with minified code
3406
3418
  this.type = 'CallSession';
@@ -3458,6 +3470,10 @@ class CallSession {
3458
3470
  this.screensharing = false;
3459
3471
  }
3460
3472
 
3473
+ setIsConference(conference ) {
3474
+ this.conference = conference;
3475
+ }
3476
+
3461
3477
  isIncoming() {
3462
3478
  return !this.isCaller && !this.answered;
3463
3479
  }
@@ -3534,6 +3550,10 @@ class CallSession {
3534
3550
  return this.sipStatus === SessionState.Terminated;
3535
3551
  }
3536
3552
 
3553
+ isConference() {
3554
+ return this.conference;
3555
+ }
3556
+
3537
3557
  getElapsedTimeInSeconds() {
3538
3558
  if (!this.startTime) {
3539
3559
  return 0;
@@ -3625,6 +3645,7 @@ class CallSession {
3625
3645
  cameraEnabled: false,
3626
3646
  dialedExtension: call.dialedExtension,
3627
3647
  call,
3648
+ conference: false, // @FIXME?
3628
3649
  });
3629
3650
  }
3630
3651
  }
@@ -3720,7 +3741,7 @@ class Recording {
3720
3741
 
3721
3742
 
3722
3743
 
3723
-
3744
+
3724
3745
 
3725
3746
 
3726
3747
 
@@ -5589,6 +5610,7 @@ var getApiClient = (forServer ) => {
5589
5610
 
5590
5611
  class InvalidSubscription extends Error {}
5591
5612
  class InvalidAuthorization extends Error {}
5613
+ class NoTenantIdError extends Error {}
5592
5614
 
5593
5615
  const logger$9 = IssueReporter$1.loggerFor('simple-auth');
5594
5616
 
@@ -5602,11 +5624,15 @@ class Auth {
5602
5624
 
5603
5625
 
5604
5626
 
5627
+
5628
+
5605
5629
 
5606
5630
  constructor() {
5607
5631
  this.expiration = DETAULT_EXPIRATION;
5608
5632
  this.authenticated = false;
5609
5633
  this.minSubscriptionType = null;
5634
+ this.BACKEND_WAZO = DEFAULT_BACKEND_USER;
5635
+ this.BACKEND_LDAP = BACKEND_LDAP_USER;
5610
5636
  }
5611
5637
 
5612
5638
  init(clientId ,
@@ -5639,12 +5665,18 @@ class Auth {
5639
5665
  setFetchOptions(options);
5640
5666
  }
5641
5667
 
5642
- async logIn(username , password ) {
5668
+ async logIn(username , password , backend , tenantId ) {
5669
+ if (backend && backend !== this.BACKEND_WAZO && !tenantId) {
5670
+ throw new NoTenantIdError('No tenant id');
5671
+ }
5672
+
5643
5673
  this.authenticated = false;
5644
5674
  this.session = null;
5645
5675
  const rawSession = await getApiClient().auth.logIn({
5646
5676
  username,
5647
5677
  password,
5678
+ backend,
5679
+ tenantId,
5648
5680
  expiration: this.expiration,
5649
5681
  mobile: this.mobile,
5650
5682
  });
@@ -5874,7 +5906,7 @@ var Auth$1 = global.wazoAuthInstance;
5874
5906
 
5875
5907
 
5876
5908
 
5877
-
5909
+
5878
5910
 
5879
5911
 
5880
5912
 
@@ -5894,7 +5926,7 @@ class AdHocAPIConference {
5894
5926
 
5895
5927
 
5896
5928
 
5897
-
5929
+
5898
5930
 
5899
5931
 
5900
5932
 
@@ -5906,7 +5938,7 @@ class AdHocAPIConference {
5906
5938
  participants,
5907
5939
  started,
5908
5940
  finished,
5909
- startTime,
5941
+ answerTime,
5910
5942
  conferenceId,
5911
5943
  muted,
5912
5944
  paused,
@@ -5916,16 +5948,20 @@ class AdHocAPIConference {
5916
5948
  this.participants = participants || {};
5917
5949
  this.started = started || false;
5918
5950
  this.finished = finished || false;
5919
- this.startTime = startTime;
5951
+ this.answerTime = answerTime;
5920
5952
  this.conferenceId = conferenceId || '';
5921
5953
  this.muted = muted || false;
5922
5954
  this.paused = paused || false;
5955
+
5956
+ if (this.host) {
5957
+ this.host.setIsConference(true);
5958
+ }
5923
5959
  }
5924
5960
 
5925
5961
  async start() {
5926
5962
  this.started = true;
5927
5963
  // $FlowFixMe
5928
- this.startTime = Object.values(this.participants).length ? Object.values(this.participants)[0].startTime : null;
5964
+ this.answerTime = Object.values(this.participants).length ? Object.values(this.participants)[0].answerTime : null;
5929
5965
 
5930
5966
  const participantIds = Object.keys(this.participants);
5931
5967
  const conference = await getApiClient().calld.createAdHocConference(this.host.callId, participantIds);
@@ -9629,7 +9665,11 @@ class WebRTCPhone extends Emitter {
9629
9665
  accept(callSession , cameraEnabled ) {
9630
9666
  logger$7.info('WebRTC phone - accept call', { id: callSession ? callSession.getId() : 'n/a', cameraEnabled });
9631
9667
  if (this.currentSipSession) {
9632
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true);
9668
+ this.holdSipSession(
9669
+ this.currentSipSession,
9670
+ this.currentCallSession,
9671
+ true,
9672
+ );
9633
9673
  }
9634
9674
 
9635
9675
  if (!callSession) {
@@ -9722,22 +9762,22 @@ class WebRTCPhone extends Emitter {
9722
9762
  }
9723
9763
  }
9724
9764
 
9725
- hold(callSession , withEvent = true, isConference = false) {
9765
+ hold(callSession , withEvent = true) {
9726
9766
  logger$7.info('WebRTC hold', { id: callSession.getId() });
9727
9767
 
9728
9768
  const sipSession = this.findSipSession(callSession);
9729
9769
 
9730
- return sipSession ? this.holdSipSession(sipSession, callSession, withEvent, isConference) : null;
9770
+ return sipSession ? this.holdSipSession(sipSession, callSession, withEvent) : null;
9731
9771
  }
9732
9772
 
9733
9773
  // @Deprecated
9734
- unhold(callSession , withEvent = true, isConference = false) {
9774
+ unhold(callSession , withEvent = true) {
9735
9775
  console.warn('Please note that `phone.unhold()` is being deprecated; `phone.resume()` is the preferred method');
9736
9776
 
9737
- return this.resume(callSession, isConference, withEvent);
9777
+ return this.resume(callSession, withEvent);
9738
9778
  }
9739
9779
 
9740
- resume(callSession , isConference = false, withEvent = true) {
9780
+ resume(callSession , withEvent = true) {
9741
9781
  logger$7.info('WebRTC resume called', { id: callSession ? callSession.getId() : null });
9742
9782
 
9743
9783
  const sipSession = this.findSipSession(callSession);
@@ -9750,10 +9790,14 @@ class WebRTCPhone extends Emitter {
9750
9790
  // Hold current session if different from the current one (we don't want 2 sessions active at the same time).
9751
9791
  if (this.currentSipSession && this.currentSipSession.id !== sipSession.id) {
9752
9792
  logger$7.info('WebRTC hold call after resume', { id: this.currentSipSession.id });
9753
- this.holdSipSession(this.currentSipSession, this.currentCallSession);
9793
+ this.holdSipSession(
9794
+ this.currentSipSession,
9795
+ this.currentCallSession,
9796
+ withEvent,
9797
+ );
9754
9798
  }
9755
9799
 
9756
- const promise = this.unholdSipSession(sipSession, callSession, withEvent, isConference);
9800
+ const promise = this.unholdSipSession(sipSession, callSession, withEvent);
9757
9801
  this.currentSipSession = sipSession;
9758
9802
  if (callSession) {
9759
9803
  this.currentCallSession = callSession;
@@ -9766,7 +9810,6 @@ class WebRTCPhone extends Emitter {
9766
9810
  sipSession ,
9767
9811
  callSession ,
9768
9812
  withEvent = true,
9769
- isConference = false,
9770
9813
  ) {
9771
9814
  if (!sipSession) {
9772
9815
  return new Promise((resolve, reject) => reject(new Error('No session to hold')));
@@ -9787,6 +9830,8 @@ class WebRTCPhone extends Emitter {
9787
9830
  await this.client.downgradeToAudio(sipSession);
9788
9831
  }
9789
9832
 
9833
+ const isConference = !!callSession && callSession.isConference();
9834
+
9790
9835
  const promise = this.client.hold(sipSession, isConference, hasVideo);
9791
9836
  if (withEvent) {
9792
9837
  this.eventEmitter.emit(ON_CALL_HELD, this._createCallSession(sipSession, callSession));
@@ -9799,11 +9844,13 @@ class WebRTCPhone extends Emitter {
9799
9844
  sipSession ,
9800
9845
  callSession ,
9801
9846
  withEvent = true,
9802
- isConference = false,
9803
9847
  ) {
9804
9848
  if (!sipSession) {
9805
9849
  return new Promise((resolve, reject) => reject(new Error('No session to unhold')));
9806
9850
  }
9851
+
9852
+ const isConference = !!callSession && callSession.isConference();
9853
+
9807
9854
  const sessionId = this.getSipSessionId(sipSession);
9808
9855
  logger$7.info('WebRTC unhold sip session', { sessionId, isConference });
9809
9856
 
@@ -9945,7 +9992,11 @@ class WebRTCPhone extends Emitter {
9945
9992
  await this.client.register();
9946
9993
  }
9947
9994
  if (this.currentSipSession) {
9948
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true).catch(e => {
9995
+ this.holdSipSession(
9996
+ this.currentSipSession,
9997
+ this.currentCallSession,
9998
+ true,
9999
+ ).catch(e => {
9949
10000
  logger$7.warn('Unable to hold current session when making another call', e);
9950
10001
  });
9951
10002
  }
@@ -9960,6 +10011,7 @@ class WebRTCPhone extends Emitter {
9960
10011
  return Promise.resolve(null);
9961
10012
  }
9962
10013
  const callSession = this._createOutgoingCallSession(sipSession, cameraEnabled || false);
10014
+ callSession.setIsConference(conference);
9963
10015
  callSession.creationTime = new Date();
9964
10016
  this._updateCallSession(callSession);
9965
10017
 
@@ -10538,6 +10590,7 @@ class WebRTCPhone extends Emitter {
10538
10590
  recording: fromSession ? fromSession.isRecording() : false,
10539
10591
  recordingPaused: false, // @TODO
10540
10592
  sipSession,
10593
+ conference: !!fromSession && fromSession.isConference(),
10541
10594
  ...extra,
10542
10595
  });
10543
10596
 
@@ -10794,16 +10847,16 @@ class Phone extends Emitter {
10794
10847
  }
10795
10848
  }
10796
10849
 
10797
- hold(callSession , isConference = false) {
10798
- return this.phone && this.phone.hold(callSession, true, isConference);
10850
+ hold(callSession ) {
10851
+ return this.phone && this.phone.hold(callSession, true);
10799
10852
  }
10800
10853
 
10801
- unhold(callSession , isConference = false) {
10802
- return this.phone && this.phone.unhold(callSession, true, isConference);
10854
+ unhold(callSession ) {
10855
+ return this.phone && this.phone.unhold(callSession, true);
10803
10856
  }
10804
10857
 
10805
- resume(callSession , isConference = false) {
10806
- return this.phone && this.phone.resume(callSession, isConference);
10858
+ resume(callSession ) {
10859
+ return this.phone && this.phone.resume(callSession);
10807
10860
  }
10808
10861
 
10809
10862
  reject(callSession ) {
@@ -13186,7 +13239,7 @@ class Room {
13186
13239
 
13187
13240
 
13188
13241
 
13189
-
13242
+
13190
13243
 
13191
13244
 
13192
13245
 
@@ -13212,7 +13265,7 @@ class SwitchboardCall {
13212
13265
 
13213
13266
 
13214
13267
 
13215
-
13268
+
13216
13269
 
13217
13270
 
13218
13271
 
@@ -13226,7 +13279,7 @@ class SwitchboardCall {
13226
13279
  callerIdName: plain.caller_id_name || null,
13227
13280
  callerIdNumber: plain.caller_id_number || null,
13228
13281
  participantId: plain.participantId || null,
13229
- startTime: plain.startTime,
13282
+ answerTime: plain.startTime,
13230
13283
  state: plain.state,
13231
13284
  switchboardName: plain.switchboardName,
13232
13285
  switchboardUuid: plain.switchboardUuid,
@@ -13239,7 +13292,7 @@ class SwitchboardCall {
13239
13292
  callerIdName,
13240
13293
  callerIdNumber,
13241
13294
  participantId,
13242
- startTime,
13295
+ answerTime,
13243
13296
  state,
13244
13297
  switchboardName,
13245
13298
  switchboardUuid,
@@ -13249,7 +13302,7 @@ class SwitchboardCall {
13249
13302
  this.callerIdName = callerIdName;
13250
13303
  this.callerIdNumber = callerIdNumber;
13251
13304
  this.participantId = participantId;
13252
- this.startTime = startTime;
13305
+ this.answerTime = answerTime;
13253
13306
  this.state = state;
13254
13307
  this.switchboardName = switchboardName;
13255
13308
  this.switchboardUuid = switchboardUuid;
@@ -13886,6 +13939,7 @@ const Wazo = {
13886
13939
  InvalidAuthorization,
13887
13940
  CanceledCallError,
13888
13941
  SFUNotAvailableError,
13942
+ NoTenantIdError,
13889
13943
  };
13890
13944
 
13891
13945
  if (window) {
@@ -1600,6 +1600,7 @@ const LINE_STATE = {
1600
1600
 
1601
1601
 
1602
1602
 
1603
+
1603
1604
 
1604
1605
 
1605
1606
 
@@ -1636,6 +1637,7 @@ const LINE_STATE = {
1636
1637
 
1637
1638
 
1638
1639
 
1640
+
1639
1641
 
1640
1642
 
1641
1643
 
@@ -1667,6 +1669,7 @@ class Profile {
1667
1669
 
1668
1670
 
1669
1671
 
1672
+
1670
1673
 
1671
1674
 
1672
1675
 
@@ -1683,6 +1686,7 @@ class Profile {
1683
1686
  lines: plain.lines.map(line => Line.parse(line)),
1684
1687
  username: plain.username,
1685
1688
  mobileNumber: plain.mobile_phone_number || '',
1689
+ ringSeconds: plain.ring_seconds,
1686
1690
  forwards: [
1687
1691
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1688
1692
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1719,6 +1723,7 @@ class Profile {
1719
1723
  switchboards,
1720
1724
  agent,
1721
1725
  status,
1726
+ ringSeconds,
1722
1727
  sipLines,
1723
1728
  callPickupTargetUsers,
1724
1729
  onlineCallRecordEnabled,
@@ -1740,6 +1745,7 @@ class Profile {
1740
1745
  this.status = status;
1741
1746
  this.callPickupTargetUsers = callPickupTargetUsers;
1742
1747
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1748
+ this.ringSeconds = ringSeconds;
1743
1749
 
1744
1750
  this.sipLines = sipLines || [];
1745
1751
  }
@@ -3843,7 +3849,7 @@ class Recording {
3843
3849
 
3844
3850
 
3845
3851
 
3846
-
3852
+
3847
3853
 
3848
3854
 
3849
3855
 
@@ -1058,6 +1058,7 @@ const LINE_STATE = {
1058
1058
 
1059
1059
 
1060
1060
 
1061
+
1061
1062
 
1062
1063
 
1063
1064
 
@@ -1094,6 +1095,7 @@ const LINE_STATE = {
1094
1095
 
1095
1096
 
1096
1097
 
1098
+
1097
1099
 
1098
1100
 
1099
1101
 
@@ -1125,6 +1127,7 @@ class Profile {
1125
1127
 
1126
1128
 
1127
1129
 
1130
+
1128
1131
 
1129
1132
 
1130
1133
 
@@ -1141,6 +1144,7 @@ class Profile {
1141
1144
  lines: plain.lines.map(line => Line.parse(line)),
1142
1145
  username: plain.username,
1143
1146
  mobileNumber: plain.mobile_phone_number || '',
1147
+ ringSeconds: plain.ring_seconds,
1144
1148
  forwards: [
1145
1149
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1146
1150
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1177,6 +1181,7 @@ class Profile {
1177
1181
  switchboards,
1178
1182
  agent,
1179
1183
  status,
1184
+ ringSeconds,
1180
1185
  sipLines,
1181
1186
  callPickupTargetUsers,
1182
1187
  onlineCallRecordEnabled,
@@ -1198,6 +1203,7 @@ class Profile {
1198
1203
  this.status = status;
1199
1204
  this.callPickupTargetUsers = callPickupTargetUsers;
1200
1205
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1206
+ this.ringSeconds = ringSeconds;
1201
1207
 
1202
1208
  this.sipLines = sipLines || [];
1203
1209
  }
@@ -3301,7 +3307,7 @@ class Recording {
3301
3307
 
3302
3308
 
3303
3309
 
3304
-
3310
+
3305
3311
 
3306
3312
 
3307
3313
 
@@ -1609,6 +1609,7 @@ const LINE_STATE = {
1609
1609
 
1610
1610
 
1611
1611
 
1612
+
1612
1613
 
1613
1614
 
1614
1615
 
@@ -1645,6 +1646,7 @@ const LINE_STATE = {
1645
1646
 
1646
1647
 
1647
1648
 
1649
+
1648
1650
 
1649
1651
 
1650
1652
 
@@ -1676,6 +1678,7 @@ class Profile {
1676
1678
 
1677
1679
 
1678
1680
 
1681
+
1679
1682
 
1680
1683
 
1681
1684
 
@@ -1692,6 +1695,7 @@ class Profile {
1692
1695
  lines: plain.lines.map(line => Line.parse(line)),
1693
1696
  username: plain.username,
1694
1697
  mobileNumber: plain.mobile_phone_number || '',
1698
+ ringSeconds: plain.ring_seconds,
1695
1699
  forwards: [
1696
1700
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1697
1701
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1728,6 +1732,7 @@ class Profile {
1728
1732
  switchboards,
1729
1733
  agent,
1730
1734
  status,
1735
+ ringSeconds,
1731
1736
  sipLines,
1732
1737
  callPickupTargetUsers,
1733
1738
  onlineCallRecordEnabled,
@@ -1749,6 +1754,7 @@ class Profile {
1749
1754
  this.status = status;
1750
1755
  this.callPickupTargetUsers = callPickupTargetUsers;
1751
1756
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1757
+ this.ringSeconds = ringSeconds;
1752
1758
 
1753
1759
  this.sipLines = sipLines || [];
1754
1760
  }
@@ -3852,7 +3858,7 @@ class Recording {
3852
3858
 
3853
3859
 
3854
3860
 
3855
-
3861
+
3856
3862
 
3857
3863
 
3858
3864
 
package/lib/api/auth.js CHANGED
@@ -954,6 +954,7 @@ class Session {
954
954
  /* */
955
955
 
956
956
  const DEFAULT_BACKEND_USER = 'wazo_user';
957
+ const BACKEND_LDAP_USER = 'ldap_user';
957
958
  const DETAULT_EXPIRATION = 3600;
958
959
 
959
960
  var auth = (client , baseUrl ) => ({
@@ -1197,5 +1198,7 @@ var auth = (client , baseUrl ) => ({
1197
1198
  client.delete(`${baseUrl}/users/${userUuid}/external/${provider}`),
1198
1199
  });
1199
1200
 
1201
+ exports.BACKEND_LDAP_USER = BACKEND_LDAP_USER;
1202
+ exports.DEFAULT_BACKEND_USER = DEFAULT_BACKEND_USER;
1200
1203
  exports.DETAULT_EXPIRATION = DETAULT_EXPIRATION;
1201
1204
  exports.default = auth;
@@ -489,7 +489,7 @@ class Recording {
489
489
 
490
490
 
491
491
 
492
-
492
+
493
493
 
494
494
 
495
495
 
package/lib/api/chatd.js CHANGED
@@ -887,6 +887,7 @@ const LINE_STATE = {
887
887
 
888
888
 
889
889
 
890
+
890
891
 
891
892
 
892
893
 
@@ -923,6 +924,7 @@ const LINE_STATE = {
923
924
 
924
925
 
925
926
 
927
+
926
928
 
927
929
 
928
930
 
@@ -954,6 +956,7 @@ class Profile {
954
956
 
955
957
 
956
958
 
959
+
957
960
 
958
961
 
959
962
 
@@ -970,6 +973,7 @@ class Profile {
970
973
  lines: plain.lines.map(line => Line.parse(line)),
971
974
  username: plain.username,
972
975
  mobileNumber: plain.mobile_phone_number || '',
976
+ ringSeconds: plain.ring_seconds,
973
977
  forwards: [
974
978
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
975
979
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1006,6 +1010,7 @@ class Profile {
1006
1010
  switchboards,
1007
1011
  agent,
1008
1012
  status,
1013
+ ringSeconds,
1009
1014
  sipLines,
1010
1015
  callPickupTargetUsers,
1011
1016
  onlineCallRecordEnabled,
@@ -1027,6 +1032,7 @@ class Profile {
1027
1032
  this.status = status;
1028
1033
  this.callPickupTargetUsers = callPickupTargetUsers;
1029
1034
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1035
+ this.ringSeconds = ringSeconds;
1030
1036
 
1031
1037
  this.sipLines = sipLines || [];
1032
1038
  }
package/lib/api/confd.js CHANGED
@@ -1034,6 +1034,7 @@ const LINE_STATE = {
1034
1034
 
1035
1035
 
1036
1036
 
1037
+
1037
1038
 
1038
1039
 
1039
1040
 
@@ -1070,6 +1071,7 @@ const LINE_STATE = {
1070
1071
 
1071
1072
 
1072
1073
 
1074
+
1073
1075
 
1074
1076
 
1075
1077
 
@@ -1101,6 +1103,7 @@ class Profile {
1101
1103
 
1102
1104
 
1103
1105
 
1106
+
1104
1107
 
1105
1108
 
1106
1109
 
@@ -1117,6 +1120,7 @@ class Profile {
1117
1120
  lines: plain.lines.map(line => Line.parse(line)),
1118
1121
  username: plain.username,
1119
1122
  mobileNumber: plain.mobile_phone_number || '',
1123
+ ringSeconds: plain.ring_seconds,
1120
1124
  forwards: [
1121
1125
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1122
1126
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1153,6 +1157,7 @@ class Profile {
1153
1157
  switchboards,
1154
1158
  agent,
1155
1159
  status,
1160
+ ringSeconds,
1156
1161
  sipLines,
1157
1162
  callPickupTargetUsers,
1158
1163
  onlineCallRecordEnabled,
@@ -1174,6 +1179,7 @@ class Profile {
1174
1179
  this.status = status;
1175
1180
  this.callPickupTargetUsers = callPickupTargetUsers;
1176
1181
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1182
+ this.ringSeconds = ringSeconds;
1177
1183
 
1178
1184
  this.sipLines = sipLines || [];
1179
1185
  }