@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
package/lib/index.js CHANGED
@@ -1083,6 +1083,7 @@ const LINE_STATE = {
1083
1083
 
1084
1084
 
1085
1085
 
1086
+
1086
1087
 
1087
1088
 
1088
1089
 
@@ -1119,6 +1120,7 @@ const LINE_STATE = {
1119
1120
 
1120
1121
 
1121
1122
 
1123
+
1122
1124
 
1123
1125
 
1124
1126
 
@@ -1150,6 +1152,7 @@ class Profile {
1150
1152
 
1151
1153
 
1152
1154
 
1155
+
1153
1156
 
1154
1157
 
1155
1158
 
@@ -1166,6 +1169,7 @@ class Profile {
1166
1169
  lines: plain.lines.map(line => Line.parse(line)),
1167
1170
  username: plain.username,
1168
1171
  mobileNumber: plain.mobile_phone_number || '',
1172
+ ringSeconds: plain.ring_seconds,
1169
1173
  forwards: [
1170
1174
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1171
1175
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1202,6 +1206,7 @@ class Profile {
1202
1206
  switchboards,
1203
1207
  agent,
1204
1208
  status,
1209
+ ringSeconds,
1205
1210
  sipLines,
1206
1211
  callPickupTargetUsers,
1207
1212
  onlineCallRecordEnabled,
@@ -1223,6 +1228,7 @@ class Profile {
1223
1228
  this.status = status;
1224
1229
  this.callPickupTargetUsers = callPickupTargetUsers;
1225
1230
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1231
+ this.ringSeconds = ringSeconds;
1226
1232
 
1227
1233
  this.sipLines = sipLines || [];
1228
1234
  }
@@ -2214,6 +2220,7 @@ class Session {
2214
2220
  /* */
2215
2221
 
2216
2222
  const DEFAULT_BACKEND_USER = 'wazo_user';
2223
+ const BACKEND_LDAP_USER = 'ldap_user';
2217
2224
  const DETAULT_EXPIRATION = 3600;
2218
2225
 
2219
2226
  var authMethods = (client , baseUrl ) => ({
@@ -3292,6 +3299,7 @@ var updateFrom = (instance , from ) => {
3292
3299
 
3293
3300
 
3294
3301
 
3302
+
3295
3303
 
3296
3304
 
3297
3305
  class CallSession {
@@ -3354,6 +3362,8 @@ class CallSession {
3354
3362
 
3355
3363
 
3356
3364
 
3365
+
3366
+
3357
3367
 
3358
3368
 
3359
3369
 
@@ -3385,6 +3395,7 @@ class CallSession {
3385
3395
  videoRemotelyDowngraded,
3386
3396
  sipSession,
3387
3397
  answerTime,
3398
+ conference,
3388
3399
  } ) {
3389
3400
  this.callId = callId;
3390
3401
  this.sipCallId = sipCallId;
@@ -3413,6 +3424,7 @@ class CallSession {
3413
3424
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3414
3425
  this.sipSession = sipSession;
3415
3426
  this.answerTime = answerTime || this.answerTime;
3427
+ this.conference = conference;
3416
3428
 
3417
3429
  // Useful to compare instead of instanceof with minified code
3418
3430
  this.type = 'CallSession';
@@ -3470,6 +3482,10 @@ class CallSession {
3470
3482
  this.screensharing = false;
3471
3483
  }
3472
3484
 
3485
+ setIsConference(conference ) {
3486
+ this.conference = conference;
3487
+ }
3488
+
3473
3489
  isIncoming() {
3474
3490
  return !this.isCaller && !this.answered;
3475
3491
  }
@@ -3546,6 +3562,10 @@ class CallSession {
3546
3562
  return this.sipStatus === sessionState.SessionState.Terminated;
3547
3563
  }
3548
3564
 
3565
+ isConference() {
3566
+ return this.conference;
3567
+ }
3568
+
3549
3569
  getElapsedTimeInSeconds() {
3550
3570
  if (!this.startTime) {
3551
3571
  return 0;
@@ -3637,6 +3657,7 @@ class CallSession {
3637
3657
  cameraEnabled: false,
3638
3658
  dialedExtension: call.dialedExtension,
3639
3659
  call,
3660
+ conference: false, // @FIXME?
3640
3661
  });
3641
3662
  }
3642
3663
  }
@@ -3732,7 +3753,7 @@ class Recording {
3732
3753
 
3733
3754
 
3734
3755
 
3735
-
3756
+
3736
3757
 
3737
3758
 
3738
3759
 
@@ -9192,7 +9213,7 @@ class Room$1 {
9192
9213
 
9193
9214
 
9194
9215
 
9195
-
9216
+
9196
9217
 
9197
9218
 
9198
9219
 
@@ -9218,7 +9239,7 @@ class SwitchboardCall {
9218
9239
 
9219
9240
 
9220
9241
 
9221
-
9242
+
9222
9243
 
9223
9244
 
9224
9245
 
@@ -9232,7 +9253,7 @@ class SwitchboardCall {
9232
9253
  callerIdName: plain.caller_id_name || null,
9233
9254
  callerIdNumber: plain.caller_id_number || null,
9234
9255
  participantId: plain.participantId || null,
9235
- startTime: plain.startTime,
9256
+ answerTime: plain.startTime,
9236
9257
  state: plain.state,
9237
9258
  switchboardName: plain.switchboardName,
9238
9259
  switchboardUuid: plain.switchboardUuid,
@@ -9245,7 +9266,7 @@ class SwitchboardCall {
9245
9266
  callerIdName,
9246
9267
  callerIdNumber,
9247
9268
  participantId,
9248
- startTime,
9269
+ answerTime,
9249
9270
  state,
9250
9271
  switchboardName,
9251
9272
  switchboardUuid,
@@ -9255,7 +9276,7 @@ class SwitchboardCall {
9255
9276
  this.callerIdName = callerIdName;
9256
9277
  this.callerIdNumber = callerIdNumber;
9257
9278
  this.participantId = participantId;
9258
- this.startTime = startTime;
9279
+ this.answerTime = answerTime;
9259
9280
  this.state = state;
9260
9281
  this.switchboardName = switchboardName;
9261
9282
  this.switchboardUuid = switchboardUuid;
@@ -10103,7 +10124,11 @@ class WebRTCPhone extends Emitter {
10103
10124
  accept(callSession , cameraEnabled ) {
10104
10125
  logger$7.info('WebRTC phone - accept call', { id: callSession ? callSession.getId() : 'n/a', cameraEnabled });
10105
10126
  if (this.currentSipSession) {
10106
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true);
10127
+ this.holdSipSession(
10128
+ this.currentSipSession,
10129
+ this.currentCallSession,
10130
+ true,
10131
+ );
10107
10132
  }
10108
10133
 
10109
10134
  if (!callSession) {
@@ -10196,22 +10221,22 @@ class WebRTCPhone extends Emitter {
10196
10221
  }
10197
10222
  }
10198
10223
 
10199
- hold(callSession , withEvent = true, isConference = false) {
10224
+ hold(callSession , withEvent = true) {
10200
10225
  logger$7.info('WebRTC hold', { id: callSession.getId() });
10201
10226
 
10202
10227
  const sipSession = this.findSipSession(callSession);
10203
10228
 
10204
- return sipSession ? this.holdSipSession(sipSession, callSession, withEvent, isConference) : null;
10229
+ return sipSession ? this.holdSipSession(sipSession, callSession, withEvent) : null;
10205
10230
  }
10206
10231
 
10207
10232
  // @Deprecated
10208
- unhold(callSession , withEvent = true, isConference = false) {
10233
+ unhold(callSession , withEvent = true) {
10209
10234
  console.warn('Please note that `phone.unhold()` is being deprecated; `phone.resume()` is the preferred method');
10210
10235
 
10211
- return this.resume(callSession, isConference, withEvent);
10236
+ return this.resume(callSession, withEvent);
10212
10237
  }
10213
10238
 
10214
- resume(callSession , isConference = false, withEvent = true) {
10239
+ resume(callSession , withEvent = true) {
10215
10240
  logger$7.info('WebRTC resume called', { id: callSession ? callSession.getId() : null });
10216
10241
 
10217
10242
  const sipSession = this.findSipSession(callSession);
@@ -10224,10 +10249,14 @@ class WebRTCPhone extends Emitter {
10224
10249
  // Hold current session if different from the current one (we don't want 2 sessions active at the same time).
10225
10250
  if (this.currentSipSession && this.currentSipSession.id !== sipSession.id) {
10226
10251
  logger$7.info('WebRTC hold call after resume', { id: this.currentSipSession.id });
10227
- this.holdSipSession(this.currentSipSession, this.currentCallSession);
10252
+ this.holdSipSession(
10253
+ this.currentSipSession,
10254
+ this.currentCallSession,
10255
+ withEvent,
10256
+ );
10228
10257
  }
10229
10258
 
10230
- const promise = this.unholdSipSession(sipSession, callSession, withEvent, isConference);
10259
+ const promise = this.unholdSipSession(sipSession, callSession, withEvent);
10231
10260
  this.currentSipSession = sipSession;
10232
10261
  if (callSession) {
10233
10262
  this.currentCallSession = callSession;
@@ -10240,7 +10269,6 @@ class WebRTCPhone extends Emitter {
10240
10269
  sipSession ,
10241
10270
  callSession ,
10242
10271
  withEvent = true,
10243
- isConference = false,
10244
10272
  ) {
10245
10273
  if (!sipSession) {
10246
10274
  return new Promise((resolve, reject) => reject(new Error('No session to hold')));
@@ -10261,6 +10289,8 @@ class WebRTCPhone extends Emitter {
10261
10289
  await this.client.downgradeToAudio(sipSession);
10262
10290
  }
10263
10291
 
10292
+ const isConference = !!callSession && callSession.isConference();
10293
+
10264
10294
  const promise = this.client.hold(sipSession, isConference, hasVideo);
10265
10295
  if (withEvent) {
10266
10296
  this.eventEmitter.emit(ON_CALL_HELD, this._createCallSession(sipSession, callSession));
@@ -10273,11 +10303,13 @@ class WebRTCPhone extends Emitter {
10273
10303
  sipSession ,
10274
10304
  callSession ,
10275
10305
  withEvent = true,
10276
- isConference = false,
10277
10306
  ) {
10278
10307
  if (!sipSession) {
10279
10308
  return new Promise((resolve, reject) => reject(new Error('No session to unhold')));
10280
10309
  }
10310
+
10311
+ const isConference = !!callSession && callSession.isConference();
10312
+
10281
10313
  const sessionId = this.getSipSessionId(sipSession);
10282
10314
  logger$7.info('WebRTC unhold sip session', { sessionId, isConference });
10283
10315
 
@@ -10419,7 +10451,11 @@ class WebRTCPhone extends Emitter {
10419
10451
  await this.client.register();
10420
10452
  }
10421
10453
  if (this.currentSipSession) {
10422
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true).catch(e => {
10454
+ this.holdSipSession(
10455
+ this.currentSipSession,
10456
+ this.currentCallSession,
10457
+ true,
10458
+ ).catch(e => {
10423
10459
  logger$7.warn('Unable to hold current session when making another call', e);
10424
10460
  });
10425
10461
  }
@@ -10434,6 +10470,7 @@ class WebRTCPhone extends Emitter {
10434
10470
  return Promise.resolve(null);
10435
10471
  }
10436
10472
  const callSession = this._createOutgoingCallSession(sipSession, cameraEnabled || false);
10473
+ callSession.setIsConference(conference);
10437
10474
  callSession.creationTime = new Date();
10438
10475
  this._updateCallSession(callSession);
10439
10476
 
@@ -11012,6 +11049,7 @@ class WebRTCPhone extends Emitter {
11012
11049
  recording: fromSession ? fromSession.isRecording() : false,
11013
11050
  recordingPaused: false, // @TODO
11014
11051
  sipSession,
11052
+ conference: !!fromSession && fromSession.isConference(),
11015
11053
  ...extra,
11016
11054
  });
11017
11055
 
@@ -11670,6 +11708,7 @@ const getCallableNumber = (number , country ) => {
11670
11708
 
11671
11709
  class InvalidSubscription extends Error {}
11672
11710
  class InvalidAuthorization extends Error {}
11711
+ class NoTenantIdError extends Error {}
11673
11712
 
11674
11713
  const logger$5 = IssueReporter$1.loggerFor('simple-auth');
11675
11714
 
@@ -11683,11 +11722,15 @@ class Auth {
11683
11722
 
11684
11723
 
11685
11724
 
11725
+
11726
+
11686
11727
 
11687
11728
  constructor() {
11688
11729
  this.expiration = DETAULT_EXPIRATION;
11689
11730
  this.authenticated = false;
11690
11731
  this.minSubscriptionType = null;
11732
+ this.BACKEND_WAZO = DEFAULT_BACKEND_USER;
11733
+ this.BACKEND_LDAP = BACKEND_LDAP_USER;
11691
11734
  }
11692
11735
 
11693
11736
  init(clientId ,
@@ -11720,12 +11763,18 @@ class Auth {
11720
11763
  setFetchOptions(options);
11721
11764
  }
11722
11765
 
11723
- async logIn(username , password ) {
11766
+ async logIn(username , password , backend , tenantId ) {
11767
+ if (backend && backend !== this.BACKEND_WAZO && !tenantId) {
11768
+ throw new NoTenantIdError('No tenant id');
11769
+ }
11770
+
11724
11771
  this.authenticated = false;
11725
11772
  this.session = null;
11726
11773
  const rawSession = await getApiClient().auth.logIn({
11727
11774
  username,
11728
11775
  password,
11776
+ backend,
11777
+ tenantId,
11729
11778
  expiration: this.expiration,
11730
11779
  mobile: this.mobile,
11731
11780
  });
@@ -11955,7 +12004,7 @@ var Auth$1 = global.wazoAuthInstance;
11955
12004
 
11956
12005
 
11957
12006
 
11958
-
12007
+
11959
12008
 
11960
12009
 
11961
12010
 
@@ -11975,7 +12024,7 @@ class AdHocAPIConference {
11975
12024
 
11976
12025
 
11977
12026
 
11978
-
12027
+
11979
12028
 
11980
12029
 
11981
12030
 
@@ -11987,7 +12036,7 @@ class AdHocAPIConference {
11987
12036
  participants,
11988
12037
  started,
11989
12038
  finished,
11990
- startTime,
12039
+ answerTime,
11991
12040
  conferenceId,
11992
12041
  muted,
11993
12042
  paused,
@@ -11997,16 +12046,20 @@ class AdHocAPIConference {
11997
12046
  this.participants = participants || {};
11998
12047
  this.started = started || false;
11999
12048
  this.finished = finished || false;
12000
- this.startTime = startTime;
12049
+ this.answerTime = answerTime;
12001
12050
  this.conferenceId = conferenceId || '';
12002
12051
  this.muted = muted || false;
12003
12052
  this.paused = paused || false;
12053
+
12054
+ if (this.host) {
12055
+ this.host.setIsConference(true);
12056
+ }
12004
12057
  }
12005
12058
 
12006
12059
  async start() {
12007
12060
  this.started = true;
12008
12061
  // $FlowFixMe
12009
- this.startTime = Object.values(this.participants).length ? Object.values(this.participants)[0].startTime : null;
12062
+ this.answerTime = Object.values(this.participants).length ? Object.values(this.participants)[0].answerTime : null;
12010
12063
 
12011
12064
  const participantIds = Object.keys(this.participants);
12012
12065
  const conference = await getApiClient().calld.createAdHocConference(this.host.callId, participantIds);
@@ -12295,16 +12348,16 @@ class Phone extends Emitter {
12295
12348
  }
12296
12349
  }
12297
12350
 
12298
- hold(callSession , isConference = false) {
12299
- return this.phone && this.phone.hold(callSession, true, isConference);
12351
+ hold(callSession ) {
12352
+ return this.phone && this.phone.hold(callSession, true);
12300
12353
  }
12301
12354
 
12302
- unhold(callSession , isConference = false) {
12303
- return this.phone && this.phone.unhold(callSession, true, isConference);
12355
+ unhold(callSession ) {
12356
+ return this.phone && this.phone.unhold(callSession, true);
12304
12357
  }
12305
12358
 
12306
- resume(callSession , isConference = false) {
12307
- return this.phone && this.phone.resume(callSession, isConference);
12359
+ resume(callSession ) {
12360
+ return this.phone && this.phone.resume(callSession);
12308
12361
  }
12309
12362
 
12310
12363
  reject(callSession ) {
@@ -14051,6 +14104,7 @@ const Wazo = {
14051
14104
  InvalidAuthorization,
14052
14105
  CanceledCallError,
14053
14106
  SFUNotAvailableError,
14107
+ NoTenantIdError,
14054
14108
  };
14055
14109
 
14056
14110
  if (window) {
@@ -564,6 +564,7 @@ const LINE_STATE = {
564
564
 
565
565
 
566
566
 
567
+
567
568
 
568
569
 
569
570
 
@@ -600,6 +601,7 @@ const LINE_STATE = {
600
601
 
601
602
 
602
603
 
604
+
603
605
 
604
606
 
605
607
 
@@ -631,6 +633,7 @@ class Profile {
631
633
 
632
634
 
633
635
 
636
+
634
637
 
635
638
 
636
639
 
@@ -647,6 +650,7 @@ class Profile {
647
650
  lines: plain.lines.map(line => Line.parse(line)),
648
651
  username: plain.username,
649
652
  mobileNumber: plain.mobile_phone_number || '',
653
+ ringSeconds: plain.ring_seconds,
650
654
  forwards: [
651
655
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
652
656
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -683,6 +687,7 @@ class Profile {
683
687
  switchboards,
684
688
  agent,
685
689
  status,
690
+ ringSeconds,
686
691
  sipLines,
687
692
  callPickupTargetUsers,
688
693
  onlineCallRecordEnabled,
@@ -704,6 +709,7 @@ class Profile {
704
709
  this.status = status;
705
710
  this.callPickupTargetUsers = callPickupTargetUsers;
706
711
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
712
+ this.ringSeconds = ringSeconds;
707
713
 
708
714
  this.sipLines = sipLines || [];
709
715
  }
@@ -1757,7 +1763,7 @@ class Recording {
1757
1763
 
1758
1764
 
1759
1765
 
1760
-
1766
+
1761
1767
 
1762
1768
 
1763
1769
 
@@ -1060,6 +1060,7 @@ const LINE_STATE = {
1060
1060
 
1061
1061
 
1062
1062
 
1063
+
1063
1064
 
1064
1065
 
1065
1066
 
@@ -1096,6 +1097,7 @@ const LINE_STATE = {
1096
1097
 
1097
1098
 
1098
1099
 
1100
+
1099
1101
 
1100
1102
 
1101
1103
 
@@ -1127,6 +1129,7 @@ class Profile {
1127
1129
 
1128
1130
 
1129
1131
 
1132
+
1130
1133
 
1131
1134
 
1132
1135
 
@@ -1143,6 +1146,7 @@ class Profile {
1143
1146
  lines: plain.lines.map(line => Line.parse(line)),
1144
1147
  username: plain.username,
1145
1148
  mobileNumber: plain.mobile_phone_number || '',
1149
+ ringSeconds: plain.ring_seconds,
1146
1150
  forwards: [
1147
1151
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1148
1152
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1179,6 +1183,7 @@ class Profile {
1179
1183
  switchboards,
1180
1184
  agent,
1181
1185
  status,
1186
+ ringSeconds,
1182
1187
  sipLines,
1183
1188
  callPickupTargetUsers,
1184
1189
  onlineCallRecordEnabled,
@@ -1200,6 +1205,7 @@ class Profile {
1200
1205
  this.status = status;
1201
1206
  this.callPickupTargetUsers = callPickupTargetUsers;
1202
1207
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1208
+ this.ringSeconds = ringSeconds;
1203
1209
 
1204
1210
  this.sipLines = sipLines || [];
1205
1211
  }
@@ -3303,7 +3309,7 @@ class Recording {
3303
3309
 
3304
3310
 
3305
3311
 
3306
-
3312
+
3307
3313
 
3308
3314
 
3309
3315