@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.
- package/README.md +1 -0
- package/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/api-client.test.js +17 -0
- package/esm/__tests__/web-rtc-client.test.js +18 -1
- package/esm/api/auth.js +5 -0
- package/esm/api/call-logd.js +6 -0
- package/esm/api/chatd.js +6 -0
- package/esm/api/confd.js +6 -0
- package/esm/api-client.js +17 -0
- package/esm/checker/Checker.js +18 -1
- package/esm/checker/checks/aor.js +17 -0
- package/esm/checker/checks/api.js +17 -0
- package/esm/checker/checks/index.js +18 -1
- package/esm/checker/checks/webrtc-transport.js +18 -1
- package/esm/checker/checks/webrtc.js +18 -1
- package/esm/domain/AdHocAPIConference.js +21 -0
- package/esm/domain/CallLog.js +6 -0
- package/esm/domain/CallSession.js +14 -0
- package/esm/domain/Features.js +17 -0
- package/esm/domain/Phone/CTIPhone.js +31 -0
- package/esm/domain/Phone/WebRTCPhone.js +65 -15
- package/esm/domain/Profile.js +6 -0
- package/esm/domain/__tests__/CallLog.test.js +10 -0
- package/esm/domain/__tests__/CallSession.test.js +14 -0
- package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
- package/esm/domain/__tests__/Profile.test.js +6 -0
- package/esm/domain/__tests__/Room.test.js +14 -0
- package/esm/domain/__tests__/Session.test.js +6 -0
- package/esm/index.js +93 -22
- package/esm/service/CallApi.js +17 -0
- package/esm/service/getApiClient.js +17 -0
- package/esm/simple/Auth.js +93 -22
- package/esm/simple/Configuration.js +93 -22
- package/esm/simple/Directory.js +17 -0
- package/esm/simple/Phone.js +93 -22
- package/esm/simple/index.js +93 -22
- package/esm/simple/room/LocalParticipant.js +93 -22
- package/esm/simple/room/Participant.js +93 -22
- package/esm/simple/room/RemoteParticipant.js +93 -22
- package/esm/simple/room/Room.js +93 -22
- package/esm/simple/room/SipRoom.js +93 -22
- package/esm/simple/room/Stream.js +93 -22
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +93 -22
- package/esm/simple/utils.js +93 -22
- package/esm/web-rtc-client.js +18 -1
- package/lib/__tests__/api-client.test.js +17 -0
- package/lib/__tests__/web-rtc-client.test.js +18 -1
- package/lib/api/auth.js +5 -0
- package/lib/api/call-logd.js +6 -0
- package/lib/api/chatd.js +6 -0
- package/lib/api/confd.js +6 -0
- package/lib/api-client.js +17 -0
- package/lib/checker/Checker.js +18 -1
- package/lib/checker/checks/aor.js +17 -0
- package/lib/checker/checks/api.js +17 -0
- package/lib/checker/checks/index.js +18 -1
- package/lib/checker/checks/webrtc-transport.js +18 -1
- package/lib/checker/checks/webrtc.js +18 -1
- package/lib/domain/AdHocAPIConference.js +21 -0
- package/lib/domain/CallLog.js +6 -0
- package/lib/domain/CallSession.js +14 -0
- package/lib/domain/Features.js +17 -0
- package/lib/domain/Phone/CTIPhone.js +31 -0
- package/lib/domain/Phone/WebRTCPhone.js +65 -15
- package/lib/domain/Profile.js +6 -0
- package/lib/domain/__tests__/CallLog.test.js +10 -0
- package/lib/domain/__tests__/CallSession.test.js +14 -0
- package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
- package/lib/domain/__tests__/Profile.test.js +6 -0
- package/lib/domain/__tests__/Room.test.js +14 -0
- package/lib/domain/__tests__/Session.test.js +6 -0
- package/lib/index.js +93 -22
- package/lib/service/CallApi.js +17 -0
- package/lib/service/getApiClient.js +17 -0
- package/lib/simple/Auth.js +93 -22
- package/lib/simple/Configuration.js +93 -22
- package/lib/simple/Directory.js +17 -0
- package/lib/simple/Phone.js +93 -22
- package/lib/simple/index.js +93 -22
- package/lib/simple/room/LocalParticipant.js +93 -22
- package/lib/simple/room/Participant.js +93 -22
- package/lib/simple/room/RemoteParticipant.js +93 -22
- package/lib/simple/room/Room.js +93 -22
- package/lib/simple/room/SipRoom.js +93 -22
- package/lib/simple/room/Stream.js +93 -22
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +93 -22
- package/lib/simple/utils.js +93 -22
- package/lib/web-rtc-client.js +18 -1
- package/package.json +1 -1
- package/src/api/auth.js +5 -0
- package/src/domain/AdHocAPIConference.js +4 -0
- package/src/domain/CallLog.js +6 -0
- package/src/domain/CallSession.js +14 -0
- package/src/domain/Phone/WebRTCPhone.js +51 -15
- package/src/domain/Profile.js +6 -0
- package/src/domain/__tests__/CallLog.test.js +4 -0
- package/src/simple/Phone.js +6 -6
- package/src/web-rtc-client.js +1 -1
|
@@ -384,6 +384,7 @@ const LINE_STATE = {
|
|
|
384
384
|
|
|
385
385
|
|
|
386
386
|
|
|
387
|
+
|
|
387
388
|
|
|
388
389
|
|
|
389
390
|
|
|
@@ -420,6 +421,7 @@ const LINE_STATE = {
|
|
|
420
421
|
|
|
421
422
|
|
|
422
423
|
|
|
424
|
+
|
|
423
425
|
|
|
424
426
|
|
|
425
427
|
|
|
@@ -451,6 +453,7 @@ class Profile {
|
|
|
451
453
|
|
|
452
454
|
|
|
453
455
|
|
|
456
|
+
|
|
454
457
|
|
|
455
458
|
|
|
456
459
|
|
|
@@ -467,6 +470,7 @@ class Profile {
|
|
|
467
470
|
lines: plain.lines.map(line => Line.parse(line)),
|
|
468
471
|
username: plain.username,
|
|
469
472
|
mobileNumber: plain.mobile_phone_number || '',
|
|
473
|
+
ringSeconds: plain.ring_seconds,
|
|
470
474
|
forwards: [
|
|
471
475
|
ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
|
|
472
476
|
ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
|
|
@@ -503,6 +507,7 @@ class Profile {
|
|
|
503
507
|
switchboards,
|
|
504
508
|
agent,
|
|
505
509
|
status,
|
|
510
|
+
ringSeconds,
|
|
506
511
|
sipLines,
|
|
507
512
|
callPickupTargetUsers,
|
|
508
513
|
onlineCallRecordEnabled,
|
|
@@ -524,6 +529,7 @@ class Profile {
|
|
|
524
529
|
this.status = status;
|
|
525
530
|
this.callPickupTargetUsers = callPickupTargetUsers;
|
|
526
531
|
this.onlineCallRecordEnabled = onlineCallRecordEnabled;
|
|
532
|
+
this.ringSeconds = ringSeconds;
|
|
527
533
|
|
|
528
534
|
this.sipLines = sipLines || [];
|
|
529
535
|
}
|
|
@@ -2216,6 +2222,7 @@ var authMethods = (client , baseUrl ) => ({
|
|
|
2216
2222
|
|
|
2217
2223
|
|
|
2218
2224
|
|
|
2225
|
+
|
|
2219
2226
|
) {
|
|
2220
2227
|
const body = {
|
|
2221
2228
|
backend: params.backend || DEFAULT_BACKEND_USER,
|
|
@@ -2235,6 +2242,10 @@ var authMethods = (client , baseUrl ) => ({
|
|
|
2235
2242
|
headers['Wazo-Session-Type'] = 'mobile';
|
|
2236
2243
|
}
|
|
2237
2244
|
|
|
2245
|
+
if (params.tenantId) {
|
|
2246
|
+
body.tenant_id = params.tenantId;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2238
2249
|
return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
|
|
2239
2250
|
},
|
|
2240
2251
|
|
|
@@ -3275,6 +3286,7 @@ var updateFrom = (instance , from ) => {
|
|
|
3275
3286
|
|
|
3276
3287
|
|
|
3277
3288
|
|
|
3289
|
+
|
|
3278
3290
|
|
|
3279
3291
|
|
|
3280
3292
|
class CallSession {
|
|
@@ -3337,6 +3349,8 @@ class CallSession {
|
|
|
3337
3349
|
|
|
3338
3350
|
|
|
3339
3351
|
|
|
3352
|
+
|
|
3353
|
+
|
|
3340
3354
|
|
|
3341
3355
|
|
|
3342
3356
|
|
|
@@ -3368,6 +3382,7 @@ class CallSession {
|
|
|
3368
3382
|
videoRemotelyDowngraded,
|
|
3369
3383
|
sipSession,
|
|
3370
3384
|
answerTime,
|
|
3385
|
+
conference,
|
|
3371
3386
|
} ) {
|
|
3372
3387
|
this.callId = callId;
|
|
3373
3388
|
this.sipCallId = sipCallId;
|
|
@@ -3396,6 +3411,7 @@ class CallSession {
|
|
|
3396
3411
|
this.videoRemotelyDowngraded = videoRemotelyDowngraded;
|
|
3397
3412
|
this.sipSession = sipSession;
|
|
3398
3413
|
this.answerTime = answerTime || this.answerTime;
|
|
3414
|
+
this.conference = conference;
|
|
3399
3415
|
|
|
3400
3416
|
// Useful to compare instead of instanceof with minified code
|
|
3401
3417
|
this.type = 'CallSession';
|
|
@@ -3453,6 +3469,10 @@ class CallSession {
|
|
|
3453
3469
|
this.screensharing = false;
|
|
3454
3470
|
}
|
|
3455
3471
|
|
|
3472
|
+
setIsConference(conference ) {
|
|
3473
|
+
this.conference = conference;
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3456
3476
|
isIncoming() {
|
|
3457
3477
|
return !this.isCaller && !this.answered;
|
|
3458
3478
|
}
|
|
@@ -3529,6 +3549,10 @@ class CallSession {
|
|
|
3529
3549
|
return this.sipStatus === SessionState.Terminated;
|
|
3530
3550
|
}
|
|
3531
3551
|
|
|
3552
|
+
isConference() {
|
|
3553
|
+
return this.conference;
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3532
3556
|
getElapsedTimeInSeconds() {
|
|
3533
3557
|
if (!this.startTime) {
|
|
3534
3558
|
return 0;
|
|
@@ -3620,6 +3644,7 @@ class CallSession {
|
|
|
3620
3644
|
cameraEnabled: false,
|
|
3621
3645
|
dialedExtension: call.dialedExtension,
|
|
3622
3646
|
call,
|
|
3647
|
+
conference: false, // @FIXME?
|
|
3623
3648
|
});
|
|
3624
3649
|
}
|
|
3625
3650
|
}
|
|
@@ -3709,11 +3734,13 @@ class Recording {
|
|
|
3709
3734
|
|
|
3710
3735
|
|
|
3711
3736
|
|
|
3737
|
+
|
|
3712
3738
|
|
|
3713
3739
|
|
|
3714
3740
|
|
|
3715
3741
|
|
|
3716
3742
|
|
|
3743
|
+
|
|
3717
3744
|
|
|
3718
3745
|
|
|
3719
3746
|
|
|
@@ -3734,10 +3761,12 @@ class Recording {
|
|
|
3734
3761
|
|
|
3735
3762
|
|
|
3736
3763
|
|
|
3764
|
+
|
|
3737
3765
|
|
|
3738
3766
|
|
|
3739
3767
|
|
|
3740
3768
|
|
|
3769
|
+
|
|
3741
3770
|
|
|
3742
3771
|
|
|
3743
3772
|
|
|
@@ -3799,10 +3828,12 @@ class CallLog {
|
|
|
3799
3828
|
|| plain.destination_extension
|
|
3800
3829
|
|| `meeting-${plain.requested_name || plain.destination_name || ''}`,
|
|
3801
3830
|
name: plain.requested_name || plain.destination_name || '',
|
|
3831
|
+
uuid: plain.destination_user_uuid,
|
|
3802
3832
|
},
|
|
3803
3833
|
source: {
|
|
3804
3834
|
extension: plain.source_extension,
|
|
3805
3835
|
name: plain.source_name,
|
|
3836
|
+
uuid: plain.source_user_uuid,
|
|
3806
3837
|
},
|
|
3807
3838
|
id: plain.id,
|
|
3808
3839
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|
|
@@ -5645,6 +5676,10 @@ class AdHocAPIConference {
|
|
|
5645
5676
|
this.conferenceId = conferenceId || '';
|
|
5646
5677
|
this.muted = muted || false;
|
|
5647
5678
|
this.paused = paused || false;
|
|
5679
|
+
|
|
5680
|
+
if (this.host) {
|
|
5681
|
+
this.host.setIsConference(true);
|
|
5682
|
+
}
|
|
5648
5683
|
}
|
|
5649
5684
|
|
|
5650
5685
|
async start() {
|
|
@@ -6399,7 +6434,7 @@ const events$1 = [REGISTERED, UNREGISTERED, REGISTRATION_FAILED, INVITE];
|
|
|
6399
6434
|
const transportEvents = [CONNECTED, DISCONNECTED, TRANSPORT_ERROR, MESSAGE];
|
|
6400
6435
|
class CanceledCallError extends Error {}
|
|
6401
6436
|
|
|
6402
|
-
const MAX_REGISTER_TRIES =
|
|
6437
|
+
const MAX_REGISTER_TRIES = 5;
|
|
6403
6438
|
|
|
6404
6439
|
|
|
6405
6440
|
|
|
@@ -9354,7 +9389,11 @@ class WebRTCPhone extends Emitter {
|
|
|
9354
9389
|
accept(callSession , cameraEnabled ) {
|
|
9355
9390
|
logger$8.info('WebRTC phone - accept call', { id: callSession ? callSession.getId() : 'n/a', cameraEnabled });
|
|
9356
9391
|
if (this.currentSipSession) {
|
|
9357
|
-
this.holdSipSession(
|
|
9392
|
+
this.holdSipSession(
|
|
9393
|
+
this.currentSipSession,
|
|
9394
|
+
this.currentCallSession,
|
|
9395
|
+
true,
|
|
9396
|
+
);
|
|
9358
9397
|
}
|
|
9359
9398
|
|
|
9360
9399
|
if (!callSession) {
|
|
@@ -9362,6 +9401,12 @@ class WebRTCPhone extends Emitter {
|
|
|
9362
9401
|
return Promise.resolve(null);
|
|
9363
9402
|
}
|
|
9364
9403
|
|
|
9404
|
+
const sipSessionId = this.getSipSessionIdFromCallSession(callSession);
|
|
9405
|
+
if (sipSessionId && !(sipSessionId in this.callSessions)) {
|
|
9406
|
+
logger$8.warn('Call session already ended or not found, can\'t accept it.', { sipSessionId });
|
|
9407
|
+
return Promise.resolve(null);
|
|
9408
|
+
}
|
|
9409
|
+
|
|
9365
9410
|
if (callSession.getId() in this.acceptedSessions) {
|
|
9366
9411
|
logger$8.warn('CallSession already accepted.', { id: callSession ? callSession.getId() : 'n/a' });
|
|
9367
9412
|
return Promise.resolve(callSession.sipCallId);
|
|
@@ -9441,22 +9486,22 @@ class WebRTCPhone extends Emitter {
|
|
|
9441
9486
|
}
|
|
9442
9487
|
}
|
|
9443
9488
|
|
|
9444
|
-
hold(callSession , withEvent = true
|
|
9489
|
+
hold(callSession , withEvent = true) {
|
|
9445
9490
|
logger$8.info('WebRTC hold', { id: callSession.getId() });
|
|
9446
9491
|
|
|
9447
9492
|
const sipSession = this.findSipSession(callSession);
|
|
9448
9493
|
|
|
9449
|
-
return sipSession ? this.holdSipSession(sipSession, callSession, withEvent
|
|
9494
|
+
return sipSession ? this.holdSipSession(sipSession, callSession, withEvent) : null;
|
|
9450
9495
|
}
|
|
9451
9496
|
|
|
9452
9497
|
// @Deprecated
|
|
9453
|
-
unhold(callSession , withEvent = true
|
|
9498
|
+
unhold(callSession , withEvent = true) {
|
|
9454
9499
|
console.warn('Please note that `phone.unhold()` is being deprecated; `phone.resume()` is the preferred method');
|
|
9455
9500
|
|
|
9456
|
-
return this.resume(callSession,
|
|
9501
|
+
return this.resume(callSession, withEvent);
|
|
9457
9502
|
}
|
|
9458
9503
|
|
|
9459
|
-
resume(callSession ,
|
|
9504
|
+
resume(callSession , withEvent = true) {
|
|
9460
9505
|
logger$8.info('WebRTC resume called', { id: callSession ? callSession.getId() : null });
|
|
9461
9506
|
|
|
9462
9507
|
const sipSession = this.findSipSession(callSession);
|
|
@@ -9469,10 +9514,14 @@ class WebRTCPhone extends Emitter {
|
|
|
9469
9514
|
// Hold current session if different from the current one (we don't want 2 sessions active at the same time).
|
|
9470
9515
|
if (this.currentSipSession && this.currentSipSession.id !== sipSession.id) {
|
|
9471
9516
|
logger$8.info('WebRTC hold call after resume', { id: this.currentSipSession.id });
|
|
9472
|
-
this.holdSipSession(
|
|
9517
|
+
this.holdSipSession(
|
|
9518
|
+
this.currentSipSession,
|
|
9519
|
+
this.currentCallSession,
|
|
9520
|
+
withEvent,
|
|
9521
|
+
);
|
|
9473
9522
|
}
|
|
9474
9523
|
|
|
9475
|
-
const promise = this.unholdSipSession(sipSession, callSession, withEvent
|
|
9524
|
+
const promise = this.unholdSipSession(sipSession, callSession, withEvent);
|
|
9476
9525
|
this.currentSipSession = sipSession;
|
|
9477
9526
|
if (callSession) {
|
|
9478
9527
|
this.currentCallSession = callSession;
|
|
@@ -9485,7 +9534,6 @@ class WebRTCPhone extends Emitter {
|
|
|
9485
9534
|
sipSession ,
|
|
9486
9535
|
callSession ,
|
|
9487
9536
|
withEvent = true,
|
|
9488
|
-
isConference = false,
|
|
9489
9537
|
) {
|
|
9490
9538
|
if (!sipSession) {
|
|
9491
9539
|
return new Promise((resolve, reject) => reject(new Error('No session to hold')));
|
|
@@ -9506,6 +9554,8 @@ class WebRTCPhone extends Emitter {
|
|
|
9506
9554
|
await this.client.downgradeToAudio(sipSession);
|
|
9507
9555
|
}
|
|
9508
9556
|
|
|
9557
|
+
const isConference = !!callSession && callSession.isConference();
|
|
9558
|
+
|
|
9509
9559
|
const promise = this.client.hold(sipSession, isConference, hasVideo);
|
|
9510
9560
|
if (withEvent) {
|
|
9511
9561
|
this.eventEmitter.emit(ON_CALL_HELD, this._createCallSession(sipSession, callSession));
|
|
@@ -9518,11 +9568,13 @@ class WebRTCPhone extends Emitter {
|
|
|
9518
9568
|
sipSession ,
|
|
9519
9569
|
callSession ,
|
|
9520
9570
|
withEvent = true,
|
|
9521
|
-
isConference = false,
|
|
9522
9571
|
) {
|
|
9523
9572
|
if (!sipSession) {
|
|
9524
9573
|
return new Promise((resolve, reject) => reject(new Error('No session to unhold')));
|
|
9525
9574
|
}
|
|
9575
|
+
|
|
9576
|
+
const isConference = !!callSession && callSession.isConference();
|
|
9577
|
+
|
|
9526
9578
|
const sessionId = this.getSipSessionId(sipSession);
|
|
9527
9579
|
logger$8.info('WebRTC unhold sip session', { sessionId, isConference });
|
|
9528
9580
|
|
|
@@ -9664,7 +9716,11 @@ class WebRTCPhone extends Emitter {
|
|
|
9664
9716
|
await this.client.register();
|
|
9665
9717
|
}
|
|
9666
9718
|
if (this.currentSipSession) {
|
|
9667
|
-
this.holdSipSession(
|
|
9719
|
+
this.holdSipSession(
|
|
9720
|
+
this.currentSipSession,
|
|
9721
|
+
this.currentCallSession,
|
|
9722
|
+
true,
|
|
9723
|
+
).catch(e => {
|
|
9668
9724
|
logger$8.warn('Unable to hold current session when making another call', e);
|
|
9669
9725
|
});
|
|
9670
9726
|
}
|
|
@@ -9679,6 +9735,7 @@ class WebRTCPhone extends Emitter {
|
|
|
9679
9735
|
return Promise.resolve(null);
|
|
9680
9736
|
}
|
|
9681
9737
|
const callSession = this._createOutgoingCallSession(sipSession, cameraEnabled || false);
|
|
9738
|
+
callSession.setIsConference(conference);
|
|
9682
9739
|
callSession.creationTime = new Date();
|
|
9683
9740
|
this._updateCallSession(callSession);
|
|
9684
9741
|
|
|
@@ -9986,9 +10043,17 @@ class WebRTCPhone extends Emitter {
|
|
|
9986
10043
|
});
|
|
9987
10044
|
|
|
9988
10045
|
this.client.on(this.client.ACCEPTED, (sipSession ) => {
|
|
9989
|
-
|
|
10046
|
+
const sessionId = this.getSipSessionId(sipSession);
|
|
10047
|
+
const hasSession = sessionId in this.callSessions;
|
|
9990
10048
|
|
|
9991
|
-
|
|
10049
|
+
logger$8.info('WebRTC call accepted', { sipId: sessionId, hasSession });
|
|
10050
|
+
|
|
10051
|
+
if (!hasSession) {
|
|
10052
|
+
logger$8.warn('Call accepted ignored, session is no longer present in the WebRtcPhone', { sessionId });
|
|
10053
|
+
return;
|
|
10054
|
+
}
|
|
10055
|
+
|
|
10056
|
+
this._onCallAccepted(sipSession, this.client.hasVideo(sessionId));
|
|
9992
10057
|
|
|
9993
10058
|
if (this.audioOutputDeviceId) {
|
|
9994
10059
|
this.client.changeAudioOutputDevice(this.audioOutputDeviceId);
|
|
@@ -10124,9 +10189,14 @@ class WebRTCPhone extends Emitter {
|
|
|
10124
10189
|
return this.client.getSipSessionId(sipSession);
|
|
10125
10190
|
}
|
|
10126
10191
|
|
|
10127
|
-
|
|
10192
|
+
getSipSessionIdFromCallSession(callSession ) {
|
|
10128
10193
|
const sipSession = this.findSipSession(callSession);
|
|
10129
|
-
|
|
10194
|
+
|
|
10195
|
+
return sipSession ? this.getSipSessionId(sipSession) : null;
|
|
10196
|
+
}
|
|
10197
|
+
|
|
10198
|
+
_updateCallSession(callSession ) {
|
|
10199
|
+
const sipSessionId = this.getSipSessionIdFromCallSession(callSession);
|
|
10130
10200
|
|
|
10131
10201
|
if (sipSessionId) {
|
|
10132
10202
|
this.callSessions[sipSessionId] = callSession;
|
|
@@ -10244,6 +10314,7 @@ class WebRTCPhone extends Emitter {
|
|
|
10244
10314
|
recording: fromSession ? fromSession.isRecording() : false,
|
|
10245
10315
|
recordingPaused: false, // @TODO
|
|
10246
10316
|
sipSession,
|
|
10317
|
+
conference: !!fromSession && fromSession.isConference(),
|
|
10247
10318
|
...extra,
|
|
10248
10319
|
});
|
|
10249
10320
|
|
|
@@ -10500,16 +10571,16 @@ class Phone extends Emitter {
|
|
|
10500
10571
|
}
|
|
10501
10572
|
}
|
|
10502
10573
|
|
|
10503
|
-
hold(callSession
|
|
10504
|
-
return this.phone && this.phone.hold(callSession, true
|
|
10574
|
+
hold(callSession ) {
|
|
10575
|
+
return this.phone && this.phone.hold(callSession, true);
|
|
10505
10576
|
}
|
|
10506
10577
|
|
|
10507
|
-
unhold(callSession
|
|
10508
|
-
return this.phone && this.phone.unhold(callSession, true
|
|
10578
|
+
unhold(callSession ) {
|
|
10579
|
+
return this.phone && this.phone.unhold(callSession, true);
|
|
10509
10580
|
}
|
|
10510
10581
|
|
|
10511
|
-
resume(callSession
|
|
10512
|
-
return this.phone && this.phone.resume(callSession
|
|
10582
|
+
resume(callSession ) {
|
|
10583
|
+
return this.phone && this.phone.resume(callSession);
|
|
10513
10584
|
}
|
|
10514
10585
|
|
|
10515
10586
|
reject(callSession ) {
|
package/esm/simple/Directory.js
CHANGED
|
@@ -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
|
}
|
|
@@ -2197,6 +2203,7 @@ var authMethods = (client , baseUrl ) => ({
|
|
|
2197
2203
|
|
|
2198
2204
|
|
|
2199
2205
|
|
|
2206
|
+
|
|
2200
2207
|
) {
|
|
2201
2208
|
const body = {
|
|
2202
2209
|
backend: params.backend || DEFAULT_BACKEND_USER,
|
|
@@ -2216,6 +2223,10 @@ var authMethods = (client , baseUrl ) => ({
|
|
|
2216
2223
|
headers['Wazo-Session-Type'] = 'mobile';
|
|
2217
2224
|
}
|
|
2218
2225
|
|
|
2226
|
+
if (params.tenantId) {
|
|
2227
|
+
body.tenant_id = params.tenantId;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2219
2230
|
return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
|
|
2220
2231
|
},
|
|
2221
2232
|
|
|
@@ -3284,11 +3295,13 @@ class Recording {
|
|
|
3284
3295
|
|
|
3285
3296
|
|
|
3286
3297
|
|
|
3298
|
+
|
|
3287
3299
|
|
|
3288
3300
|
|
|
3289
3301
|
|
|
3290
3302
|
|
|
3291
3303
|
|
|
3304
|
+
|
|
3292
3305
|
|
|
3293
3306
|
|
|
3294
3307
|
|
|
@@ -3309,10 +3322,12 @@ class Recording {
|
|
|
3309
3322
|
|
|
3310
3323
|
|
|
3311
3324
|
|
|
3325
|
+
|
|
3312
3326
|
|
|
3313
3327
|
|
|
3314
3328
|
|
|
3315
3329
|
|
|
3330
|
+
|
|
3316
3331
|
|
|
3317
3332
|
|
|
3318
3333
|
|
|
@@ -3374,10 +3389,12 @@ class CallLog {
|
|
|
3374
3389
|
|| plain.destination_extension
|
|
3375
3390
|
|| `meeting-${plain.requested_name || plain.destination_name || ''}`,
|
|
3376
3391
|
name: plain.requested_name || plain.destination_name || '',
|
|
3392
|
+
uuid: plain.destination_user_uuid,
|
|
3377
3393
|
},
|
|
3378
3394
|
source: {
|
|
3379
3395
|
extension: plain.source_extension,
|
|
3380
3396
|
name: plain.source_name,
|
|
3397
|
+
uuid: plain.source_user_uuid,
|
|
3381
3398
|
},
|
|
3382
3399
|
id: plain.id,
|
|
3383
3400
|
duration: (plain.duration || 0) * 1000, // duration is in seconds
|