@wazo/sdk 0.37.33 → 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 (98) hide show
  1. package/README.md +1 -0
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +17 -0
  4. package/esm/__tests__/web-rtc-client.test.js +18 -1
  5. package/esm/api/auth.js +5 -0
  6. package/esm/api/call-logd.js +6 -0
  7. package/esm/api/chatd.js +6 -0
  8. package/esm/api/confd.js +6 -0
  9. package/esm/api-client.js +17 -0
  10. package/esm/checker/Checker.js +18 -1
  11. package/esm/checker/checks/aor.js +17 -0
  12. package/esm/checker/checks/api.js +17 -0
  13. package/esm/checker/checks/index.js +18 -1
  14. package/esm/checker/checks/webrtc-transport.js +18 -1
  15. package/esm/checker/checks/webrtc.js +18 -1
  16. package/esm/domain/AdHocAPIConference.js +21 -0
  17. package/esm/domain/CallLog.js +6 -0
  18. package/esm/domain/CallSession.js +14 -0
  19. package/esm/domain/Features.js +17 -0
  20. package/esm/domain/Phone/CTIPhone.js +31 -0
  21. package/esm/domain/Phone/WebRTCPhone.js +65 -15
  22. package/esm/domain/Profile.js +6 -0
  23. package/esm/domain/__tests__/CallLog.test.js +10 -0
  24. package/esm/domain/__tests__/CallSession.test.js +14 -0
  25. package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
  26. package/esm/domain/__tests__/Profile.test.js +6 -0
  27. package/esm/domain/__tests__/Room.test.js +14 -0
  28. package/esm/domain/__tests__/Session.test.js +6 -0
  29. package/esm/index.js +93 -22
  30. package/esm/service/CallApi.js +17 -0
  31. package/esm/service/getApiClient.js +17 -0
  32. package/esm/simple/Auth.js +93 -22
  33. package/esm/simple/Configuration.js +93 -22
  34. package/esm/simple/Directory.js +17 -0
  35. package/esm/simple/Phone.js +93 -22
  36. package/esm/simple/index.js +93 -22
  37. package/esm/simple/room/LocalParticipant.js +93 -22
  38. package/esm/simple/room/Participant.js +93 -22
  39. package/esm/simple/room/RemoteParticipant.js +93 -22
  40. package/esm/simple/room/Room.js +93 -22
  41. package/esm/simple/room/SipRoom.js +93 -22
  42. package/esm/simple/room/Stream.js +93 -22
  43. package/esm/simple/room/__tests__/RemoteParticipant.test.js +93 -22
  44. package/esm/simple/utils.js +93 -22
  45. package/esm/web-rtc-client.js +18 -1
  46. package/lib/__tests__/api-client.test.js +17 -0
  47. package/lib/__tests__/web-rtc-client.test.js +18 -1
  48. package/lib/api/auth.js +5 -0
  49. package/lib/api/call-logd.js +6 -0
  50. package/lib/api/chatd.js +6 -0
  51. package/lib/api/confd.js +6 -0
  52. package/lib/api-client.js +17 -0
  53. package/lib/checker/Checker.js +18 -1
  54. package/lib/checker/checks/aor.js +17 -0
  55. package/lib/checker/checks/api.js +17 -0
  56. package/lib/checker/checks/index.js +18 -1
  57. package/lib/checker/checks/webrtc-transport.js +18 -1
  58. package/lib/checker/checks/webrtc.js +18 -1
  59. package/lib/domain/AdHocAPIConference.js +21 -0
  60. package/lib/domain/CallLog.js +6 -0
  61. package/lib/domain/CallSession.js +14 -0
  62. package/lib/domain/Features.js +17 -0
  63. package/lib/domain/Phone/CTIPhone.js +31 -0
  64. package/lib/domain/Phone/WebRTCPhone.js +65 -15
  65. package/lib/domain/Profile.js +6 -0
  66. package/lib/domain/__tests__/CallLog.test.js +10 -0
  67. package/lib/domain/__tests__/CallSession.test.js +14 -0
  68. package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
  69. package/lib/domain/__tests__/Profile.test.js +6 -0
  70. package/lib/domain/__tests__/Room.test.js +14 -0
  71. package/lib/domain/__tests__/Session.test.js +6 -0
  72. package/lib/index.js +93 -22
  73. package/lib/service/CallApi.js +17 -0
  74. package/lib/service/getApiClient.js +17 -0
  75. package/lib/simple/Auth.js +93 -22
  76. package/lib/simple/Configuration.js +93 -22
  77. package/lib/simple/Directory.js +17 -0
  78. package/lib/simple/Phone.js +93 -22
  79. package/lib/simple/index.js +93 -22
  80. package/lib/simple/room/LocalParticipant.js +93 -22
  81. package/lib/simple/room/Participant.js +93 -22
  82. package/lib/simple/room/RemoteParticipant.js +93 -22
  83. package/lib/simple/room/Room.js +93 -22
  84. package/lib/simple/room/SipRoom.js +93 -22
  85. package/lib/simple/room/Stream.js +93 -22
  86. package/lib/simple/room/__tests__/RemoteParticipant.test.js +93 -22
  87. package/lib/simple/utils.js +93 -22
  88. package/lib/web-rtc-client.js +18 -1
  89. package/package.json +1 -1
  90. package/src/api/auth.js +5 -0
  91. package/src/domain/AdHocAPIConference.js +4 -0
  92. package/src/domain/CallLog.js +6 -0
  93. package/src/domain/CallSession.js +14 -0
  94. package/src/domain/Phone/WebRTCPhone.js +51 -15
  95. package/src/domain/Profile.js +6 -0
  96. package/src/domain/__tests__/CallLog.test.js +4 -0
  97. package/src/simple/Phone.js +6 -6
  98. package/src/web-rtc-client.js +1 -1
