@wazo/sdk 0.37.28 → 0.37.29

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 (43) hide show
  1. package/dist/wazo-sdk.js +2 -2
  2. package/esm/domain/CallSession.js +15 -3
  3. package/esm/domain/Phone/CTIPhone.js +15 -3
  4. package/esm/domain/Phone/WebRTCPhone.js +17 -3
  5. package/esm/domain/__tests__/CallSession.test.js +32 -3
  6. package/esm/domain/__tests__/IndirectTransfer.test.js +15 -3
  7. package/esm/domain/__tests__/Room.test.js +15 -3
  8. package/esm/index.js +17 -3
  9. package/esm/simple/Auth.js +17 -3
  10. package/esm/simple/Configuration.js +17 -3
  11. package/esm/simple/Phone.js +17 -3
  12. package/esm/simple/index.js +17 -3
  13. package/esm/simple/room/LocalParticipant.js +17 -3
  14. package/esm/simple/room/Participant.js +17 -3
  15. package/esm/simple/room/RemoteParticipant.js +17 -3
  16. package/esm/simple/room/Room.js +17 -3
  17. package/esm/simple/room/SipRoom.js +17 -3
  18. package/esm/simple/room/Stream.js +17 -3
  19. package/esm/simple/room/__tests__/RemoteParticipant.test.js +17 -3
  20. package/esm/simple/utils.js +17 -3
  21. package/lib/domain/CallSession.js +15 -3
  22. package/lib/domain/Phone/CTIPhone.js +15 -3
  23. package/lib/domain/Phone/WebRTCPhone.js +17 -3
  24. package/lib/domain/__tests__/CallSession.test.js +32 -3
  25. package/lib/domain/__tests__/IndirectTransfer.test.js +15 -3
  26. package/lib/domain/__tests__/Room.test.js +15 -3
  27. package/lib/index.js +17 -3
  28. package/lib/simple/Auth.js +17 -3
  29. package/lib/simple/Configuration.js +17 -3
  30. package/lib/simple/Phone.js +17 -3
  31. package/lib/simple/index.js +17 -3
  32. package/lib/simple/room/LocalParticipant.js +17 -3
  33. package/lib/simple/room/Participant.js +17 -3
  34. package/lib/simple/room/RemoteParticipant.js +17 -3
  35. package/lib/simple/room/Room.js +17 -3
  36. package/lib/simple/room/SipRoom.js +17 -3
  37. package/lib/simple/room/Stream.js +17 -3
  38. package/lib/simple/room/__tests__/RemoteParticipant.test.js +17 -3
  39. package/lib/simple/utils.js +17 -3
  40. package/package.json +1 -1
  41. package/src/domain/CallSession.js +16 -4
  42. package/src/domain/Phone/WebRTCPhone.js +2 -0
  43. package/src/domain/__tests__/CallSession.test.js +17 -0
