@wazo/sdk 0.37.35 → 0.37.36

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 (94) hide show
  1. package/README.md +1 -0
  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/call-logd.js +1 -1
  6. package/esm/api/chatd.js +6 -0
  7. package/esm/api/confd.js +6 -0
  8. package/esm/api-client.js +7 -1
  9. package/esm/checker/Checker.js +7 -1
  10. package/esm/checker/checks/aor.js +7 -1
  11. package/esm/checker/checks/api.js +7 -1
  12. package/esm/checker/checks/index.js +7 -1
  13. package/esm/checker/checks/webrtc-transport.js +7 -1
  14. package/esm/checker/checks/webrtc.js +7 -1
  15. package/esm/domain/AdHocAPIConference.js +11 -1
  16. package/esm/domain/CallLog.js +1 -1
  17. package/esm/domain/CallSession.js +14 -0
  18. package/esm/domain/Features.js +7 -1
  19. package/esm/domain/Phone/CTIPhone.js +21 -1
  20. package/esm/domain/Phone/WebRTCPhone.js +42 -11
  21. package/esm/domain/Profile.js +6 -0
  22. package/esm/domain/__tests__/CallLog.test.js +5 -1
  23. package/esm/domain/__tests__/CallSession.test.js +14 -0
  24. package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
  25. package/esm/domain/__tests__/Profile.test.js +6 -0
  26. package/esm/domain/__tests__/Room.test.js +14 -0
  27. package/esm/domain/__tests__/Session.test.js +6 -0
  28. package/esm/index.js +59 -18
  29. package/esm/service/CallApi.js +7 -1
  30. package/esm/service/getApiClient.js +7 -1
  31. package/esm/simple/Auth.js +59 -18
  32. package/esm/simple/Configuration.js +59 -18
  33. package/esm/simple/Directory.js +7 -1
  34. package/esm/simple/Phone.js +59 -18
  35. package/esm/simple/index.js +59 -18
  36. package/esm/simple/room/LocalParticipant.js +59 -18
  37. package/esm/simple/room/Participant.js +59 -18
  38. package/esm/simple/room/RemoteParticipant.js +59 -18
  39. package/esm/simple/room/Room.js +59 -18
  40. package/esm/simple/room/SipRoom.js +59 -18
  41. package/esm/simple/room/Stream.js +59 -18
  42. package/esm/simple/room/__tests__/RemoteParticipant.test.js +59 -18
  43. package/esm/simple/utils.js +59 -18
  44. package/esm/web-rtc-client.js +7 -1
  45. package/lib/__tests__/api-client.test.js +7 -1
  46. package/lib/__tests__/web-rtc-client.test.js +7 -1
  47. package/lib/api/call-logd.js +1 -1
  48. package/lib/api/chatd.js +6 -0
  49. package/lib/api/confd.js +6 -0
  50. package/lib/api-client.js +7 -1
  51. package/lib/checker/Checker.js +7 -1
  52. package/lib/checker/checks/aor.js +7 -1
  53. package/lib/checker/checks/api.js +7 -1
  54. package/lib/checker/checks/index.js +7 -1
  55. package/lib/checker/checks/webrtc-transport.js +7 -1
  56. package/lib/checker/checks/webrtc.js +7 -1
  57. package/lib/domain/AdHocAPIConference.js +11 -1
  58. package/lib/domain/CallLog.js +1 -1
  59. package/lib/domain/CallSession.js +14 -0
  60. package/lib/domain/Features.js +7 -1
  61. package/lib/domain/Phone/CTIPhone.js +21 -1
  62. package/lib/domain/Phone/WebRTCPhone.js +42 -11
  63. package/lib/domain/Profile.js +6 -0
  64. package/lib/domain/__tests__/CallLog.test.js +5 -1
  65. package/lib/domain/__tests__/CallSession.test.js +14 -0
  66. package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
  67. package/lib/domain/__tests__/Profile.test.js +6 -0
  68. package/lib/domain/__tests__/Room.test.js +14 -0
  69. package/lib/domain/__tests__/Session.test.js +6 -0
  70. package/lib/index.js +59 -18
  71. package/lib/service/CallApi.js +7 -1
  72. package/lib/service/getApiClient.js +7 -1
  73. package/lib/simple/Auth.js +59 -18
  74. package/lib/simple/Configuration.js +59 -18
  75. package/lib/simple/Directory.js +7 -1
  76. package/lib/simple/Phone.js +59 -18
  77. package/lib/simple/index.js +59 -18
  78. package/lib/simple/room/LocalParticipant.js +59 -18
  79. package/lib/simple/room/Participant.js +59 -18
  80. package/lib/simple/room/RemoteParticipant.js +59 -18
  81. package/lib/simple/room/Room.js +59 -18
  82. package/lib/simple/room/SipRoom.js +59 -18
  83. package/lib/simple/room/Stream.js +59 -18
  84. package/lib/simple/room/__tests__/RemoteParticipant.test.js +59 -18
  85. package/lib/simple/utils.js +59 -18
  86. package/lib/web-rtc-client.js +7 -1
  87. package/package.json +1 -1
  88. package/src/domain/AdHocAPIConference.js +4 -0
  89. package/src/domain/CallLog.js +1 -1
  90. package/src/domain/CallSession.js +14 -0
  91. package/src/domain/Phone/WebRTCPhone.js +28 -11
  92. package/src/domain/Profile.js +6 -0
  93. package/src/domain/__tests__/CallLog.test.js +4 -0
  94. package/src/simple/Phone.js +6 -6