@@ -394,6 +394,7 @@ const LINE_STATE = {
394
394
 
395
395
 
396
396
 
397
+
397
398
 
398
399
 
399
400
 
@@ -430,6 +431,7 @@ const LINE_STATE = {
430
431
 
431
432
 
432
433
 
434
+
433
435
 
434
436
 
435
437
 
@@ -461,6 +463,7 @@ class Profile {
461
463
 
462
464
 
463
465
 
466
+
464
467
 
465
468
 
466
469
 
@@ -477,6 +480,7 @@ class Profile {
477
480
  lines: plain.lines.map(line => Line.parse(line)),
478
481
  username: plain.username,
479
482
  mobileNumber: plain.mobile_phone_number || '',
483
+ ringSeconds: plain.ring_seconds,
480
484
  forwards: [
481
485
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
482
486
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -513,6 +517,7 @@ class Profile {
513
517
  switchboards,
514
518
  agent,
515
519
  status,
520
+ ringSeconds,
516
521
  sipLines,
517
522
  callPickupTargetUsers,
518
523
  onlineCallRecordEnabled,
@@ -534,6 +539,7 @@ class Profile {
534
539
  this.status = status;
535
540
  this.callPickupTargetUsers = callPickupTargetUsers;
536
541
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
542
+ this.ringSeconds = ringSeconds;
537
543
 
538
544
  this.sipLines = sipLines || [];
539
545
  }
@@ -2226,6 +2232,7 @@ var authMethods = (client , baseUrl ) => ({
2226
2232
 
2227
2233
 
2228
2234
 
2235
+
2229
2236
  ) {
2230
2237
  const body = {
2231
2238
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2245,6 +2252,10 @@ var authMethods = (client , baseUrl ) => ({
2245
2252
  headers['Wazo-Session-Type'] = 'mobile';
2246
2253
  }
2247
2254
 
2255
+ if (params.tenantId) {
2256
+ body.tenant_id = params.tenantId;
2257
+ }
2258
+
2248
2259
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2249
2260
  },
2250
2261
 
@@ -3285,6 +3296,7 @@ var updateFrom = (instance , from ) => {
3285
3296
 
3286
3297
 
3287
3298
 
3299
+
3288
3300
 
3289
3301
 
3290
3302
  class CallSession {
@@ -3347,6 +3359,8 @@ class CallSession {
3347
3359
 
3348
3360
 
3349
3361
 
3362
+
3363
+
3350
3364
 
3351
3365
 
3352
3366
 
@@ -3378,6 +3392,7 @@ class CallSession {
3378
3392
  videoRemotelyDowngraded,
3379
3393
  sipSession,
3380
3394
  answerTime,
3395
+ conference,
3381
3396
  } ) {
3382
3397
  this.callId = callId;
3383
3398
  this.sipCallId = sipCallId;
@@ -3406,6 +3421,7 @@ class CallSession {
3406
3421
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3407
3422
  this.sipSession = sipSession;
3408
3423
  this.answerTime = answerTime || this.answerTime;
3424
+ this.conference = conference;
3409
3425
 
3410
3426
  // Useful to compare instead of instanceof with minified code
3411
3427
  this.type = 'CallSession';
@@ -3463,6 +3479,10 @@ class CallSession {
3463
3479
  this.screensharing = false;
3464
3480
  }
3465
3481
 
3482
+ setIsConference(conference ) {
3483
+ this.conference = conference;
3484
+ }
3485
+
3466
3486
  isIncoming() {
3467
3487
  return !this.isCaller && !this.answered;
3468
3488
  }
@@ -3539,6 +3559,10 @@ class CallSession {
3539
3559
  return this.sipStatus === sessionState.SessionState.Terminated;
3540
3560
  }
3541
3561
 
3562
+ isConference() {
3563
+ return this.conference;
3564
+ }
3565
+
3542
3566
  getElapsedTimeInSeconds() {
3543
3567
  if (!this.startTime) {
3544
3568
  return 0;
@@ -3630,6 +3654,7 @@ class CallSession {
3630
3654
  cameraEnabled: false,
3631
3655
  dialedExtension: call.dialedExtension,
3632
3656
  call,
3657
+ conference: false, // @FIXME?
3633
3658
  });
3634
3659
  }
3635
3660
  }
@@ -3719,11 +3744,13 @@ class Recording {
3719
3744
 
3720
3745
 
3721
3746
 
3747
+
3722
3748
 
3723
3749
 
3724
3750
 
3725
3751
 
3726
3752
 
3753
+
3727
3754
 
3728
3755
 
3729
3756
 
@@ -3744,10 +3771,12 @@ class Recording {
3744
3771
 
3745
3772
 
3746
3773
 
3774
+
3747
3775
 
3748
3776
 
3749
3777
 
3750
3778
 
3779
+
3751
3780
 
3752
3781
 
3753
3782
 
@@ -3809,10 +3838,12 @@ class CallLog {
3809
3838
  || plain.destination_extension
3810
3839
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3811
3840
  name: plain.requested_name || plain.destination_name || '',
3841
+ uuid: plain.destination_user_uuid,
3812
3842
  },
3813
3843
  source: {
3814
3844
  extension: plain.source_extension,
3815
3845
  name: plain.source_name,
3846
+ uuid: plain.source_user_uuid,
3816
3847
  },
3817
3848
  id: plain.id,
3818
3849
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5655,6 +5686,10 @@ class AdHocAPIConference {
5655
5686
  this.conferenceId = conferenceId || '';
5656
5687
  this.muted = muted || false;
5657
5688
  this.paused = paused || false;
5689
+
5690
+ if (this.host) {
5691
+ this.host.setIsConference(true);
5692
+ }
5658
5693
  }
5659
5694
 
5660
5695
  async start() {
@@ -6409,7 +6444,7 @@ const events$1 = [REGISTERED, UNREGISTERED, REGISTRATION_FAILED, INVITE];
6409
6444
  const transportEvents = [CONNECTED, DISCONNECTED, TRANSPORT_ERROR, MESSAGE];
6410
6445
  class CanceledCallError extends Error {}
6411
6446
 
6412
- const MAX_REGISTER_TRIES = 10;
6447
+ const MAX_REGISTER_TRIES = 5;
6413
6448
 
6414
6449
 
6415
6450
 
@@ -9364,7 +9399,11 @@ class WebRTCPhone extends Emitter {
9364
9399
  accept(callSession , cameraEnabled ) {
9365
9400
  logger$8.info('WebRTC phone - accept call', { id: callSession ? callSession.getId() : 'n/a', cameraEnabled });
9366
9401
  if (this.currentSipSession) {
9367
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true);
9402
+ this.holdSipSession(
9403
+ this.currentSipSession,
9404
+ this.currentCallSession,
9405
+ true,
9406
+ );
9368
9407
  }
9369
9408
 
9370
9409
  if (!callSession) {
@@ -9372,6 +9411,12 @@ class WebRTCPhone extends Emitter {
9372
9411
  return Promise.resolve(null);
9373
9412
  }
9374
9413
 
9414
+ const sipSessionId = this.getSipSessionIdFromCallSession(callSession);
9415
+ if (sipSessionId && !(sipSessionId in this.callSessions)) {
9416
+ logger$8.warn('Call session already ended or not found, can\'t accept it.', { sipSessionId });
9417
+ return Promise.resolve(null);
9418
+ }
9419
+
9375
9420
  if (callSession.getId() in this.acceptedSessions) {
9376
9421
  logger$8.warn('CallSession already accepted.', { id: callSession ? callSession.getId() : 'n/a' });
9377
9422
  return Promise.resolve(callSession.sipCallId);
@@ -9451,22 +9496,22 @@ class WebRTCPhone extends Emitter {
9451
9496
  }
9452
9497
  }
9453
9498
 
9454
- hold(callSession , withEvent = true, isConference = false) {
9499
+ hold(callSession , withEvent = true) {
9455
9500
  logger$8.info('WebRTC hold', { id: callSession.getId() });
9456
9501
 
9457
9502
  const sipSession = this.findSipSession(callSession);
9458
9503
 
9459
- return sipSession ? this.holdSipSession(sipSession, callSession, withEvent, isConference) : null;
9504
+ return sipSession ? this.holdSipSession(sipSession, callSession, withEvent) : null;
9460
9505
  }
9461
9506
 
9462
9507
  // @Deprecated
9463
- unhold(callSession , withEvent = true, isConference = false) {
9508
+ unhold(callSession , withEvent = true) {
9464
9509
  console.warn('Please note that `phone.unhold()` is being deprecated; `phone.resume()` is the preferred method');
9465
9510
 
9466
- return this.resume(callSession, isConference, withEvent);
9511
+ return this.resume(callSession, withEvent);
9467
9512
  }
9468
9513
 
9469
- resume(callSession , isConference = false, withEvent = true) {
9514
+ resume(callSession , withEvent = true) {
9470
9515
  logger$8.info('WebRTC resume called', { id: callSession ? callSession.getId() : null });
9471
9516
 
9472
9517
  const sipSession = this.findSipSession(callSession);
@@ -9479,10 +9524,14 @@ class WebRTCPhone extends Emitter {
9479
9524
  // Hold current session if different from the current one (we don't want 2 sessions active at the same time).
9480
9525
  if (this.currentSipSession && this.currentSipSession.id !== sipSession.id) {
9481
9526
  logger$8.info('WebRTC hold call after resume', { id: this.currentSipSession.id });
9482
- this.holdSipSession(this.currentSipSession, this.currentCallSession);
9527
+ this.holdSipSession(
9528
+ this.currentSipSession,
9529
+ this.currentCallSession,
9530
+ withEvent,
9531
+ );
9483
9532
  }
9484
9533
 
9485
- const promise = this.unholdSipSession(sipSession, callSession, withEvent, isConference);
9534
+ const promise = this.unholdSipSession(sipSession, callSession, withEvent);
9486
9535
  this.currentSipSession = sipSession;
9487
9536
  if (callSession) {
9488
9537
  this.currentCallSession = callSession;
@@ -9495,7 +9544,6 @@ class WebRTCPhone extends Emitter {
9495
9544
  sipSession ,
9496
9545
  callSession ,
9497
9546
  withEvent = true,
9498
- isConference = false,
9499
9547
  ) {
9500
9548
  if (!sipSession) {
9501
9549
  return new Promise((resolve, reject) => reject(new Error('No session to hold')));
@@ -9516,6 +9564,8 @@ class WebRTCPhone extends Emitter {
9516
9564
  await this.client.downgradeToAudio(sipSession);
9517
9565
  }
9518
9566
 
9567
+ const isConference = !!callSession && callSession.isConference();
9568
+
9519
9569
  const promise = this.client.hold(sipSession, isConference, hasVideo);
9520
9570
  if (withEvent) {
9521
9571
  this.eventEmitter.emit(ON_CALL_HELD, this._createCallSession(sipSession, callSession));
@@ -9528,11 +9578,13 @@ class WebRTCPhone extends Emitter {
9528
9578
  sipSession ,
9529
9579
  callSession ,
9530
9580
  withEvent = true,
9531
- isConference = false,
9532
9581
  ) {
9533
9582
  if (!sipSession) {
9534
9583
  return new Promise((resolve, reject) => reject(new Error('No session to unhold')));
9535
9584
  }
9585
+
9586
+ const isConference = !!callSession && callSession.isConference();
9587
+
9536
9588
  const sessionId = this.getSipSessionId(sipSession);
9537
9589
  logger$8.info('WebRTC unhold sip session', { sessionId, isConference });
9538
9590
 
@@ -9674,7 +9726,11 @@ class WebRTCPhone extends Emitter {
9674
9726
  await this.client.register();
9675
9727
  }
9676
9728
  if (this.currentSipSession) {
9677
- this.holdSipSession(this.currentSipSession, this.currentCallSession, true).catch(e => {
9729
+ this.holdSipSession(
9730
+ this.currentSipSession,
9731
+ this.currentCallSession,
9732
+ true,
9733
+ ).catch(e => {
9678
9734
  logger$8.warn('Unable to hold current session when making another call', e);
9679
9735
  });
9680
9736
  }
@@ -9689,6 +9745,7 @@ class WebRTCPhone extends Emitter {
9689
9745
  return Promise.resolve(null);
9690
9746
  }
9691
9747
  const callSession = this._createOutgoingCallSession(sipSession, cameraEnabled || false);
9748
+ callSession.setIsConference(conference);
9692
9749
  callSession.creationTime = new Date();
9693
9750
  this._updateCallSession(callSession);
9694
9751
 
@@ -9996,9 +10053,17 @@ class WebRTCPhone extends Emitter {
9996
10053
  });
9997
10054
 
9998
10055
  this.client.on(this.client.ACCEPTED, (sipSession ) => {
9999
- logger$8.info('WebRTC call accepted', { sipId: sipSession.id });
10056
+ const sessionId = this.getSipSessionId(sipSession);
10057
+ const hasSession = sessionId in this.callSessions;
10000
10058
 
10001
- this._onCallAccepted(sipSession, this.client.hasVideo(this.getSipSessionId(sipSession)));
10059
+ logger$8.info('WebRTC call accepted', { sipId: sessionId, hasSession });
10060
+
10061
+ if (!hasSession) {
10062
+ logger$8.warn('Call accepted ignored, session is no longer present in the WebRtcPhone', { sessionId });
10063
+ return;
10064
+ }
10065
+
10066
+ this._onCallAccepted(sipSession, this.client.hasVideo(sessionId));
10002
10067
 
10003
10068
  if (this.audioOutputDeviceId) {
10004
10069
  this.client.changeAudioOutputDevice(this.audioOutputDeviceId);
@@ -10134,9 +10199,14 @@ class WebRTCPhone extends Emitter {
10134
10199
  return this.client.getSipSessionId(sipSession);
10135
10200
  }
10136
10201
 
10137
- _updateCallSession(callSession ) {
10202
+ getSipSessionIdFromCallSession(callSession ) {
10138
10203
  const sipSession = this.findSipSession(callSession);
10139
- const sipSessionId = sipSession ? this.getSipSessionId(sipSession) : null;
10204
+
10205
+ return sipSession ? this.getSipSessionId(sipSession) : null;
10206
+ }
10207
+
10208
+ _updateCallSession(callSession ) {
10209
+ const sipSessionId = this.getSipSessionIdFromCallSession(callSession);
10140
10210
 
10141
10211
  if (sipSessionId) {
10142
10212
  this.callSessions[sipSessionId] = callSession;
@@ -10254,6 +10324,7 @@ class WebRTCPhone extends Emitter {
10254
10324
  recording: fromSession ? fromSession.isRecording() : false,
10255
10325
  recordingPaused: false, // @TODO
10256
10326
  sipSession,
10327
+ conference: !!fromSession && fromSession.isConference(),
10257
10328
  ...extra,
10258
10329
  });
10259
10330
 
@@ -10510,16 +10581,16 @@ class Phone extends Emitter {
10510
10581
  }
10511
10582
  }
10512
10583
 
10513
- hold(callSession , isConference = false) {
10514
- return this.phone && this.phone.hold(callSession, true, isConference);
10584
+ hold(callSession ) {
10585
+ return this.phone && this.phone.hold(callSession, true);
10515
10586
  }
10516
10587
 
10517
- unhold(callSession , isConference = false) {
10518
- return this.phone && this.phone.unhold(callSession, true, isConference);
10588
+ unhold(callSession ) {
10589
+ return this.phone && this.phone.unhold(callSession, true);
10519
10590
  }
10520
10591
 
10521
- resume(callSession , isConference = false) {
10522
- return this.phone && this.phone.resume(callSession, isConference);
10592
+ resume(callSession ) {
10593
+ return this.phone && this.phone.resume(callSession);
10523
10594
  }
10524
10595
 
10525
10596
  reject(callSession ) {
@@ -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
  }
@@ -2203,6 +2209,7 @@ var authMethods = (client , baseUrl ) => ({
2203
2209
 
2204
2210
 
2205
2211
 
2212
+
2206
2213
  ) {
2207
2214
  const body = {
2208
2215
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2222,6 +2229,10 @@ var authMethods = (client , baseUrl ) => ({
2222
2229
  headers['Wazo-Session-Type'] = 'mobile';
2223
2230
  }
2224
2231
 
2232
+ if (params.tenantId) {
2233
+ body.tenant_id = params.tenantId;
2234
+ }
2235
+
2225
2236
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2226
2237
  },
2227
2238
 
@@ -3290,11 +3301,13 @@ class Recording {
3290
3301
 
3291
3302
 
3292
3303
 
3304
+
3293
3305
 
3294
3306
 
3295
3307
 
3296
3308
 
3297
3309
 
3310
+
3298
3311
 
3299
3312
 
3300
3313
 
@@ -3315,10 +3328,12 @@ class Recording {
3315
3328
 
3316
3329
 
3317
3330
 
3331
+
3318
3332
 
3319
3333
 
3320
3334
 
3321
3335
 
3336
+
3322
3337
 
3323
3338
 
3324
3339
 
@@ -3380,10 +3395,12 @@ class CallLog {
3380
3395
  || plain.destination_extension
3381
3396
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3382
3397
  name: plain.requested_name || plain.destination_name || '',
3398
+ uuid: plain.destination_user_uuid,
3383
3399
  },
3384
3400
  source: {
3385
3401
  extension: plain.source_extension,
3386
3402
  name: plain.source_name,
3403
+ uuid: plain.source_user_uuid,
3387
3404
  },
3388
3405
  id: plain.id,
3389
3406
  duration: (plain.duration || 0) * 1000, // duration is in seconds