@wazo/sdk 0.37.16 → 0.37.20

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 (114) hide show
  1. package/dist/wazo-sdk.js +5 -5
  2. package/esm/__tests__/api-client.test.js +9 -5
  3. package/esm/__tests__/web-rtc-client.test.js +69 -19
  4. package/esm/api/agentd.js +1 -1
  5. package/esm/api/amid.js +1 -1
  6. package/esm/api/application.js +1 -1
  7. package/esm/api/auth.js +1 -1
  8. package/esm/api/call-logd.js +3 -3
  9. package/esm/api/calld.js +1 -1
  10. package/esm/api/chatd.js +1 -1
  11. package/esm/api/confd.js +7 -3
  12. package/esm/api/ctid-ng.js +1 -1
  13. package/esm/api/dird.js +1 -1
  14. package/esm/api/webhookd.js +1 -1
  15. package/esm/api-client.js +9 -5
  16. package/esm/checker/Checker.js +69 -19
  17. package/esm/checker/checks/aor.js +9 -5
  18. package/esm/checker/checks/api.js +9 -5
  19. package/esm/checker/checks/index.js +69 -19
  20. package/esm/checker/checks/wazo-websocket.js +1 -1
  21. package/esm/checker/checks/webrtc-transport.js +69 -19
  22. package/esm/checker/checks/webrtc.js +69 -19
  23. package/esm/domain/AdHocAPIConference.js +9 -5
  24. package/esm/domain/CallLog.js +2 -2
  25. package/esm/domain/Features.js +9 -5
  26. package/esm/domain/Meeting.js +6 -2
  27. package/esm/domain/Phone/CTIPhone.js +9 -5
  28. package/esm/domain/Phone/WebRTCPhone.js +9 -2
  29. package/esm/domain/Recording.js +1 -1
  30. package/esm/domain/__tests__/CallLog.test.js +2 -2
  31. package/esm/index.js +77 -19
  32. package/esm/lib/WazoSessionDescriptionHandler.js +1 -1
  33. package/esm/service/CallApi.js +9 -5
  34. package/esm/service/IssueReporter.js +1 -1
  35. package/esm/service/__tests__/IssueReporter.test.js +1 -1
  36. package/esm/service/getApiClient.js +9 -5
  37. package/esm/simple/Auth.js +77 -19
  38. package/esm/simple/Configuration.js +77 -19
  39. package/esm/simple/Directory.js +9 -5
  40. package/esm/simple/Phone.js +77 -19
  41. package/esm/simple/Websocket.js +1 -1
  42. package/esm/simple/index.js +77 -19
  43. package/esm/simple/room/LocalParticipant.js +77 -19
  44. package/esm/simple/room/Participant.js +77 -19
  45. package/esm/simple/room/RemoteParticipant.js +77 -19
  46. package/esm/simple/room/Room.js +77 -19
  47. package/esm/simple/room/SipRoom.js +77 -19
  48. package/esm/simple/room/Stream.js +77 -19
  49. package/esm/simple/room/__tests__/RemoteParticipant.test.js +77 -19
  50. package/esm/simple/utils.js +77 -19
  51. package/esm/utils/__tests__/api-requester.test.js +1 -1
  52. package/esm/utils/api-requester.js +1 -1
  53. package/esm/web-rtc-client.js +69 -19
  54. package/esm/websocket-client.js +1 -1
  55. package/lib/__tests__/api-client.test.js +9 -5
  56. package/lib/__tests__/web-rtc-client.test.js +69 -19
  57. package/lib/api/agentd.js +1 -1
  58. package/lib/api/amid.js +1 -1
  59. package/lib/api/application.js +1 -1
  60. package/lib/api/auth.js +1 -1
  61. package/lib/api/call-logd.js +3 -3
  62. package/lib/api/calld.js +1 -1
  63. package/lib/api/chatd.js +1 -1
  64. package/lib/api/confd.js +7 -3
  65. package/lib/api/ctid-ng.js +1 -1
  66. package/lib/api/dird.js +1 -1
  67. package/lib/api/webhookd.js +1 -1
  68. package/lib/api-client.js +9 -5
  69. package/lib/checker/Checker.js +69 -19
  70. package/lib/checker/checks/aor.js +9 -5
  71. package/lib/checker/checks/api.js +9 -5
  72. package/lib/checker/checks/index.js +69 -19
  73. package/lib/checker/checks/wazo-websocket.js +1 -1
  74. package/lib/checker/checks/webrtc-transport.js +69 -19
  75. package/lib/checker/checks/webrtc.js +69 -19
  76. package/lib/domain/AdHocAPIConference.js +9 -5
  77. package/lib/domain/CallLog.js +2 -2
  78. package/lib/domain/Features.js +9 -5
  79. package/lib/domain/Meeting.js +6 -2
  80. package/lib/domain/Phone/CTIPhone.js +9 -5
  81. package/lib/domain/Phone/WebRTCPhone.js +9 -1
  82. package/lib/domain/Recording.js +1 -1
  83. package/lib/domain/__tests__/CallLog.test.js +2 -2
  84. package/lib/index.js +77 -19
  85. package/lib/lib/WazoSessionDescriptionHandler.js +1 -1
  86. package/lib/service/CallApi.js +9 -5
  87. package/lib/service/IssueReporter.js +1 -1
  88. package/lib/service/__tests__/IssueReporter.test.js +1 -1
  89. package/lib/service/getApiClient.js +9 -5
  90. package/lib/simple/Auth.js +77 -19
  91. package/lib/simple/Configuration.js +77 -19
  92. package/lib/simple/Directory.js +9 -5
  93. package/lib/simple/Phone.js +77 -19
  94. package/lib/simple/Websocket.js +1 -1
  95. package/lib/simple/index.js +77 -19
  96. package/lib/simple/room/LocalParticipant.js +77 -19
  97. package/lib/simple/room/Participant.js +77 -19
  98. package/lib/simple/room/RemoteParticipant.js +77 -19
  99. package/lib/simple/room/Room.js +77 -19
  100. package/lib/simple/room/SipRoom.js +77 -19
  101. package/lib/simple/room/Stream.js +77 -19
  102. package/lib/simple/room/__tests__/RemoteParticipant.test.js +77 -19
  103. package/lib/simple/utils.js +77 -19
  104. package/lib/utils/__tests__/api-requester.test.js +1 -1
  105. package/lib/utils/api-requester.js +1 -1
  106. package/lib/web-rtc-client.js +69 -19
  107. package/lib/websocket-client.js +1 -1
  108. package/package.json +2 -2
  109. package/src/domain/CallLog.js +1 -1
  110. package/src/domain/Meeting.js +6 -2
  111. package/src/domain/Phone/WebRTCPhone.js +7 -0
  112. package/src/domain/Recording.js +1 -1
  113. package/src/service/IssueReporter.js +1 -1
  114. package/src/web-rtc-client.js +60 -14