@@ -59,6 +59,7 @@ var updateFrom = (instance , from ) => {
59
59
 
60
60
 
61
61
 
62
+
62
63
 
63
64
 
64
65
  class CallSession {
@@ -121,6 +122,8 @@ class CallSession {
121
122
 
122
123
 
123
124
 
125
+
126
+
124
127
 
125
128
 
126
129
 
@@ -152,6 +155,7 @@ class CallSession {
152
155
  videoRemotelyDowngraded,
153
156
  sipSession,
154
157
  answerTime,
158
+ conference,
155
159
  } ) {
156
160
  this.callId = callId;
157
161
  this.sipCallId = sipCallId;
@@ -180,6 +184,7 @@ class CallSession {
180
184
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
185
  this.sipSession = sipSession;
182
186
  this.answerTime = answerTime || this.answerTime;
187
+ this.conference = conference;
183
188
 
184
189
  // Useful to compare instead of instanceof with minified code
185
190
  this.type = 'CallSession';
@@ -237,6 +242,10 @@ class CallSession {
237
242
  this.screensharing = false;
238
243
  }
239
244
 
245
+ setIsConference(conference ) {
246
+ this.conference = conference;
247
+ }
248
+
240
249
  isIncoming() {
241
250
  return !this.isCaller && !this.answered;
242
251
  }
@@ -313,6 +322,10 @@ class CallSession {
313
322
  return this.sipStatus === SessionState.Terminated;
314
323
  }
315
324
 
325
+ isConference() {
326
+ return this.conference;
327
+ }
328
+
316
329
  getElapsedTimeInSeconds() {
317
330
  if (!this.startTime) {
318
331
  return 0;
@@ -404,6 +417,7 @@ class CallSession {
404
417
  cameraEnabled: false,
405
418
  dialedExtension: call.dialedExtension,
406
419
  call,
420
+ conference: false, // @FIXME?
407
421
  });
408
422
  }
409
423
  }
@@ -1052,6 +1052,7 @@ const LINE_STATE = {
1052
1052
 
1053
1053
 
1054
1054
 
1055
+
1055
1056
 
1056
1057
 
1057
1058
 
@@ -1088,6 +1089,7 @@ const LINE_STATE = {
1088
1089
 
1089
1090
 
1090
1091
 
1092
+
1091
1093
 
1092
1094
 
1093
1095
 
@@ -1119,6 +1121,7 @@ class Profile {
1119
1121
 
1120
1122
 
1121
1123
 
1124
+
1122
1125
 
1123
1126
 
1124
1127
 
@@ -1135,6 +1138,7 @@ class Profile {
1135
1138
  lines: plain.lines.map(line => Line.parse(line)),
1136
1139
  username: plain.username,
1137
1140
  mobileNumber: plain.mobile_phone_number || '',
1141
+ ringSeconds: plain.ring_seconds,
1138
1142
  forwards: [
1139
1143
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1140
1144
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1171,6 +1175,7 @@ class Profile {
1171
1175
  switchboards,
1172
1176
  agent,
1173
1177
  status,
1178
+ ringSeconds,
1174
1179
  sipLines,
1175
1180
  callPickupTargetUsers,
1176
1181
  onlineCallRecordEnabled,
@@ -1192,6 +1197,7 @@ class Profile {
1192
1197
  this.status = status;
1193
1198
  this.callPickupTargetUsers = callPickupTargetUsers;
1194
1199
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1200
+ this.ringSeconds = ringSeconds;
1195
1201
 
1196
1202
  this.sipLines = sipLines || [];
1197
1203
  }
@@ -3295,7 +3301,7 @@ class Recording {
3295
3301
 
3296
3302
 
3297
3303
 
3298
-
3304
+
3299
3305
 
3300
3306
 
3301
3307
 
@@ -365,6 +365,7 @@ const LINE_STATE = {
365
365
 
366
366
 
367
367
 
368
+
368
369
 
369
370
 
370
371
 
@@ -401,6 +402,7 @@ const LINE_STATE = {
401
402
 
402
403
 
403
404
 
405
+
404
406
 
405
407
 
406
408
 
@@ -432,6 +434,7 @@ class Profile {
432
434
 
433
435
 
434
436
 
437
+
435
438
 
436
439
 
437
440
 
@@ -448,6 +451,7 @@ class Profile {
448
451
  lines: plain.lines.map(line => Line.parse(line)),
449
452
  username: plain.username,
450
453
  mobileNumber: plain.mobile_phone_number || '',
454
+ ringSeconds: plain.ring_seconds,
451
455
  forwards: [
452
456
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
453
457
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -484,6 +488,7 @@ class Profile {
484
488
  switchboards,
485
489
  agent,
486
490
  status,
491
+ ringSeconds,
487
492
  sipLines,
488
493
  callPickupTargetUsers,
489
494
  onlineCallRecordEnabled,
@@ -505,6 +510,7 @@ class Profile {
505
510
  this.status = status;
506
511
  this.callPickupTargetUsers = callPickupTargetUsers;
507
512
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
513
+ this.ringSeconds = ringSeconds;
508
514
 
509
515
  this.sipLines = sipLines || [];
510
516
  }
@@ -1733,6 +1739,7 @@ var updateFrom = (instance , from ) => {
1733
1739
 
1734
1740
 
1735
1741
 
1742
+
1736
1743
 
1737
1744
 
1738
1745
  class CallSession {
@@ -1795,6 +1802,8 @@ class CallSession {
1795
1802
 
1796
1803
 
1797
1804
 
1805
+
1806
+
1798
1807
 
1799
1808
 
1800
1809
 
@@ -1826,6 +1835,7 @@ class CallSession {
1826
1835
  videoRemotelyDowngraded,
1827
1836
  sipSession,
1828
1837
  answerTime,
1838
+ conference,
1829
1839
  } ) {
1830
1840
  this.callId = callId;
1831
1841
  this.sipCallId = sipCallId;
@@ -1854,6 +1864,7 @@ class CallSession {
1854
1864
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
1855
1865
  this.sipSession = sipSession;
1856
1866
  this.answerTime = answerTime || this.answerTime;
1867
+ this.conference = conference;
1857
1868
 
1858
1869
  // Useful to compare instead of instanceof with minified code
1859
1870
  this.type = 'CallSession';
@@ -1911,6 +1922,10 @@ class CallSession {
1911
1922
  this.screensharing = false;
1912
1923
  }
1913
1924
 
1925
+ setIsConference(conference ) {
1926
+ this.conference = conference;
1927
+ }
1928
+
1914
1929
  isIncoming() {
1915
1930
  return !this.isCaller && !this.answered;
1916
1931
  }
@@ -1987,6 +2002,10 @@ class CallSession {
1987
2002
  return this.sipStatus === SessionState.Terminated;
1988
2003
  }
1989
2004
 
2005
+ isConference() {
2006
+ return this.conference;
2007
+ }
2008
+
1990
2009
  getElapsedTimeInSeconds() {
1991
2010
  if (!this.startTime) {
1992
2011
  return 0;
@@ -2078,6 +2097,7 @@ class CallSession {
2078
2097
  cameraEnabled: false,
2079
2098
  dialedExtension: call.dialedExtension,
2080
2099
  call,
2100
+ conference: false, // @FIXME?
2081
2101
  });
2082
2102
  }
2083
2103
  }
@@ -2173,7 +2193,7 @@ class Recording {
2173
2193
 
2174
2194
 
2175
2195
 
2176
-
2196
+
2177
2197
 
2178
2198
 
2179
2199
 
@@ -81,6 +81,7 @@ var updateFrom = (instance , from ) => {
81
81
 
82
82
 
83
83
 
84
+
84
85
 
85
86
 
86
87
  class CallSession {
@@ -143,6 +144,8 @@ class CallSession {
143
144
 
144
145
 
145
146
 
147
+
148
+
146
149
 
147
150
 
148
151
 
@@ -174,6 +177,7 @@ class CallSession {
174
177
  videoRemotelyDowngraded,
175
178
  sipSession,
176
179
  answerTime,
180
+ conference,
177
181
  } ) {
178
182
  this.callId = callId;
179
183
  this.sipCallId = sipCallId;
@@ -202,6 +206,7 @@ class CallSession {
202
206
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
203
207
  this.sipSession = sipSession;
204
208
  this.answerTime = answerTime || this.answerTime;
209
+ this.conference = conference;
205
210
 
206
211
  // Useful to compare instead of instanceof with minified code
207
212
  this.type = 'CallSession';
@@ -259,6 +264,10 @@ class CallSession {
259
264
  this.screensharing = false;
260
265
  }
261
266
 
267
+ setIsConference(conference ) {
268
+ this.conference = conference;
269
+ }
270
+
262
271
  isIncoming() {
263
272
  return !this.isCaller && !this.answered;
264
273
  }
@@ -335,6 +344,10 @@ class CallSession {
335
344
  return this.sipStatus === SessionState.Terminated;
336
345
  }
337
346
 
347
+ isConference() {
348
+ return this.conference;
349
+ }
350
+
338
351
  getElapsedTimeInSeconds() {
339
352
  if (!this.startTime) {
340
353
  return 0;
@@ -426,6 +439,7 @@ class CallSession {
426
439
  cameraEnabled: false,
427
440
  dialedExtension: call.dialedExtension,
428
441
  call,
442
+ conference: false, // @FIXME?
429
443
  });
430
444
  }
431
445
  }
@@ -1714,7 +1728,11 @@ class WebRTCPhone extends Emitter {
1714
1728
  accept(callSession , cameraEnabled ) {
1715
1729
  logger.info('WebRTC phone - accept call', { id: callSession ? callSession.getId() : 'n/a', cameraEnabled });
1716
1730
  if (this.currentSipSession) {
1717
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true);
1731
+ this.holdSipSession(
1732
+ this.currentSipSession,
1733
+ this.currentCallSession,
1734
+ true,
1735
+ );
1718
1736
  }
1719
1737
 
1720
1738
  if (!callSession) {
@@ -1807,22 +1825,22 @@ class WebRTCPhone extends Emitter {
1807
1825
  }
1808
1826
  }
1809
1827
 
1810
- hold(callSession , withEvent = true, isConference = false) {
1828
+ hold(callSession , withEvent = true) {
1811
1829
  logger.info('WebRTC hold', { id: callSession.getId() });
1812
1830
 
1813
1831
  const sipSession = this.findSipSession(callSession);
1814
1832
 
1815
- return sipSession ? this.holdSipSession(sipSession, callSession, withEvent, isConference) : null;
1833
+ return sipSession ? this.holdSipSession(sipSession, callSession, withEvent) : null;
1816
1834
  }
1817
1835
 
1818
1836
  // @Deprecated
1819
- unhold(callSession , withEvent = true, isConference = false) {
1837
+ unhold(callSession , withEvent = true) {
1820
1838
  console.warn('Please note that `phone.unhold()` is being deprecated; `phone.resume()` is the preferred method');
1821
1839
 
1822
- return this.resume(callSession, isConference, withEvent);
1840
+ return this.resume(callSession, withEvent);
1823
1841
  }
1824
1842
 
1825
- resume(callSession , isConference = false, withEvent = true) {
1843
+ resume(callSession , withEvent = true) {
1826
1844
  logger.info('WebRTC resume called', { id: callSession ? callSession.getId() : null });
1827
1845
 
1828
1846
  const sipSession = this.findSipSession(callSession);
@@ -1835,10 +1853,14 @@ class WebRTCPhone extends Emitter {
1835
1853
  // Hold current session if different from the current one (we don't want 2 sessions active at the same time).
1836
1854
  if (this.currentSipSession && this.currentSipSession.id !== sipSession.id) {
1837
1855
  logger.info('WebRTC hold call after resume', { id: this.currentSipSession.id });
1838
- this.holdSipSession(this.currentSipSession, this.currentCallSession);
1856
+ this.holdSipSession(
1857
+ this.currentSipSession,
1858
+ this.currentCallSession,
1859
+ withEvent,
1860
+ );
1839
1861
  }
1840
1862
 
1841
- const promise = this.unholdSipSession(sipSession, callSession, withEvent, isConference);
1863
+ const promise = this.unholdSipSession(sipSession, callSession, withEvent);
1842
1864
  this.currentSipSession = sipSession;
1843
1865
  if (callSession) {
1844
1866
  this.currentCallSession = callSession;
@@ -1851,7 +1873,6 @@ class WebRTCPhone extends Emitter {
1851
1873
  sipSession ,
1852
1874
  callSession ,
1853
1875
  withEvent = true,
1854
- isConference = false,
1855
1876
  ) {
1856
1877
  if (!sipSession) {
1857
1878
  return new Promise((resolve, reject) => reject(new Error('No session to hold')));
@@ -1872,6 +1893,8 @@ class WebRTCPhone extends Emitter {
1872
1893
  await this.client.downgradeToAudio(sipSession);
1873
1894
  }
1874
1895
 
1896
+ const isConference = !!callSession && callSession.isConference();
1897
+
1875
1898
  const promise = this.client.hold(sipSession, isConference, hasVideo);
1876
1899
  if (withEvent) {
1877
1900
  this.eventEmitter.emit(ON_CALL_HELD, this._createCallSession(sipSession, callSession));
@@ -1884,11 +1907,13 @@ class WebRTCPhone extends Emitter {
1884
1907
  sipSession ,
1885
1908
  callSession ,
1886
1909
  withEvent = true,
1887
- isConference = false,
1888
1910
  ) {
1889
1911
  if (!sipSession) {
1890
1912
  return new Promise((resolve, reject) => reject(new Error('No session to unhold')));
1891
1913
  }
1914
+
1915
+ const isConference = !!callSession && callSession.isConference();
1916
+
1892
1917
  const sessionId = this.getSipSessionId(sipSession);
1893
1918
  logger.info('WebRTC unhold sip session', { sessionId, isConference });
1894
1919
 
@@ -2030,7 +2055,11 @@ class WebRTCPhone extends Emitter {
2030
2055
  await this.client.register();
2031
2056
  }
2032
2057
  if (this.currentSipSession) {
2033
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true).catch(e => {
2058
+ this.holdSipSession(
2059
+ this.currentSipSession,
2060
+ this.currentCallSession,
2061
+ true,
2062
+ ).catch(e => {
2034
2063
  logger.warn('Unable to hold current session when making another call', e);
2035
2064
  });
2036
2065
  }
@@ -2045,6 +2074,7 @@ class WebRTCPhone extends Emitter {
2045
2074
  return Promise.resolve(null);
2046
2075
  }
2047
2076
  const callSession = this._createOutgoingCallSession(sipSession, cameraEnabled || false);
2077
+ callSession.setIsConference(conference);
2048
2078
  callSession.creationTime = new Date();
2049
2079
  this._updateCallSession(callSession);
2050
2080
 
@@ -2623,6 +2653,7 @@ class WebRTCPhone extends Emitter {
2623
2653
  recording: fromSession ? fromSession.isRecording() : false,
2624
2654
  recordingPaused: false, // @TODO
2625
2655
  sipSession,
2656
+ conference: !!fromSession && fromSession.isConference(),
2626
2657
  ...extra,
2627
2658
  });
2628
2659
 
@@ -199,6 +199,7 @@ const LINE_STATE = {
199
199
 
200
200
 
201
201
 
202
+
202
203
 
203
204
 
204
205
 
@@ -235,6 +236,7 @@ const LINE_STATE = {
235
236
 
236
237
 
237
238
 
239
+
238
240
 
239
241
 
240
242
 
@@ -266,6 +268,7 @@ class Profile {
266
268
 
267
269
 
268
270
 
271
+
269
272
 
270
273
 
271
274
 
@@ -282,6 +285,7 @@ class Profile {
282
285
  lines: plain.lines.map(line => Line.parse(line)),
283
286
  username: plain.username,
284
287
  mobileNumber: plain.mobile_phone_number || '',
288
+ ringSeconds: plain.ring_seconds,
285
289
  forwards: [
286
290
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
287
291
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -318,6 +322,7 @@ class Profile {
318
322
  switchboards,
319
323
  agent,
320
324
  status,
325
+ ringSeconds,
321
326
  sipLines,
322
327
  callPickupTargetUsers,
323
328
  onlineCallRecordEnabled,
@@ -339,6 +344,7 @@ class Profile {
339
344
  this.status = status;
340
345
  this.callPickupTargetUsers = callPickupTargetUsers;
341
346
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
347
+ this.ringSeconds = ringSeconds;
342
348
 
343
349
  this.sipLines = sipLines || [];
344
350
  }
@@ -93,7 +93,7 @@ class Recording {
93
93
 
94
94
 
95
95
 
96
-
96
+
97
97
 
98
98
 
99
99
 
@@ -329,8 +329,10 @@ describe('CallLog domain', () => {
329
329
  call_direction: 'outbound',
330
330
  source_extension: '8020',
331
331
  source_name: 'Jonathan Lessard',
332
+ source_user_uuid: '123',
332
333
  destination_extension: '4182250459',
333
334
  destination_name: null,
335
+ destination_user_uuid: '456',
334
336
  duration: 4,
335
337
  start: '2017-08-06T13:50:55.819057+00:00',
336
338
  end: '2017-08-08T13:51:23.822529+00:00',
@@ -361,10 +363,12 @@ describe('CallLog domain', () => {
361
363
  destination: {
362
364
  extension: '4182250459',
363
365
  name: '',
366
+ uuid: '456',
364
367
  },
365
368
  source: {
366
369
  extension: '8020',
367
370
  name: 'Jonathan Lessard',
371
+ uuid: '123',
368
372
  },
369
373
  id: 215,
370
374
  duration: 4000,
@@ -59,6 +59,7 @@ var updateFrom = (instance , from ) => {
59
59
 
60
60
 
61
61
 
62
+
62
63
 
63
64
 
64
65
  class CallSession {
@@ -121,6 +122,8 @@ class CallSession {
121
122
 
122
123
 
123
124
 
125
+
126
+
124
127
 
125
128
 
126
129
 
@@ -152,6 +155,7 @@ class CallSession {
152
155
  videoRemotelyDowngraded,
153
156
  sipSession,
154
157
  answerTime,
158
+ conference,
155
159
  } ) {
156
160
  this.callId = callId;
157
161
  this.sipCallId = sipCallId;
@@ -180,6 +184,7 @@ class CallSession {
180
184
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
185
  this.sipSession = sipSession;
182
186
  this.answerTime = answerTime || this.answerTime;
187
+ this.conference = conference;
183
188
 
184
189
  // Useful to compare instead of instanceof with minified code
185
190
  this.type = 'CallSession';
@@ -237,6 +242,10 @@ class CallSession {
237
242
  this.screensharing = false;
238
243
  }
239
244
 
245
+ setIsConference(conference ) {
246
+ this.conference = conference;
247
+ }
248
+
240
249
  isIncoming() {
241
250
  return !this.isCaller && !this.answered;
242
251
  }
@@ -313,6 +322,10 @@ class CallSession {
313
322
  return this.sipStatus === SessionState.Terminated;
314
323
  }
315
324
 
325
+ isConference() {
326
+ return this.conference;
327
+ }
328
+
316
329
  getElapsedTimeInSeconds() {
317
330
  if (!this.startTime) {
318
331
  return 0;
@@ -404,6 +417,7 @@ class CallSession {
404
417
  cameraEnabled: false,
405
418
  dialedExtension: call.dialedExtension,
406
419
  call,
420
+ conference: false, // @FIXME?
407
421
  });
408
422
  }
409
423
  }
@@ -59,6 +59,7 @@ var updateFrom = (instance , from ) => {
59
59
 
60
60
 
61
61
 
62
+
62
63
 
63
64
 
64
65
  class CallSession {
@@ -121,6 +122,8 @@ class CallSession {
121
122
 
122
123
 
123
124
 
125
+
126
+
124
127
 
125
128
 
126
129
 
@@ -152,6 +155,7 @@ class CallSession {
152
155
  videoRemotelyDowngraded,
153
156
  sipSession,
154
157
  answerTime,
158
+ conference,
155
159
  } ) {
156
160
  this.callId = callId;
157
161
  this.sipCallId = sipCallId;
@@ -180,6 +184,7 @@ class CallSession {
180
184
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
185
  this.sipSession = sipSession;
182
186
  this.answerTime = answerTime || this.answerTime;
187
+ this.conference = conference;
183
188
 
184
189
  // Useful to compare instead of instanceof with minified code
185
190
  this.type = 'CallSession';
@@ -237,6 +242,10 @@ class CallSession {
237
242
  this.screensharing = false;
238
243
  }
239
244
 
245
+ setIsConference(conference ) {
246
+ this.conference = conference;
247
+ }
248
+
240
249
  isIncoming() {
241
250
  return !this.isCaller && !this.answered;
242
251
  }
@@ -313,6 +322,10 @@ class CallSession {
313
322
  return this.sipStatus === SessionState.Terminated;
314
323
  }
315
324
 
325
+ isConference() {
326
+ return this.conference;
327
+ }
328
+
316
329
  getElapsedTimeInSeconds() {
317
330
  if (!this.startTime) {
318
331
  return 0;
@@ -404,6 +417,7 @@ class CallSession {
404
417
  cameraEnabled: false,
405
418
  dialedExtension: call.dialedExtension,
406
419
  call,
420
+ conference: false, // @FIXME?
407
421
  });
408
422
  }
409
423
  }
@@ -191,6 +191,7 @@ const LINE_STATE = {
191
191
 
192
192
 
193
193
 
194
+
194
195
 
195
196
 
196
197
 
@@ -227,6 +228,7 @@ const LINE_STATE = {
227
228
 
228
229
 
229
230
 
231
+
230
232
 
231
233
 
232
234
 
@@ -258,6 +260,7 @@ class Profile {
258
260
 
259
261
 
260
262
 
263
+
261
264
 
262
265
 
263
266
 
@@ -274,6 +277,7 @@ class Profile {
274
277
  lines: plain.lines.map(line => Line.parse(line)),
275
278
  username: plain.username,
276
279
  mobileNumber: plain.mobile_phone_number || '',
280
+ ringSeconds: plain.ring_seconds,
277
281
  forwards: [
278
282
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
279
283
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -310,6 +314,7 @@ class Profile {
310
314
  switchboards,
311
315
  agent,
312
316
  status,
317
+ ringSeconds,
313
318
  sipLines,
314
319
  callPickupTargetUsers,
315
320
  onlineCallRecordEnabled,
@@ -331,6 +336,7 @@ class Profile {
331
336
  this.status = status;
332
337
  this.callPickupTargetUsers = callPickupTargetUsers;
333
338
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
339
+ this.ringSeconds = ringSeconds;
334
340
 
335
341
  this.sipLines = sipLines || [];
336
342
  }