@@ -3248,6 +3248,7 @@ var updateFrom = (instance , from ) => {
3248
3248
 
3249
3249
 
3250
3250
 
3251
+
3251
3252
 
3252
3253
 
3253
3254
 
@@ -3295,14 +3296,14 @@ class CallSession {
3295
3296
 
3296
3297
 
3297
3298
 
3299
+ // = creationTime
3300
+
3298
3301
 
3299
3302
 
3300
3303
 
3301
3304
 
3302
3305
 
3303
3306
 
3304
-
3305
-
3306
3307
 
3307
3308
 
3308
3309
 
@@ -3366,6 +3367,7 @@ class CallSession {
3366
3367
  recordingPaused,
3367
3368
  videoRemotelyDowngraded,
3368
3369
  sipSession,
3370
+ answerTime,
3369
3371
  } ) {
3370
3372
  this.callId = callId;
3371
3373
  this.sipCallId = sipCallId;
@@ -3393,6 +3395,7 @@ class CallSession {
3393
3395
  this.recordingPaused = recordingPaused || false;
3394
3396
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3395
3397
  this.sipSession = sipSession;
3398
+ this.answerTime = answerTime || this.answerTime;
3396
3399
 
3397
3400
  // Useful to compare instead of instanceof with minified code
3398
3401
  this.type = 'CallSession';
@@ -3423,7 +3426,7 @@ class CallSession {
3423
3426
  }
3424
3427
 
3425
3428
  answer() {
3426
- this.answered = true;
3429
+ this.answerTime = new Date();
3427
3430
  }
3428
3431
 
3429
3432
  systemAnswer() {
@@ -3579,6 +3582,15 @@ class CallSession {
3579
3582
  return newFrom(callSession, CallSession);
3580
3583
  }
3581
3584
 
3585
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
3586
+ set answered(value ) {
3587
+ this.answerTime = value ? new Date() : null;
3588
+ }
3589
+
3590
+ get answered() {
3591
+ return !!this.answerTime;
3592
+ }
3593
+
3582
3594
  static parseCall(call ) {
3583
3595
  return new CallSession({
3584
3596
  callId: call.id,
@@ -9336,6 +9348,7 @@ class WebRTCPhone extends Emitter {
9336
9348
  this.removeIncomingSessions(sipSessionId);
9337
9349
  }
9338
9350
 
9351
+ callSession.answerTime = new Date();
9339
9352
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9340
9353
 
9341
9354
  return callSession;
@@ -9551,6 +9564,7 @@ class WebRTCPhone extends Emitter {
9551
9564
  }
9552
9565
 
9553
9566
  this.shouldSendReinvite = false;
9567
+ callSession.answerTime = new Date();
9554
9568
  this.acceptedSessions[callSession.getId()] = true;
9555
9569
 
9556
9570
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);
@@ -3248,6 +3248,7 @@ var updateFrom = (instance , from ) => {
3248
3248
 
3249
3249
 
3250
3250
 
3251
+
3251
3252
 
3252
3253
 
3253
3254
 
@@ -3295,14 +3296,14 @@ class CallSession {
3295
3296
 
3296
3297
 
3297
3298
 
3299
+ // = creationTime
3300
+
3298
3301
 
3299
3302
 
3300
3303
 
3301
3304
 
3302
3305
 
3303
3306
 
3304
-
3305
-
3306
3307
 
3307
3308
 
3308
3309
 
@@ -3366,6 +3367,7 @@ class CallSession {
3366
3367
  recordingPaused,
3367
3368
  videoRemotelyDowngraded,
3368
3369
  sipSession,
3370
+ answerTime,
3369
3371
  } ) {
3370
3372
  this.callId = callId;
3371
3373
  this.sipCallId = sipCallId;
@@ -3393,6 +3395,7 @@ class CallSession {
3393
3395
  this.recordingPaused = recordingPaused || false;
3394
3396
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3395
3397
  this.sipSession = sipSession;
3398
+ this.answerTime = answerTime || this.answerTime;
3396
3399
 
3397
3400
  // Useful to compare instead of instanceof with minified code
3398
3401
  this.type = 'CallSession';
@@ -3423,7 +3426,7 @@ class CallSession {
3423
3426
  }
3424
3427
 
3425
3428
  answer() {
3426
- this.answered = true;
3429
+ this.answerTime = new Date();
3427
3430
  }
3428
3431
 
3429
3432
  systemAnswer() {
@@ -3579,6 +3582,15 @@ class CallSession {
3579
3582
  return newFrom(callSession, CallSession);
3580
3583
  }
3581
3584
 
3585
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
3586
+ set answered(value ) {
3587
+ this.answerTime = value ? new Date() : null;
3588
+ }
3589
+
3590
+ get answered() {
3591
+ return !!this.answerTime;
3592
+ }
3593
+
3582
3594
  static parseCall(call ) {
3583
3595
  return new CallSession({
3584
3596
  callId: call.id,
@@ -9336,6 +9348,7 @@ class WebRTCPhone extends Emitter {
9336
9348
  this.removeIncomingSessions(sipSessionId);
9337
9349
  }
9338
9350
 
9351
+ callSession.answerTime = new Date();
9339
9352
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9340
9353
 
9341
9354
  return callSession;
@@ -9551,6 +9564,7 @@ class WebRTCPhone extends Emitter {
9551
9564
  }
9552
9565
 
9553
9566
  this.shouldSendReinvite = false;
9567
+ callSession.answerTime = new Date();
9554
9568
  this.acceptedSessions[callSession.getId()] = true;
9555
9569
 
9556
9570
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);
@@ -34,6 +34,7 @@ var updateFrom = (instance , from ) => {
34
34
 
35
35
 
36
36
 
37
+
37
38
 
38
39
 
39
40
 
@@ -81,14 +82,14 @@ class CallSession {
81
82
 
82
83
 
83
84
 
85
+ // = creationTime
86
+
84
87
 
85
88
 
86
89
 
87
90
 
88
91
 
89
92
 
90
-
91
-
92
93
 
93
94
 
94
95
 
@@ -152,6 +153,7 @@ class CallSession {
152
153
  recordingPaused,
153
154
  videoRemotelyDowngraded,
154
155
  sipSession,
156
+ answerTime,
155
157
  } ) {
156
158
  this.callId = callId;
157
159
  this.sipCallId = sipCallId;
@@ -179,6 +181,7 @@ class CallSession {
179
181
  this.recordingPaused = recordingPaused || false;
180
182
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
183
  this.sipSession = sipSession;
184
+ this.answerTime = answerTime || this.answerTime;
182
185
 
183
186
  // Useful to compare instead of instanceof with minified code
184
187
  this.type = 'CallSession';
@@ -209,7 +212,7 @@ class CallSession {
209
212
  }
210
213
 
211
214
  answer() {
212
- this.answered = true;
215
+ this.answerTime = new Date();
213
216
  }
214
217
 
215
218
  systemAnswer() {
@@ -365,6 +368,15 @@ class CallSession {
365
368
  return newFrom(callSession, CallSession);
366
369
  }
367
370
 
371
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
372
+ set answered(value ) {
373
+ this.answerTime = value ? new Date() : null;
374
+ }
375
+
376
+ get answered() {
377
+ return !!this.answerTime;
378
+ }
379
+
368
380
  static parseCall(call ) {
369
381
  return new CallSession({
370
382
  callId: call.id,
@@ -1715,6 +1715,7 @@ var updateFrom = (instance , from ) => {
1715
1715
 
1716
1716
 
1717
1717
 
1718
+
1718
1719
 
1719
1720
 
1720
1721
 
@@ -1762,14 +1763,14 @@ class CallSession {
1762
1763
 
1763
1764
 
1764
1765
 
1766
+ // = creationTime
1767
+
1765
1768
 
1766
1769
 
1767
1770
 
1768
1771
 
1769
1772
 
1770
1773
 
1771
-
1772
-
1773
1774
 
1774
1775
 
1775
1776
 
@@ -1833,6 +1834,7 @@ class CallSession {
1833
1834
  recordingPaused,
1834
1835
  videoRemotelyDowngraded,
1835
1836
  sipSession,
1837
+ answerTime,
1836
1838
  } ) {
1837
1839
  this.callId = callId;
1838
1840
  this.sipCallId = sipCallId;
@@ -1860,6 +1862,7 @@ class CallSession {
1860
1862
  this.recordingPaused = recordingPaused || false;
1861
1863
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
1862
1864
  this.sipSession = sipSession;
1865
+ this.answerTime = answerTime || this.answerTime;
1863
1866
 
1864
1867
  // Useful to compare instead of instanceof with minified code
1865
1868
  this.type = 'CallSession';
@@ -1890,7 +1893,7 @@ class CallSession {
1890
1893
  }
1891
1894
 
1892
1895
  answer() {
1893
- this.answered = true;
1896
+ this.answerTime = new Date();
1894
1897
  }
1895
1898
 
1896
1899
  systemAnswer() {
@@ -2046,6 +2049,15 @@ class CallSession {
2046
2049
  return newFrom(callSession, CallSession);
2047
2050
  }
2048
2051
 
2052
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
2053
+ set answered(value ) {
2054
+ this.answerTime = value ? new Date() : null;
2055
+ }
2056
+
2057
+ get answered() {
2058
+ return !!this.answerTime;
2059
+ }
2060
+
2049
2061
  static parseCall(call ) {
2050
2062
  return new CallSession({
2051
2063
  callId: call.id,
@@ -63,6 +63,7 @@ var updateFrom = (instance , from ) => {
63
63
 
64
64
 
65
65
 
66
+
66
67
 
67
68
 
68
69
 
@@ -110,14 +111,14 @@ class CallSession {
110
111
 
111
112
 
112
113
 
114
+ // = creationTime
115
+
113
116
 
114
117
 
115
118
 
116
119
 
117
120
 
118
121
 
119
-
120
-
121
122
 
122
123
 
123
124
 
@@ -181,6 +182,7 @@ class CallSession {
181
182
  recordingPaused,
182
183
  videoRemotelyDowngraded,
183
184
  sipSession,
185
+ answerTime,
184
186
  } ) {
185
187
  this.callId = callId;
186
188
  this.sipCallId = sipCallId;
@@ -208,6 +210,7 @@ class CallSession {
208
210
  this.recordingPaused = recordingPaused || false;
209
211
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
210
212
  this.sipSession = sipSession;
213
+ this.answerTime = answerTime || this.answerTime;
211
214
 
212
215
  // Useful to compare instead of instanceof with minified code
213
216
  this.type = 'CallSession';
@@ -238,7 +241,7 @@ class CallSession {
238
241
  }
239
242
 
240
243
  answer() {
241
- this.answered = true;
244
+ this.answerTime = new Date();
242
245
  }
243
246
 
244
247
  systemAnswer() {
@@ -394,6 +397,15 @@ class CallSession {
394
397
  return newFrom(callSession, CallSession);
395
398
  }
396
399
 
400
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
401
+ set answered(value ) {
402
+ this.answerTime = value ? new Date() : null;
403
+ }
404
+
405
+ get answered() {
406
+ return !!this.answerTime;
407
+ }
408
+
397
409
  static parseCall(call ) {
398
410
  return new CallSession({
399
411
  callId: call.id,
@@ -1500,6 +1512,7 @@ class WebRTCPhone extends Emitter {
1500
1512
  this.removeIncomingSessions(sipSessionId);
1501
1513
  }
1502
1514
 
1515
+ callSession.answerTime = new Date();
1503
1516
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
1504
1517
 
1505
1518
  return callSession;
@@ -1715,6 +1728,7 @@ class WebRTCPhone extends Emitter {
1715
1728
  }
1716
1729
 
1717
1730
  this.shouldSendReinvite = false;
1731
+ callSession.answerTime = new Date();
1718
1732
  this.acceptedSessions[callSession.getId()] = true;
1719
1733
 
1720
1734
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);
@@ -34,6 +34,7 @@ var updateFrom = (instance , from ) => {
34
34
 
35
35
 
36
36
 
37
+
37
38
 
38
39
 
39
40
 
@@ -81,14 +82,14 @@ class CallSession {
81
82
 
82
83
 
83
84
 
85
+ // = creationTime
86
+
84
87
 
85
88
 
86
89
 
87
90
 
88
91
 
89
92
 
90
-
91
-
92
93
 
93
94
 
94
95
 
@@ -152,6 +153,7 @@ class CallSession {
152
153
  recordingPaused,
153
154
  videoRemotelyDowngraded,
154
155
  sipSession,
156
+ answerTime,
155
157
  } ) {
156
158
  this.callId = callId;
157
159
  this.sipCallId = sipCallId;
@@ -179,6 +181,7 @@ class CallSession {
179
181
  this.recordingPaused = recordingPaused || false;
180
182
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
183
  this.sipSession = sipSession;
184
+ this.answerTime = answerTime || this.answerTime;
182
185
 
183
186
  // Useful to compare instead of instanceof with minified code
184
187
  this.type = 'CallSession';
@@ -209,7 +212,7 @@ class CallSession {
209
212
  }
210
213
 
211
214
  answer() {
212
- this.answered = true;
215
+ this.answerTime = new Date();
213
216
  }
214
217
 
215
218
  systemAnswer() {
@@ -365,6 +368,15 @@ class CallSession {
365
368
  return newFrom(callSession, CallSession);
366
369
  }
367
370
 
371
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
372
+ set answered(value ) {
373
+ this.answerTime = value ? new Date() : null;
374
+ }
375
+
376
+ get answered() {
377
+ return !!this.answerTime;
378
+ }
379
+
368
380
  static parseCall(call ) {
369
381
  return new CallSession({
370
382
  callId: call.id,
@@ -427,4 +439,21 @@ describe('CallSession domain', () => {
427
439
  expect(cs1.is(cs2)).toBeTruthy();
428
440
  expect(cs2.is(cs1)).toBeTruthy();
429
441
  });
442
+
443
+ it('should set answerTime when setting answered', () => {
444
+ const cs1 = new CallSession({});
445
+ cs1.answered = true;
446
+
447
+ const cs2 = new CallSession({});
448
+ cs2.answer();
449
+
450
+ const cs3 = new CallSession({ answered: true });
451
+
452
+ expect(cs1.answered).toBeTruthy();
453
+ expect(cs1.answerTime).not.toBeNull();
454
+ expect(cs2.answered).toBeTruthy();
455
+ expect(cs2.answerTime).not.toBeNull();
456
+ expect(cs3.answered).toBeTruthy();
457
+ expect(cs3.answerTime).not.toBeNull();
458
+ });
430
459
  });
@@ -34,6 +34,7 @@ var updateFrom = (instance , from ) => {
34
34
 
35
35
 
36
36
 
37
+
37
38
 
38
39
 
39
40
 
@@ -81,14 +82,14 @@ class CallSession {
81
82
 
82
83
 
83
84
 
85
+ // = creationTime
86
+
84
87
 
85
88
 
86
89
 
87
90
 
88
91
 
89
92
 
90
-
91
-
92
93
 
93
94
 
94
95
 
@@ -152,6 +153,7 @@ class CallSession {
152
153
  recordingPaused,
153
154
  videoRemotelyDowngraded,
154
155
  sipSession,
156
+ answerTime,
155
157
  } ) {
156
158
  this.callId = callId;
157
159
  this.sipCallId = sipCallId;
@@ -179,6 +181,7 @@ class CallSession {
179
181
  this.recordingPaused = recordingPaused || false;
180
182
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
183
  this.sipSession = sipSession;
184
+ this.answerTime = answerTime || this.answerTime;
182
185
 
183
186
  // Useful to compare instead of instanceof with minified code
184
187
  this.type = 'CallSession';
@@ -209,7 +212,7 @@ class CallSession {
209
212
  }
210
213
 
211
214
  answer() {
212
- this.answered = true;
215
+ this.answerTime = new Date();
213
216
  }
214
217
 
215
218
  systemAnswer() {
@@ -365,6 +368,15 @@ class CallSession {
365
368
  return newFrom(callSession, CallSession);
366
369
  }
367
370
 
371
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
372
+ set answered(value ) {
373
+ this.answerTime = value ? new Date() : null;
374
+ }
375
+
376
+ get answered() {
377
+ return !!this.answerTime;
378
+ }
379
+
368
380
  static parseCall(call ) {
369
381
  return new CallSession({
370
382
  callId: call.id,
@@ -34,6 +34,7 @@ var updateFrom = (instance , from ) => {
34
34
 
35
35
 
36
36
 
37
+
37
38
 
38
39
 
39
40
 
@@ -81,14 +82,14 @@ class CallSession {
81
82
 
82
83
 
83
84
 
85
+ // = creationTime
86
+
84
87
 
85
88
 
86
89
 
87
90
 
88
91
 
89
92
 
90
-
91
-
92
93
 
93
94
 
94
95
 
@@ -152,6 +153,7 @@ class CallSession {
152
153
  recordingPaused,
153
154
  videoRemotelyDowngraded,
154
155
  sipSession,
156
+ answerTime,
155
157
  } ) {
156
158
  this.callId = callId;
157
159
  this.sipCallId = sipCallId;
@@ -179,6 +181,7 @@ class CallSession {
179
181
  this.recordingPaused = recordingPaused || false;
180
182
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
183
  this.sipSession = sipSession;
184
+ this.answerTime = answerTime || this.answerTime;
182
185
 
183
186
  // Useful to compare instead of instanceof with minified code
184
187
  this.type = 'CallSession';
@@ -209,7 +212,7 @@ class CallSession {
209
212
  }
210
213
 
211
214
  answer() {
212
- this.answered = true;
215
+ this.answerTime = new Date();
213
216
  }
214
217
 
215
218
  systemAnswer() {
@@ -365,6 +368,15 @@ class CallSession {
365
368
  return newFrom(callSession, CallSession);
366
369
  }
367
370
 
371
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
372
+ set answered(value ) {
373
+ this.answerTime = value ? new Date() : null;
374
+ }
375
+
376
+ get answered() {
377
+ return !!this.answerTime;
378
+ }
379
+
368
380
  static parseCall(call ) {
369
381
  return new CallSession({
370
382
  callId: call.id,
package/lib/index.js CHANGED
@@ -3260,6 +3260,7 @@ var updateFrom = (instance , from ) => {
3260
3260
 
3261
3261
 
3262
3262
 
3263
+
3263
3264
 
3264
3265
 
3265
3266
 
@@ -3307,14 +3308,14 @@ class CallSession {
3307
3308
 
3308
3309
 
3309
3310
 
3311
+ // = creationTime
3312
+
3310
3313
 
3311
3314
 
3312
3315
 
3313
3316
 
3314
3317
 
3315
3318
 
3316
-
3317
-
3318
3319
 
3319
3320
 
3320
3321
 
@@ -3378,6 +3379,7 @@ class CallSession {
3378
3379
  recordingPaused,
3379
3380
  videoRemotelyDowngraded,
3380
3381
  sipSession,
3382
+ answerTime,
3381
3383
  } ) {
3382
3384
  this.callId = callId;
3383
3385
  this.sipCallId = sipCallId;
@@ -3405,6 +3407,7 @@ class CallSession {
3405
3407
  this.recordingPaused = recordingPaused || false;
3406
3408
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3407
3409
  this.sipSession = sipSession;
3410
+ this.answerTime = answerTime || this.answerTime;
3408
3411
 
3409
3412
  // Useful to compare instead of instanceof with minified code
3410
3413
  this.type = 'CallSession';
@@ -3435,7 +3438,7 @@ class CallSession {
3435
3438
  }
3436
3439
 
3437
3440
  answer() {
3438
- this.answered = true;
3441
+ this.answerTime = new Date();
3439
3442
  }
3440
3443
 
3441
3444
  systemAnswer() {
@@ -3591,6 +3594,15 @@ class CallSession {
3591
3594
  return newFrom(callSession, CallSession);
3592
3595
  }
3593
3596
 
3597
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
3598
+ set answered(value ) {
3599
+ this.answerTime = value ? new Date() : null;
3600
+ }
3601
+
3602
+ get answered() {
3603
+ return !!this.answerTime;
3604
+ }
3605
+
3594
3606
  static parseCall(call ) {
3595
3607
  return new CallSession({
3596
3608
  callId: call.id,
@@ -9810,6 +9822,7 @@ class WebRTCPhone extends Emitter {
9810
9822
  this.removeIncomingSessions(sipSessionId);
9811
9823
  }
9812
9824
 
9825
+ callSession.answerTime = new Date();
9813
9826
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9814
9827
 
9815
9828
  return callSession;
@@ -10025,6 +10038,7 @@ class WebRTCPhone extends Emitter {
10025
10038
  }
10026
10039
 
10027
10040
  this.shouldSendReinvite = false;
10041
+ callSession.answerTime = new Date();
10028
10042
  this.acceptedSessions[callSession.getId()] = true;
10029
10043
 
10030
10044
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);