@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
@@ -32,6 +32,7 @@ var updateFrom = (instance , from ) => {
32
32
 
33
33
 
34
34
 
35
+
35
36
 
36
37
 
37
38
 
@@ -79,14 +80,14 @@ class CallSession {
79
80
 
80
81
 
81
82
 
83
+ // = creationTime
84
+
82
85
 
83
86
 
84
87
 
85
88
 
86
89
 
87
90
 
88
-
89
-
90
91
 
91
92
 
92
93
 
@@ -150,6 +151,7 @@ class CallSession {
150
151
  recordingPaused,
151
152
  videoRemotelyDowngraded,
152
153
  sipSession,
154
+ answerTime,
153
155
  } ) {
154
156
  this.callId = callId;
155
157
  this.sipCallId = sipCallId;
@@ -177,6 +179,7 @@ class CallSession {
177
179
  this.recordingPaused = recordingPaused || false;
178
180
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
179
181
  this.sipSession = sipSession;
182
+ this.answerTime = answerTime || this.answerTime;
180
183
 
181
184
  // Useful to compare instead of instanceof with minified code
182
185
  this.type = 'CallSession';
@@ -207,7 +210,7 @@ class CallSession {
207
210
  }
208
211
 
209
212
  answer() {
210
- this.answered = true;
213
+ this.answerTime = new Date();
211
214
  }
212
215
 
213
216
  systemAnswer() {
@@ -363,6 +366,15 @@ class CallSession {
363
366
  return newFrom(callSession, CallSession);
364
367
  }
365
368
 
369
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
370
+ set answered(value ) {
371
+ this.answerTime = value ? new Date() : null;
372
+ }
373
+
374
+ get answered() {
375
+ return !!this.answerTime;
376
+ }
377
+
366
378
  static parseCall(call ) {
367
379
  return new CallSession({
368
380
  callId: call.id,
@@ -1706,6 +1706,7 @@ var updateFrom = (instance , from ) => {
1706
1706
 
1707
1707
 
1708
1708
 
1709
+
1709
1710
 
1710
1711
 
1711
1712
 
@@ -1753,14 +1754,14 @@ class CallSession {
1753
1754
 
1754
1755
 
1755
1756
 
1757
+ // = creationTime
1758
+
1756
1759
 
1757
1760
 
1758
1761
 
1759
1762
 
1760
1763
 
1761
1764
 
1762
-
1763
-
1764
1765
 
1765
1766
 
1766
1767
 
@@ -1824,6 +1825,7 @@ class CallSession {
1824
1825
  recordingPaused,
1825
1826
  videoRemotelyDowngraded,
1826
1827
  sipSession,
1828
+ answerTime,
1827
1829
  } ) {
1828
1830
  this.callId = callId;
1829
1831
  this.sipCallId = sipCallId;
@@ -1851,6 +1853,7 @@ class CallSession {
1851
1853
  this.recordingPaused = recordingPaused || false;
1852
1854
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
1853
1855
  this.sipSession = sipSession;
1856
+ this.answerTime = answerTime || this.answerTime;
1854
1857
 
1855
1858
  // Useful to compare instead of instanceof with minified code
1856
1859
  this.type = 'CallSession';
@@ -1881,7 +1884,7 @@ class CallSession {
1881
1884
  }
1882
1885
 
1883
1886
  answer() {
1884
- this.answered = true;
1887
+ this.answerTime = new Date();
1885
1888
  }
1886
1889
 
1887
1890
  systemAnswer() {
@@ -2037,6 +2040,15 @@ class CallSession {
2037
2040
  return newFrom(callSession, CallSession);
2038
2041
  }
2039
2042
 
2043
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
2044
+ set answered(value ) {
2045
+ this.answerTime = value ? new Date() : null;
2046
+ }
2047
+
2048
+ get answered() {
2049
+ return !!this.answerTime;
2050
+ }
2051
+
2040
2052
  static parseCall(call ) {
2041
2053
  return new CallSession({
2042
2054
  callId: call.id,
@@ -54,6 +54,7 @@ var updateFrom = (instance , from ) => {
54
54
 
55
55
 
56
56
 
57
+
57
58
 
58
59
 
59
60
 
@@ -101,14 +102,14 @@ class CallSession {
101
102
 
102
103
 
103
104
 
105
+ // = creationTime
106
+
104
107
 
105
108
 
106
109
 
107
110
 
108
111
 
109
112
 
110
-
111
-
112
113
 
113
114
 
114
115
 
@@ -172,6 +173,7 @@ class CallSession {
172
173
  recordingPaused,
173
174
  videoRemotelyDowngraded,
174
175
  sipSession,
176
+ answerTime,
175
177
  } ) {
176
178
  this.callId = callId;
177
179
  this.sipCallId = sipCallId;
@@ -199,6 +201,7 @@ class CallSession {
199
201
  this.recordingPaused = recordingPaused || false;
200
202
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
201
203
  this.sipSession = sipSession;
204
+ this.answerTime = answerTime || this.answerTime;
202
205
 
203
206
  // Useful to compare instead of instanceof with minified code
204
207
  this.type = 'CallSession';
@@ -229,7 +232,7 @@ class CallSession {
229
232
  }
230
233
 
231
234
  answer() {
232
- this.answered = true;
235
+ this.answerTime = new Date();
233
236
  }
234
237
 
235
238
  systemAnswer() {
@@ -385,6 +388,15 @@ class CallSession {
385
388
  return newFrom(callSession, CallSession);
386
389
  }
387
390
 
391
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
392
+ set answered(value ) {
393
+ this.answerTime = value ? new Date() : null;
394
+ }
395
+
396
+ get answered() {
397
+ return !!this.answerTime;
398
+ }
399
+
388
400
  static parseCall(call ) {
389
401
  return new CallSession({
390
402
  callId: call.id,
@@ -1491,6 +1503,7 @@ class WebRTCPhone extends Emitter {
1491
1503
  this.removeIncomingSessions(sipSessionId);
1492
1504
  }
1493
1505
 
1506
+ callSession.answerTime = new Date();
1494
1507
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
1495
1508
 
1496
1509
  return callSession;
@@ -1706,6 +1719,7 @@ class WebRTCPhone extends Emitter {
1706
1719
  }
1707
1720
 
1708
1721
  this.shouldSendReinvite = false;
1722
+ callSession.answerTime = new Date();
1709
1723
  this.acceptedSessions[callSession.getId()] = true;
1710
1724
 
1711
1725
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);
@@ -32,6 +32,7 @@ var updateFrom = (instance , from ) => {
32
32
 
33
33
 
34
34
 
35
+
35
36
 
36
37
 
37
38
 
@@ -79,14 +80,14 @@ class CallSession {
79
80
 
80
81
 
81
82
 
83
+ // = creationTime
84
+
82
85
 
83
86
 
84
87
 
85
88
 
86
89
 
87
90
 
88
-
89
-
90
91
 
91
92
 
92
93
 
@@ -150,6 +151,7 @@ class CallSession {
150
151
  recordingPaused,
151
152
  videoRemotelyDowngraded,
152
153
  sipSession,
154
+ answerTime,
153
155
  } ) {
154
156
  this.callId = callId;
155
157
  this.sipCallId = sipCallId;
@@ -177,6 +179,7 @@ class CallSession {
177
179
  this.recordingPaused = recordingPaused || false;
178
180
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
179
181
  this.sipSession = sipSession;
182
+ this.answerTime = answerTime || this.answerTime;
180
183
 
181
184
  // Useful to compare instead of instanceof with minified code
182
185
  this.type = 'CallSession';
@@ -207,7 +210,7 @@ class CallSession {
207
210
  }
208
211
 
209
212
  answer() {
210
- this.answered = true;
213
+ this.answerTime = new Date();
211
214
  }
212
215
 
213
216
  systemAnswer() {
@@ -363,6 +366,15 @@ class CallSession {
363
366
  return newFrom(callSession, CallSession);
364
367
  }
365
368
 
369
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
370
+ set answered(value ) {
371
+ this.answerTime = value ? new Date() : null;
372
+ }
373
+
374
+ get answered() {
375
+ return !!this.answerTime;
376
+ }
377
+
366
378
  static parseCall(call ) {
367
379
  return new CallSession({
368
380
  callId: call.id,
@@ -425,4 +437,21 @@ describe('CallSession domain', () => {
425
437
  expect(cs1.is(cs2)).toBeTruthy();
426
438
  expect(cs2.is(cs1)).toBeTruthy();
427
439
  });
440
+
441
+ it('should set answerTime when setting answered', () => {
442
+ const cs1 = new CallSession({});
443
+ cs1.answered = true;
444
+
445
+ const cs2 = new CallSession({});
446
+ cs2.answer();
447
+
448
+ const cs3 = new CallSession({ answered: true });
449
+
450
+ expect(cs1.answered).toBeTruthy();
451
+ expect(cs1.answerTime).not.toBeNull();
452
+ expect(cs2.answered).toBeTruthy();
453
+ expect(cs2.answerTime).not.toBeNull();
454
+ expect(cs3.answered).toBeTruthy();
455
+ expect(cs3.answerTime).not.toBeNull();
456
+ });
428
457
  });
@@ -32,6 +32,7 @@ var updateFrom = (instance , from ) => {
32
32
 
33
33
 
34
34
 
35
+
35
36
 
36
37
 
37
38
 
@@ -79,14 +80,14 @@ class CallSession {
79
80
 
80
81
 
81
82
 
83
+ // = creationTime
84
+
82
85
 
83
86
 
84
87
 
85
88
 
86
89
 
87
90
 
88
-
89
-
90
91
 
91
92
 
92
93
 
@@ -150,6 +151,7 @@ class CallSession {
150
151
  recordingPaused,
151
152
  videoRemotelyDowngraded,
152
153
  sipSession,
154
+ answerTime,
153
155
  } ) {
154
156
  this.callId = callId;
155
157
  this.sipCallId = sipCallId;
@@ -177,6 +179,7 @@ class CallSession {
177
179
  this.recordingPaused = recordingPaused || false;
178
180
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
179
181
  this.sipSession = sipSession;
182
+ this.answerTime = answerTime || this.answerTime;
180
183
 
181
184
  // Useful to compare instead of instanceof with minified code
182
185
  this.type = 'CallSession';
@@ -207,7 +210,7 @@ class CallSession {
207
210
  }
208
211
 
209
212
  answer() {
210
- this.answered = true;
213
+ this.answerTime = new Date();
211
214
  }
212
215
 
213
216
  systemAnswer() {
@@ -363,6 +366,15 @@ class CallSession {
363
366
  return newFrom(callSession, CallSession);
364
367
  }
365
368
 
369
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
370
+ set answered(value ) {
371
+ this.answerTime = value ? new Date() : null;
372
+ }
373
+
374
+ get answered() {
375
+ return !!this.answerTime;
376
+ }
377
+
366
378
  static parseCall(call ) {
367
379
  return new CallSession({
368
380
  callId: call.id,
@@ -32,6 +32,7 @@ var updateFrom = (instance , from ) => {
32
32
 
33
33
 
34
34
 
35
+
35
36
 
36
37
 
37
38
 
@@ -79,14 +80,14 @@ class CallSession {
79
80
 
80
81
 
81
82
 
83
+ // = creationTime
84
+
82
85
 
83
86
 
84
87
 
85
88
 
86
89
 
87
90
 
88
-
89
-
90
91
 
91
92
 
92
93
 
@@ -150,6 +151,7 @@ class CallSession {
150
151
  recordingPaused,
151
152
  videoRemotelyDowngraded,
152
153
  sipSession,
154
+ answerTime,
153
155
  } ) {
154
156
  this.callId = callId;
155
157
  this.sipCallId = sipCallId;
@@ -177,6 +179,7 @@ class CallSession {
177
179
  this.recordingPaused = recordingPaused || false;
178
180
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
179
181
  this.sipSession = sipSession;
182
+ this.answerTime = answerTime || this.answerTime;
180
183
 
181
184
  // Useful to compare instead of instanceof with minified code
182
185
  this.type = 'CallSession';
@@ -207,7 +210,7 @@ class CallSession {
207
210
  }
208
211
 
209
212
  answer() {
210
- this.answered = true;
213
+ this.answerTime = new Date();
211
214
  }
212
215
 
213
216
  systemAnswer() {
@@ -363,6 +366,15 @@ class CallSession {
363
366
  return newFrom(callSession, CallSession);
364
367
  }
365
368
 
369
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
370
+ set answered(value ) {
371
+ this.answerTime = value ? new Date() : null;
372
+ }
373
+
374
+ get answered() {
375
+ return !!this.answerTime;
376
+ }
377
+
366
378
  static parseCall(call ) {
367
379
  return new CallSession({
368
380
  callId: call.id,
package/esm/index.js CHANGED
@@ -3249,6 +3249,7 @@ var updateFrom = (instance , from ) => {
3249
3249
 
3250
3250
 
3251
3251
 
3252
+
3252
3253
 
3253
3254
 
3254
3255
 
@@ -3296,14 +3297,14 @@ class CallSession {
3296
3297
 
3297
3298
 
3298
3299
 
3300
+ // = creationTime
3301
+
3299
3302
 
3300
3303
 
3301
3304
 
3302
3305
 
3303
3306
 
3304
3307
 
3305
-
3306
-
3307
3308
 
3308
3309
 
3309
3310
 
@@ -3367,6 +3368,7 @@ class CallSession {
3367
3368
  recordingPaused,
3368
3369
  videoRemotelyDowngraded,
3369
3370
  sipSession,
3371
+ answerTime,
3370
3372
  } ) {
3371
3373
  this.callId = callId;
3372
3374
  this.sipCallId = sipCallId;
@@ -3394,6 +3396,7 @@ class CallSession {
3394
3396
  this.recordingPaused = recordingPaused || false;
3395
3397
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
3396
3398
  this.sipSession = sipSession;
3399
+ this.answerTime = answerTime || this.answerTime;
3397
3400
 
3398
3401
  // Useful to compare instead of instanceof with minified code
3399
3402
  this.type = 'CallSession';
@@ -3424,7 +3427,7 @@ class CallSession {
3424
3427
  }
3425
3428
 
3426
3429
  answer() {
3427
- this.answered = true;
3430
+ this.answerTime = new Date();
3428
3431
  }
3429
3432
 
3430
3433
  systemAnswer() {
@@ -3580,6 +3583,15 @@ class CallSession {
3580
3583
  return newFrom(callSession, CallSession);
3581
3584
  }
3582
3585
 
3586
+ // Retro-compatibility: `answered` was a boolean before. We can reproduce the behaviour with a getter/setter
3587
+ set answered(value ) {
3588
+ this.answerTime = value ? new Date() : null;
3589
+ }
3590
+
3591
+ get answered() {
3592
+ return !!this.answerTime;
3593
+ }
3594
+
3583
3595
  static parseCall(call ) {
3584
3596
  return new CallSession({
3585
3597
  callId: call.id,
@@ -9799,6 +9811,7 @@ class WebRTCPhone extends Emitter {
9799
9811
  this.removeIncomingSessions(sipSessionId);
9800
9812
  }
9801
9813
 
9814
+ callSession.answerTime = new Date();
9802
9815
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9803
9816
 
9804
9817
  return callSession;
@@ -10014,6 +10027,7 @@ class WebRTCPhone extends Emitter {
10014
10027
  }
10015
10028
 
10016
10029
  this.shouldSendReinvite = false;
10030
+ callSession.answerTime = new Date();
10017
10031
  this.acceptedSessions[callSession.getId()] = true;
10018
10032
 
10019
10033
  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,
@@ -9072,6 +9084,7 @@ class WebRTCPhone extends Emitter {
9072
9084
  this.removeIncomingSessions(sipSessionId);
9073
9085
  }
9074
9086
 
9087
+ callSession.answerTime = new Date();
9075
9088
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9076
9089
 
9077
9090
  return callSession;
@@ -9287,6 +9300,7 @@ class WebRTCPhone extends Emitter {
9287
9300
  }
9288
9301
 
9289
9302
  this.shouldSendReinvite = false;
9303
+ callSession.answerTime = new Date();
9290
9304
  this.acceptedSessions[callSession.getId()] = true;
9291
9305
 
9292
9306
  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,
@@ -9072,6 +9084,7 @@ class WebRTCPhone extends Emitter {
9072
9084
  this.removeIncomingSessions(sipSessionId);
9073
9085
  }
9074
9086
 
9087
+ callSession.answerTime = new Date();
9075
9088
  this.eventEmitter.emit(ON_CALL_ACCEPTED, callSession, cameraEnabled);
9076
9089
 
9077
9090
  return callSession;
@@ -9287,6 +9300,7 @@ class WebRTCPhone extends Emitter {
9287
9300
  }
9288
9301
 
9289
9302
  this.shouldSendReinvite = false;
9303
+ callSession.answerTime = new Date();
9290
9304
  this.acceptedSessions[callSession.getId()] = true;
9291
9305
 
9292
9306
  this.eventEmitter.emit(ON_CALL_ANSWERED, callSession);