package/lib/index.js CHANGED
@@ -413,7 +413,7 @@ class IssueReporter {
413
413
  payload._retry = retry + 1;
414
414
  }
415
415
 
416
- this._sendDebugToGrafana(body, retry + 1);
416
+ this._sendDebugToGrafana(payload, retry + 1);
417
417
  }, 5000 + retry * 1000);
418
418
  });
419
419
  }
@@ -2616,7 +2616,8 @@ class ExternalApp {
2616
2616
 
2617
2617
 
2618
2618
 
2619
-
2619
+
2620
+
2620
2621
 
2621
2622
 
2622
2623
  class Meeting {
@@ -2628,6 +2629,7 @@ class Meeting {
2628
2629
 
2629
2630
 
2630
2631
 
2632
+
2631
2633
 
2632
2634
 
2633
2635
  static parse(plain ) {
@@ -2639,6 +2641,7 @@ class Meeting {
2639
2641
  port: plain.port,
2640
2642
  uuid: plain.uuid,
2641
2643
  number: plain.number,
2644
+ persistent: plain.persistent,
2642
2645
  });
2643
2646
  }
2644
2647
 
@@ -2646,7 +2649,7 @@ class Meeting {
2646
2649
  return newFrom(meeting, Meeting);
2647
2650
  }
2648
2651
 
2649
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2652
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2650
2653
  this.guestSipAuthorization = guestSipAuthorization;
2651
2654
  this.uri = uri;
2652
2655
  this.name = name;
@@ -2654,6 +2657,7 @@ class Meeting {
2654
2657
  this.port = port;
2655
2658
  this.uuid = uuid;
2656
2659
  this.number = number;
2660
+ this.persistent = persistent;
2657
2661
 
2658
2662
  // Useful to compare instead of instanceof with minified code
2659
2663
  this.type = 'Meeting';
@@ -3588,7 +3592,7 @@ class Recording {
3588
3592
 
3589
3593
 
3590
3594
 
3591
- static parseMany(recordings ) {
3595
+ static parseMany(recordings = []) {
3592
3596
  return recordings.map(item => Recording.parse(item));
3593
3597
  }
3594
3598
 
@@ -3714,7 +3718,7 @@ class CallLog {
3714
3718
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3715
3719
  start: moment__default['default'](plain.start).toDate(),
3716
3720
  end: plain.end ? moment__default['default'](plain.end).toDate() : null,
3717
- recordings: Recording.parseMany(plain.recordings),
3721
+ recordings: Recording.parseMany(plain.recordings || []),
3718
3722
  });
3719
3723
  }
3720
3724
 
@@ -6120,6 +6124,7 @@ const ON_REINVITE$1 = 'reinvite';
6120
6124
  const ON_ERROR = 'onError';
6121
6125
  const ON_SCREEN_SHARING_REINVITE = 'onScreenSharingReinvite';
6122
6126
  const ON_NETWORK_STATS$1 = 'onNetworkStats';
6127
+ const ON_DISCONNECTED$1 = 'onDisconnected';
6123
6128
 
6124
6129
  const events$1 = [REGISTERED, UNREGISTERED, REGISTRATION_FAILED, INVITE];
6125
6130
  const transportEvents = [CONNECTED, DISCONNECTED, TRANSPORT_ERROR, MESSAGE];
@@ -6196,6 +6201,7 @@ class WebRTCClient extends Emitter {
6196
6201
 
6197
6202
 
6198
6203
 
6204
+
6199
6205
 
6200
6206
  static isAPrivateIp(ip ) {
6201
6207
  const regex = /^(?:10|127|172\.(?:1[6-9]|2[0-9]|3[01])|192\.168)\..*/;
@@ -6261,6 +6267,7 @@ class WebRTCClient extends Emitter {
6261
6267
  this.ON_ERROR = ON_ERROR;
6262
6268
  this.ON_SCREEN_SHARING_REINVITE = ON_SCREEN_SHARING_REINVITE;
6263
6269
  this.ON_NETWORK_STATS = ON_NETWORK_STATS$1;
6270
+ this.ON_DISCONNECTED = ON_DISCONNECTED$1;
6264
6271
  }
6265
6272
 
6266
6273
  configureMedia(media ) {
@@ -6862,7 +6869,7 @@ class WebRTCClient extends Emitter {
6862
6869
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6863
6870
  const transceivers = pc.getTransceivers();
6864
6871
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6865
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6872
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6866
6873
 
6867
6874
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6868
6875
  } else {
@@ -7108,10 +7115,13 @@ class WebRTCClient extends Emitter {
7108
7115
  return null;
7109
7116
  }
7110
7117
 
7111
- // let's update the local value
7112
- if (this.audio && this.audio.deviceId) {
7113
- // $FlowFixMe
7114
- this.audio.deviceId.exact = id;
7118
+ // let's update the local audio value
7119
+ if (this.audio) {
7120
+ this.audio = {
7121
+ deviceId: {
7122
+ exact: id,
7123
+ },
7124
+ };
7115
7125
  }
7116
7126
 
7117
7127
  if (session) {
@@ -7124,6 +7134,9 @@ class WebRTCClient extends Emitter {
7124
7134
  const sender = pc && pc.getSenders().find(s => audioTrack && s && s.track && s.track.kind === audioTrack.kind);
7125
7135
 
7126
7136
  if (sender) {
7137
+ if (sender.track) {
7138
+ audioTrack.enabled = sender.track.enabled;
7139
+ }
7127
7140
  sender.replaceTrack(audioTrack);
7128
7141
  }
7129
7142
 
@@ -7148,7 +7161,7 @@ class WebRTCClient extends Emitter {
7148
7161
  return null;
7149
7162
  }
7150
7163
 
7151
- // let's update the local value
7164
+ // let's update the local video value
7152
7165
  if (this.video) {
7153
7166
  this.video = {
7154
7167
  deviceId: {
@@ -7183,12 +7196,21 @@ class WebRTCClient extends Emitter {
7183
7196
  return navigator.mediaDevices.getUserMedia(constraints).then(async stream => {
7184
7197
  const videoTrack = stream.getVideoTracks()[0];
7185
7198
  let sender = pc && pc.getSenders().find(s => videoTrack && s && s.track && s.track.kind === videoTrack.kind);
7199
+ let wasTrackEnabled = false;
7186
7200
  if (!sender) {
7187
7201
  sender = pc && pc.getSenders().find(s => !s.track);
7188
7202
  }
7189
7203
 
7190
7204
  if (sender) {
7191
- sender.replaceTrack(videoTrack);
7205
+ // No video track means video not enabled
7206
+ wasTrackEnabled = sender.track ? sender.track.enabled : false;
7207
+ videoTrack.enabled = wasTrackEnabled;
7208
+
7209
+ if (!wasTrackEnabled) {
7210
+ videoTrack.stop();
7211
+ }
7212
+
7213
+ sender.replaceTrack(wasTrackEnabled ? videoTrack : null);
7192
7214
  }
7193
7215
 
7194
7216
  // let's update the local stream
@@ -7872,6 +7894,7 @@ class WebRTCClient extends Emitter {
7872
7894
 
7873
7895
  this.updateRemoteStream(this.getSipSessionId(session));
7874
7896
 
7897
+ const pc = session.sessionDescriptionHandler.peerConnection;
7875
7898
  const onTrack = (event ) => {
7876
7899
  const isAudioOnly = this._isAudioOnly(session);
7877
7900
  const { kind, label, readyState, id, muted } = event.track;
@@ -7891,6 +7914,12 @@ class WebRTCClient extends Emitter {
7891
7914
 
7892
7915
  session.sessionDescriptionHandler.remoteMediaStream.onaddtrack = onTrack;
7893
7916
 
7917
+ pc.oniceconnectionstatechange = () => {
7918
+ if (pc.iceConnectionState === 'disconnected') {
7919
+ this.eventEmitter.emit(ON_DISCONNECTED$1);
7920
+ }
7921
+ };
7922
+
7894
7923
  if (withEvent) {
7895
7924
  this.eventEmitter.emit(ACCEPTED, session, sessionDialog);
7896
7925
  }
@@ -8102,25 +8131,33 @@ class WebRTCClient extends Emitter {
8102
8131
  const lastVideoSent = lastNetworkStats ? lastNetworkStats.videoBytesSent : 0;
8103
8132
  const lastAudioReceived = lastNetworkStats ? lastNetworkStats.audioBytesReceived : 0;
8104
8133
  const lastVideoReceived = lastNetworkStats ? lastNetworkStats.videoBytesReceived : 0;
8134
+ const lastTransportSent = lastNetworkStats ? lastNetworkStats.transportSent : 0;
8135
+ const lastTransportReceived = lastNetworkStats ? lastNetworkStats.transportReceived : 0;
8105
8136
  let audioBytesSent = 0;
8106
8137
  let audioBytesReceived = 0;
8107
8138
  let videoBytesSent = 0;
8108
8139
  let videoBytesReceived = 0;
8140
+ let transportSent = 0;
8141
+ let transportReceived = 0;
8142
+ let packetsLost = 0;
8109
8143
 
8110
8144
  stats.forEach(report => {
8111
8145
  if (report.type === 'outbound-rtp' && report.kind === 'audio') {
8146
+ audioBytesSent += report.bytesSent + report.headerBytesSent;
8147
+ }
8148
+ if (report.type === 'remote-outbound-rtp' && report.kind === 'audio') {
8112
8149
  audioBytesSent += report.bytesSent;
8113
8150
  }
8114
8151
  if (report.type === 'outbound-rtp' && report.kind === 'video') {
8115
- videoBytesSent += report.bytesSent;
8152
+ videoBytesSent += report.bytesSent + report.headerBytesSent;
8116
8153
  }
8117
8154
  if (report.type === 'inbound-rtp' && report.kind === 'audio') {
8118
- networkStats.packetsLost = report.packetsLost;
8155
+ packetsLost += report.packetsLost;
8119
8156
  networkStats.packetsReceived = report.packetsReceived;
8120
- audioBytesReceived += report.bytesReceived;
8157
+ audioBytesReceived += report.bytesReceived + report.headerBytesReceived;
8121
8158
  }
8122
8159
  if (report.type === 'inbound-rtp' && report.kind === 'video') {
8123
- videoBytesReceived += report.bytesReceived;
8160
+ videoBytesReceived += report.bytesReceived + report.headerBytesReceived;
8124
8161
  }
8125
8162
  if (report.type === 'outbound-rtp' && report.kind === 'video') {
8126
8163
  if ('framesPerSecond' in report) {
@@ -8132,19 +8169,32 @@ class WebRTCClient extends Emitter {
8132
8169
  }
8133
8170
  }
8134
8171
  if (report.type === 'remote-inbound-rtp' && report.kind === 'audio') {
8172
+ packetsLost += report.packetsLost;
8135
8173
  networkStats.roundTripTime = report.roundTripTime;
8136
8174
  networkStats.jitter = report.jitter;
8137
8175
  }
8176
+ if (report.type === 'remote-inbound-rtp' && report.kind === 'video') {
8177
+ packetsLost += report.packetsLost;
8178
+ }
8179
+ if (report.type === 'transport') {
8180
+ transportSent += report.bytesSent;
8181
+ transportReceived += report.bytesReceived;
8182
+ }
8138
8183
  });
8139
8184
 
8185
+ networkStats.packetsLost = packetsLost;
8140
8186
  networkStats.audioBytesSent = audioBytesSent;
8141
8187
  networkStats.audioBytesReceived = audioBytesReceived;
8142
8188
  networkStats.videoBytesSent = videoBytesSent;
8143
8189
  networkStats.videoBytesReceived = videoBytesReceived;
8190
+ networkStats.transportSent = transportSent;
8191
+ networkStats.transportReceived = transportReceived;
8144
8192
 
8145
- networkStats.bandwidth = (networkStats.audioBytesSent - lastAudioSent)
8146
- + (networkStats.videoBytesSent - lastVideoSent) + (networkStats.audioBytesReceived - lastAudioReceived)
8147
- + (networkStats.videoBytesReceived - lastVideoReceived);
8193
+ const bandwidth = (networkStats.audioBytesSent - lastAudioSent) + (networkStats.videoBytesSent - lastVideoSent)
8194
+ + (networkStats.audioBytesReceived - lastAudioReceived) + (networkStats.videoBytesReceived - lastVideoReceived)
8195
+ + (networkStats.transportReceived - lastTransportReceived) + (networkStats.transportSent - lastTransportSent);
8196
+
8197
+ networkStats.bandwidth = bandwidth;
8148
8198
 
8149
8199
  this.eventEmitter.emit(ON_NETWORK_STATS$1, session, networkStats, this.sessionNetworkStats[sessionId]);
8150
8200
  this.sessionNetworkStats[sessionId].push(networkStats);
@@ -9083,6 +9133,7 @@ const ON_MESSAGE_TRACK_UPDATED = 'onTrackUpdated';
9083
9133
  const ON_NETWORK_STATS = 'onNetworkStats';
9084
9134
  const ON_CHAT = 'phone/ON_CHAT';
9085
9135
  const ON_SIGNAL = 'phone/ON_SIGNAL';
9136
+ const ON_DISCONNECTED = 'onDisconnected';
9086
9137
 
9087
9138
  const MESSAGE_TYPE_CHAT = 'message/TYPE_CHAT';
9088
9139
  const MESSAGE_TYPE_SIGNAL = 'message/TYPE_SIGNAL';
@@ -9122,6 +9173,7 @@ const events = [
9122
9173
  ON_CHAT,
9123
9174
  ON_SIGNAL,
9124
9175
  ON_NETWORK_STATS,
9176
+ ON_DISCONNECTED,
9125
9177
  ];
9126
9178
 
9127
9179
  const logger$7 = IssueReporter$1.loggerFor('webrtc-phone');
@@ -10474,6 +10526,11 @@ class WebRTCPhone extends Emitter {
10474
10526
  this.eventEmitter.emit(ON_UNREGISTERED);
10475
10527
  });
10476
10528
 
10529
+ this.client.on(this.client.ON_DISCONNECTED, () => {
10530
+ logger$7.info('WebRTC disconnected');
10531
+ this.eventEmitter.emit(ON_DISCONNECTED);
10532
+ });
10533
+
10477
10534
  this.client.on(this.client.REGISTERED, () => {
10478
10535
  logger$7.info('WebRTC registered', {
10479
10536
  shouldSendReinvite: this.shouldSendReinvite,
@@ -10730,6 +10787,7 @@ var PHONE_EVENTS = /*#__PURE__*/Object.freeze({
10730
10787
  ON_NETWORK_STATS: ON_NETWORK_STATS,
10731
10788
  ON_CHAT: ON_CHAT,
10732
10789
  ON_SIGNAL: ON_SIGNAL,
10790
+ ON_DISCONNECTED: ON_DISCONNECTED,
10733
10791
  MESSAGE_TYPE_CHAT: MESSAGE_TYPE_CHAT,
10734
10792
  MESSAGE_TYPE_SIGNAL: MESSAGE_TYPE_SIGNAL,
10735
10793
  events: events,
@@ -359,7 +359,7 @@ class IssueReporter {
359
359
  payload._retry = retry + 1;
360
360
  }
361
361
 
362
- this._sendDebugToGrafana(body, retry + 1);
362
+ this._sendDebugToGrafana(payload, retry + 1);
363
363
  }, 5000 + retry * 1000);
364
364
  });
365
365
  }
@@ -1711,7 +1711,7 @@ class Recording {
1711
1711
 
1712
1712
 
1713
1713
 
1714
- static parseMany(recordings ) {
1714
+ static parseMany(recordings = []) {
1715
1715
  return recordings.map(item => Recording.parse(item));
1716
1716
  }
1717
1717
 
@@ -1837,7 +1837,7 @@ class CallLog {
1837
1837
  duration: (plain.duration || 0) * 1000, // duration is in seconds
1838
1838
  start: moment__default['default'](plain.start).toDate(),
1839
1839
  end: plain.end ? moment__default['default'](plain.end).toDate() : null,
1840
- recordings: Recording.parseMany(plain.recordings),
1840
+ recordings: Recording.parseMany(plain.recordings || []),
1841
1841
  });
1842
1842
  }
1843
1843
 
@@ -2397,7 +2397,7 @@ class IssueReporter {
2397
2397
  payload._retry = retry + 1;
2398
2398
  }
2399
2399
 
2400
- this._sendDebugToGrafana(body, retry + 1);
2400
+ this._sendDebugToGrafana(payload, retry + 1);
2401
2401
  }, 5000 + retry * 1000);
2402
2402
  });
2403
2403
  }
@@ -3115,7 +3115,8 @@ class ExternalApp {
3115
3115
 
3116
3116
 
3117
3117
 
3118
-
3118
+
3119
+
3119
3120
 
3120
3121
 
3121
3122
  class Meeting {
@@ -3127,6 +3128,7 @@ class Meeting {
3127
3128
 
3128
3129
 
3129
3130
 
3131
+
3130
3132
 
3131
3133
 
3132
3134
  static parse(plain ) {
@@ -3138,6 +3140,7 @@ class Meeting {
3138
3140
  port: plain.port,
3139
3141
  uuid: plain.uuid,
3140
3142
  number: plain.number,
3143
+ persistent: plain.persistent,
3141
3144
  });
3142
3145
  }
3143
3146
 
@@ -3145,7 +3148,7 @@ class Meeting {
3145
3148
  return newFrom(meeting, Meeting);
3146
3149
  }
3147
3150
 
3148
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3151
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3149
3152
  this.guestSipAuthorization = guestSipAuthorization;
3150
3153
  this.uri = uri;
3151
3154
  this.name = name;
@@ -3153,6 +3156,7 @@ class Meeting {
3153
3156
  this.port = port;
3154
3157
  this.uuid = uuid;
3155
3158
  this.number = number;
3159
+ this.persistent = persistent;
3156
3160
 
3157
3161
  // Useful to compare instead of instanceof with minified code
3158
3162
  this.type = 'Meeting';
@@ -351,7 +351,7 @@ class IssueReporter {
351
351
  payload._retry = retry + 1;
352
352
  }
353
353
 
354
- this._sendDebugToGrafana(body, retry + 1);
354
+ this._sendDebugToGrafana(payload, retry + 1);
355
355
  }, 5000 + retry * 1000);
356
356
  });
357
357
  }
@@ -351,7 +351,7 @@ class IssueReporter {
351
351
  payload._retry = retry + 1;
352
352
  }
353
353
 
354
- this._sendDebugToGrafana(body, retry + 1);
354
+ this._sendDebugToGrafana(payload, retry + 1);
355
355
  }, 5000 + retry * 1000);
356
356
  });
357
357
  }
@@ -390,7 +390,7 @@ class IssueReporter {
390
390
  payload._retry = retry + 1;
391
391
  }
392
392
 
393
- this._sendDebugToGrafana(body, retry + 1);
393
+ this._sendDebugToGrafana(payload, retry + 1);
394
394
  }, 5000 + retry * 1000);
395
395
  });
396
396
  }
@@ -2593,7 +2593,8 @@ class ExternalApp {
2593
2593
 
2594
2594
 
2595
2595
 
2596
-
2596
+
2597
+
2597
2598
 
2598
2599
 
2599
2600
  class Meeting {
@@ -2605,6 +2606,7 @@ class Meeting {
2605
2606
 
2606
2607
 
2607
2608
 
2609
+
2608
2610
 
2609
2611
 
2610
2612
  static parse(plain ) {
@@ -2616,6 +2618,7 @@ class Meeting {
2616
2618
  port: plain.port,
2617
2619
  uuid: plain.uuid,
2618
2620
  number: plain.number,
2621
+ persistent: plain.persistent,
2619
2622
  });
2620
2623
  }
2621
2624
 
@@ -2623,7 +2626,7 @@ class Meeting {
2623
2626
  return newFrom(meeting, Meeting);
2624
2627
  }
2625
2628
 
2626
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2629
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2627
2630
  this.guestSipAuthorization = guestSipAuthorization;
2628
2631
  this.uri = uri;
2629
2632
  this.name = name;
@@ -2631,6 +2634,7 @@ class Meeting {
2631
2634
  this.port = port;
2632
2635
  this.uuid = uuid;
2633
2636
  this.number = number;
2637
+ this.persistent = persistent;
2634
2638
 
2635
2639
  // Useful to compare instead of instanceof with minified code
2636
2640
  this.type = 'Meeting';
@@ -3194,7 +3198,7 @@ class Recording {
3194
3198
 
3195
3199
 
3196
3200
 
3197
- static parseMany(recordings ) {
3201
+ static parseMany(recordings = []) {
3198
3202
  return recordings.map(item => Recording.parse(item));
3199
3203
  }
3200
3204
 
@@ -3320,7 +3324,7 @@ class CallLog {
3320
3324
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3321
3325
  start: moment__default['default'](plain.start).toDate(),
3322
3326
  end: plain.end ? moment__default['default'](plain.end).toDate() : null,
3323
- recordings: Recording.parseMany(plain.recordings),
3327
+ recordings: Recording.parseMany(plain.recordings || []),
3324
3328
  });
3325
3329
  }
3326
3330