@wazo/sdk 0.38.13 → 0.38.16
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/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/api-client.test.js +5 -0
- package/esm/__tests__/web-rtc-client.test.js +12 -0
- package/esm/api/dird.js +5 -0
- package/esm/api-client.js +5 -0
- package/esm/checker/Checker.js +12 -0
- package/esm/checker/checks/aor.js +5 -0
- package/esm/checker/checks/api.js +5 -0
- package/esm/checker/checks/index.js +12 -0
- package/esm/checker/checks/webrtc-transport.js +12 -0
- package/esm/checker/checks/webrtc.js +12 -0
- package/esm/domain/AdHocAPIConference.js +5 -0
- package/esm/domain/Features.js +5 -0
- package/esm/domain/Phone/CTIPhone.js +7 -0
- package/esm/index.js +22 -3
- package/esm/service/CallApi.js +5 -0
- package/esm/service/getApiClient.js +5 -0
- package/esm/simple/Auth.js +22 -3
- package/esm/simple/Configuration.js +22 -3
- package/esm/simple/Directory.js +5 -0
- package/esm/simple/Phone.js +22 -3
- package/esm/simple/index.js +22 -3
- package/esm/simple/room/LocalParticipant.js +5528 -5509
- package/esm/simple/room/Participant.js +5531 -5512
- package/esm/simple/room/RemoteParticipant.js +22 -3
- package/esm/simple/room/Room.js +22 -3
- package/esm/simple/room/SipRoom.js +22 -3
- package/esm/simple/room/Stream.js +22 -3
- package/esm/simple/room/__tests__/Participant.test.js +22 -3
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +22 -3
- package/esm/simple/utils.js +22 -3
- package/esm/web-rtc-client.js +12 -0
- package/lib/__tests__/api-client.test.js +5 -0
- package/lib/__tests__/web-rtc-client.test.js +12 -0
- package/lib/api/dird.js +5 -0
- package/lib/api-client.js +5 -0
- package/lib/checker/Checker.js +12 -0
- package/lib/checker/checks/aor.js +5 -0
- package/lib/checker/checks/api.js +5 -0
- package/lib/checker/checks/index.js +12 -0
- package/lib/checker/checks/webrtc-transport.js +12 -0
- package/lib/checker/checks/webrtc.js +12 -0
- package/lib/domain/AdHocAPIConference.js +5 -0
- package/lib/domain/Features.js +5 -0
- package/lib/domain/Phone/CTIPhone.js +7 -0
- package/lib/index.js +22 -3
- package/lib/service/CallApi.js +5 -0
- package/lib/service/getApiClient.js +5 -0
- package/lib/simple/Auth.js +22 -3
- package/lib/simple/Configuration.js +22 -3
- package/lib/simple/Directory.js +5 -0
- package/lib/simple/Phone.js +22 -3
- package/lib/simple/index.js +22 -3
- package/lib/simple/room/LocalParticipant.js +6444 -6425
- package/lib/simple/room/Participant.js +6447 -6428
- package/lib/simple/room/RemoteParticipant.js +22 -3
- package/lib/simple/room/Room.js +22 -3
- package/lib/simple/room/SipRoom.js +22 -3
- package/lib/simple/room/Stream.js +22 -3
- package/lib/simple/room/__tests__/Participant.test.js +22 -3
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +22 -3
- package/lib/simple/utils.js +22 -3
- package/lib/web-rtc-client.js +12 -0
- package/package.json +1 -1
- package/src/api/dird.js +5 -0
- package/src/domain/Phone/CTIPhone.js +2 -0
- package/src/domain/Phone/Phone.js +2 -0
- package/src/simple/room/Participant.js +7 -1
- package/src/simple/room/Room.js +2 -2
- package/src/web-rtc-client.js +7 -0
|
@@ -3958,6 +3958,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3958
3958
|
listPersonalContacts: (queryParams = null) =>
|
|
3959
3959
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3960
3960
|
|
|
3961
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3962
|
+
client
|
|
3963
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3964
|
+
.then(Contact.parsePersonal),
|
|
3965
|
+
|
|
3961
3966
|
addContact: (contact ) =>
|
|
3962
3967
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3963
3968
|
|
|
@@ -4006,6 +4006,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4006
4006
|
listPersonalContacts: (queryParams = null) =>
|
|
4007
4007
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4008
4008
|
|
|
4009
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4010
|
+
client
|
|
4011
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4012
|
+
.then(Contact.parsePersonal),
|
|
4013
|
+
|
|
4009
4014
|
addContact: (contact ) =>
|
|
4010
4015
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4011
4016
|
|
|
@@ -6380,6 +6385,12 @@ class WebRTCClient extends Emitter {
|
|
|
6380
6385
|
};
|
|
6381
6386
|
|
|
6382
6387
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6388
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6389
|
+
ua.transport.connectPromise.catch((e => {
|
|
6390
|
+
logger.warn('Transport connect error', e);
|
|
6391
|
+
}));
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6383
6394
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6384
6395
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6385
6396
|
|
|
@@ -6601,6 +6612,7 @@ class WebRTCClient extends Emitter {
|
|
|
6601
6612
|
conference,
|
|
6602
6613
|
audioOnly,
|
|
6603
6614
|
},
|
|
6615
|
+
earlyMedia: true,
|
|
6604
6616
|
};
|
|
6605
6617
|
|
|
6606
6618
|
if (audioOnly) {
|
|
@@ -4538,6 +4538,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4538
4538
|
listPersonalContacts: (queryParams = null) =>
|
|
4539
4539
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4540
4540
|
|
|
4541
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4542
|
+
client
|
|
4543
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4544
|
+
.then(Contact.parsePersonal),
|
|
4545
|
+
|
|
4541
4546
|
addContact: (contact ) =>
|
|
4542
4547
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4543
4548
|
|
|
@@ -5792,6 +5797,12 @@ class WebRTCClient extends Emitter {
|
|
|
5792
5797
|
};
|
|
5793
5798
|
|
|
5794
5799
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
5800
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
5801
|
+
ua.transport.connectPromise.catch((e => {
|
|
5802
|
+
logger.warn('Transport connect error', e);
|
|
5803
|
+
}));
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5795
5806
|
ua.transport.onMessage = (rawMessage ) => {
|
|
5796
5807
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
5797
5808
|
|
|
@@ -6013,6 +6024,7 @@ class WebRTCClient extends Emitter {
|
|
|
6013
6024
|
conference,
|
|
6014
6025
|
audioOnly,
|
|
6015
6026
|
},
|
|
6027
|
+
earlyMedia: true,
|
|
6016
6028
|
};
|
|
6017
6029
|
|
|
6018
6030
|
if (audioOnly) {
|
|
@@ -4538,6 +4538,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4538
4538
|
listPersonalContacts: (queryParams = null) =>
|
|
4539
4539
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4540
4540
|
|
|
4541
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4542
|
+
client
|
|
4543
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4544
|
+
.then(Contact.parsePersonal),
|
|
4545
|
+
|
|
4541
4546
|
addContact: (contact ) =>
|
|
4542
4547
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4543
4548
|
|
|
@@ -5792,6 +5797,12 @@ class WebRTCClient extends Emitter {
|
|
|
5792
5797
|
};
|
|
5793
5798
|
|
|
5794
5799
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
5800
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
5801
|
+
ua.transport.connectPromise.catch((e => {
|
|
5802
|
+
logger.warn('Transport connect error', e);
|
|
5803
|
+
}));
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5795
5806
|
ua.transport.onMessage = (rawMessage ) => {
|
|
5796
5807
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
5797
5808
|
|
|
@@ -6013,6 +6024,7 @@ class WebRTCClient extends Emitter {
|
|
|
6013
6024
|
conference,
|
|
6014
6025
|
audioOnly,
|
|
6015
6026
|
},
|
|
6027
|
+
earlyMedia: true,
|
|
6016
6028
|
};
|
|
6017
6029
|
|
|
6018
6030
|
if (audioOnly) {
|
|
@@ -3940,6 +3940,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3940
3940
|
listPersonalContacts: (queryParams = null) =>
|
|
3941
3941
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3942
3942
|
|
|
3943
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3944
|
+
client
|
|
3945
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3946
|
+
.then(Contact.parsePersonal),
|
|
3947
|
+
|
|
3943
3948
|
addContact: (contact ) =>
|
|
3944
3949
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3945
3950
|
|
package/lib/domain/Features.js
CHANGED
|
@@ -3942,6 +3942,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3942
3942
|
listPersonalContacts: (queryParams = null) =>
|
|
3943
3943
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3944
3944
|
|
|
3945
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3946
|
+
client
|
|
3947
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3948
|
+
.then(Contact.parsePersonal),
|
|
3949
|
+
|
|
3945
3950
|
addContact: (contact ) =>
|
|
3946
3951
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3947
3952
|
|
|
@@ -4288,6 +4288,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4288
4288
|
listPersonalContacts: (queryParams = null) =>
|
|
4289
4289
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4290
4290
|
|
|
4291
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4292
|
+
client
|
|
4293
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4294
|
+
.then(Contact.parsePersonal),
|
|
4295
|
+
|
|
4291
4296
|
addContact: (contact ) =>
|
|
4292
4297
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4293
4298
|
|
|
@@ -5777,6 +5782,8 @@ class CTIPhone extends Emitter {
|
|
|
5777
5782
|
}
|
|
5778
5783
|
|
|
5779
5784
|
useLocalVideoElement() {}
|
|
5785
|
+
|
|
5786
|
+
setMediaConstraints() {}
|
|
5780
5787
|
}
|
|
5781
5788
|
|
|
5782
5789
|
exports.TRANSFER_FLOW_ATTENDED = TRANSFER_FLOW_ATTENDED;
|
package/lib/index.js
CHANGED
|
@@ -4730,6 +4730,8 @@ class CTIPhone extends Emitter {
|
|
|
4730
4730
|
}
|
|
4731
4731
|
|
|
4732
4732
|
useLocalVideoElement() {}
|
|
4733
|
+
|
|
4734
|
+
setMediaConstraints() {}
|
|
4733
4735
|
}
|
|
4734
4736
|
|
|
4735
4737
|
/* */
|
|
@@ -4907,6 +4909,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4907
4909
|
listPersonalContacts: (queryParams = null) =>
|
|
4908
4910
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4909
4911
|
|
|
4912
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4913
|
+
client
|
|
4914
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4915
|
+
.then(Contact.parsePersonal),
|
|
4916
|
+
|
|
4910
4917
|
addContact: (contact ) =>
|
|
4911
4918
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4912
4919
|
|
|
@@ -6698,6 +6705,12 @@ class WebRTCClient extends Emitter {
|
|
|
6698
6705
|
};
|
|
6699
6706
|
|
|
6700
6707
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6708
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6709
|
+
ua.transport.connectPromise.catch((e => {
|
|
6710
|
+
logger$9.warn('Transport connect error', e);
|
|
6711
|
+
}));
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6701
6714
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6702
6715
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6703
6716
|
|
|
@@ -6919,6 +6932,7 @@ class WebRTCClient extends Emitter {
|
|
|
6919
6932
|
conference,
|
|
6920
6933
|
audioOnly,
|
|
6921
6934
|
},
|
|
6935
|
+
earlyMedia: true,
|
|
6922
6936
|
};
|
|
6923
6937
|
|
|
6924
6938
|
if (audioOnly) {
|
|
@@ -13282,10 +13296,15 @@ class Participant extends Emitter {
|
|
|
13282
13296
|
}
|
|
13283
13297
|
}
|
|
13284
13298
|
|
|
13285
|
-
broadcastStatus(inboundStatus = null) {
|
|
13299
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
13286
13300
|
const status = inboundStatus || this.getStatus();
|
|
13287
13301
|
logger$2.info('broadcasting participant status', { callId: this.callId, status });
|
|
13288
13302
|
|
|
13303
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
13304
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
13305
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
13306
|
+
}
|
|
13307
|
+
|
|
13289
13308
|
this.room.sendSignal({
|
|
13290
13309
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
13291
13310
|
origin: this.callId,
|
|
@@ -13928,7 +13947,7 @@ class Room extends Emitter {
|
|
|
13928
13947
|
// callId is null, someone's requesting everyone's state;
|
|
13929
13948
|
// or callId is set and matches ours;
|
|
13930
13949
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
13931
|
-
this.localParticipant.broadcastStatus();
|
|
13950
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
13932
13951
|
}
|
|
13933
13952
|
|
|
13934
13953
|
// might as well update the requester's status
|
|
@@ -14030,7 +14049,7 @@ class Room extends Emitter {
|
|
|
14030
14049
|
|
|
14031
14050
|
this.connected = true;
|
|
14032
14051
|
|
|
14033
|
-
localParticipant.broadcastStatus();
|
|
14052
|
+
localParticipant.broadcastStatus(null, true);
|
|
14034
14053
|
|
|
14035
14054
|
// we're in the room, now let's request everyone's status
|
|
14036
14055
|
if (this.localParticipant) {
|
package/lib/service/CallApi.js
CHANGED
|
@@ -3872,6 +3872,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3872
3872
|
listPersonalContacts: (queryParams = null) =>
|
|
3873
3873
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3874
3874
|
|
|
3875
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3876
|
+
client
|
|
3877
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3878
|
+
.then(Contact.parsePersonal),
|
|
3879
|
+
|
|
3875
3880
|
addContact: (contact ) =>
|
|
3876
3881
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3877
3882
|
|
|
@@ -3942,6 +3942,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3942
3942
|
listPersonalContacts: (queryParams = null) =>
|
|
3943
3943
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3944
3944
|
|
|
3945
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3946
|
+
client
|
|
3947
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3948
|
+
.then(Contact.parsePersonal),
|
|
3949
|
+
|
|
3945
3950
|
addContact: (contact ) =>
|
|
3946
3951
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3947
3952
|
|
package/lib/simple/Auth.js
CHANGED
|
@@ -4618,6 +4618,8 @@ class CTIPhone extends Emitter {
|
|
|
4618
4618
|
}
|
|
4619
4619
|
|
|
4620
4620
|
useLocalVideoElement() {}
|
|
4621
|
+
|
|
4622
|
+
setMediaConstraints() {}
|
|
4621
4623
|
}
|
|
4622
4624
|
|
|
4623
4625
|
/* */
|
|
@@ -4795,6 +4797,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4795
4797
|
listPersonalContacts: (queryParams = null) =>
|
|
4796
4798
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4797
4799
|
|
|
4800
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4801
|
+
client
|
|
4802
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4803
|
+
.then(Contact.parsePersonal),
|
|
4804
|
+
|
|
4798
4805
|
addContact: (contact ) =>
|
|
4799
4806
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4800
4807
|
|
|
@@ -6877,6 +6884,12 @@ class WebRTCClient extends Emitter {
|
|
|
6877
6884
|
};
|
|
6878
6885
|
|
|
6879
6886
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6887
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6888
|
+
ua.transport.connectPromise.catch((e => {
|
|
6889
|
+
logger$9.warn('Transport connect error', e);
|
|
6890
|
+
}));
|
|
6891
|
+
}
|
|
6892
|
+
|
|
6880
6893
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6881
6894
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6882
6895
|
|
|
@@ -7098,6 +7111,7 @@ class WebRTCClient extends Emitter {
|
|
|
7098
7111
|
conference,
|
|
7099
7112
|
audioOnly,
|
|
7100
7113
|
},
|
|
7114
|
+
earlyMedia: true,
|
|
7101
7115
|
};
|
|
7102
7116
|
|
|
7103
7117
|
if (audioOnly) {
|
|
@@ -11973,10 +11987,15 @@ class Participant extends Emitter {
|
|
|
11973
11987
|
}
|
|
11974
11988
|
}
|
|
11975
11989
|
|
|
11976
|
-
broadcastStatus(inboundStatus = null) {
|
|
11990
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11977
11991
|
const status = inboundStatus || this.getStatus();
|
|
11978
11992
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11979
11993
|
|
|
11994
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11995
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11996
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11997
|
+
}
|
|
11998
|
+
|
|
11980
11999
|
this.room.sendSignal({
|
|
11981
12000
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11982
12001
|
origin: this.callId,
|
|
@@ -12619,7 +12638,7 @@ class Room$1 extends Emitter {
|
|
|
12619
12638
|
// callId is null, someone's requesting everyone's state;
|
|
12620
12639
|
// or callId is set and matches ours;
|
|
12621
12640
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12622
|
-
this.localParticipant.broadcastStatus();
|
|
12641
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12623
12642
|
}
|
|
12624
12643
|
|
|
12625
12644
|
// might as well update the requester's status
|
|
@@ -12721,7 +12740,7 @@ class Room$1 extends Emitter {
|
|
|
12721
12740
|
|
|
12722
12741
|
this.connected = true;
|
|
12723
12742
|
|
|
12724
|
-
localParticipant.broadcastStatus();
|
|
12743
|
+
localParticipant.broadcastStatus(null, true);
|
|
12725
12744
|
|
|
12726
12745
|
// we're in the room, now let's request everyone's status
|
|
12727
12746
|
if (this.localParticipant) {
|
|
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
|
|
4618
4618
|
useLocalVideoElement() {}
|
|
4619
|
+
|
|
4620
|
+
setMediaConstraints() {}
|
|
4619
4621
|
}
|
|
4620
4622
|
|
|
4621
4623
|
/* */
|
|
@@ -4793,6 +4795,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4793
4795
|
listPersonalContacts: (queryParams = null) =>
|
|
4794
4796
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4795
4797
|
|
|
4798
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4799
|
+
client
|
|
4800
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4801
|
+
.then(Contact.parsePersonal),
|
|
4802
|
+
|
|
4796
4803
|
addContact: (contact ) =>
|
|
4797
4804
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4798
4805
|
|
|
@@ -6875,6 +6882,12 @@ class WebRTCClient extends Emitter {
|
|
|
6875
6882
|
};
|
|
6876
6883
|
|
|
6877
6884
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6885
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6886
|
+
ua.transport.connectPromise.catch((e => {
|
|
6887
|
+
logger$9.warn('Transport connect error', e);
|
|
6888
|
+
}));
|
|
6889
|
+
}
|
|
6890
|
+
|
|
6878
6891
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6879
6892
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6880
6893
|
|
|
@@ -7096,6 +7109,7 @@ class WebRTCClient extends Emitter {
|
|
|
7096
7109
|
conference,
|
|
7097
7110
|
audioOnly,
|
|
7098
7111
|
},
|
|
7112
|
+
earlyMedia: true,
|
|
7099
7113
|
};
|
|
7100
7114
|
|
|
7101
7115
|
if (audioOnly) {
|
|
@@ -11971,10 +11985,15 @@ class Participant extends Emitter {
|
|
|
11971
11985
|
}
|
|
11972
11986
|
}
|
|
11973
11987
|
|
|
11974
|
-
broadcastStatus(inboundStatus = null) {
|
|
11988
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11975
11989
|
const status = inboundStatus || this.getStatus();
|
|
11976
11990
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11977
11991
|
|
|
11992
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11993
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11994
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11995
|
+
}
|
|
11996
|
+
|
|
11978
11997
|
this.room.sendSignal({
|
|
11979
11998
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11980
11999
|
origin: this.callId,
|
|
@@ -12617,7 +12636,7 @@ class Room$1 extends Emitter {
|
|
|
12617
12636
|
// callId is null, someone's requesting everyone's state;
|
|
12618
12637
|
// or callId is set and matches ours;
|
|
12619
12638
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12620
|
-
this.localParticipant.broadcastStatus();
|
|
12639
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12621
12640
|
}
|
|
12622
12641
|
|
|
12623
12642
|
// might as well update the requester's status
|
|
@@ -12719,7 +12738,7 @@ class Room$1 extends Emitter {
|
|
|
12719
12738
|
|
|
12720
12739
|
this.connected = true;
|
|
12721
12740
|
|
|
12722
|
-
localParticipant.broadcastStatus();
|
|
12741
|
+
localParticipant.broadcastStatus(null, true);
|
|
12723
12742
|
|
|
12724
12743
|
// we're in the room, now let's request everyone's status
|
|
12725
12744
|
if (this.localParticipant) {
|
package/lib/simple/Directory.js
CHANGED
|
@@ -3940,6 +3940,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
3940
3940
|
listPersonalContacts: (queryParams = null) =>
|
|
3941
3941
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
3942
3942
|
|
|
3943
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
3944
|
+
client
|
|
3945
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
3946
|
+
.then(Contact.parsePersonal),
|
|
3947
|
+
|
|
3943
3948
|
addContact: (contact ) =>
|
|
3944
3949
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
3945
3950
|
|
package/lib/simple/Phone.js
CHANGED
|
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
|
|
4618
4618
|
useLocalVideoElement() {}
|
|
4619
|
+
|
|
4620
|
+
setMediaConstraints() {}
|
|
4619
4621
|
}
|
|
4620
4622
|
|
|
4621
4623
|
/* */
|
|
@@ -4793,6 +4795,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4793
4795
|
listPersonalContacts: (queryParams = null) =>
|
|
4794
4796
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4795
4797
|
|
|
4798
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4799
|
+
client
|
|
4800
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4801
|
+
.then(Contact.parsePersonal),
|
|
4802
|
+
|
|
4796
4803
|
addContact: (contact ) =>
|
|
4797
4804
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4798
4805
|
|
|
@@ -6875,6 +6882,12 @@ class WebRTCClient extends Emitter {
|
|
|
6875
6882
|
};
|
|
6876
6883
|
|
|
6877
6884
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6885
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6886
|
+
ua.transport.connectPromise.catch((e => {
|
|
6887
|
+
logger$9.warn('Transport connect error', e);
|
|
6888
|
+
}));
|
|
6889
|
+
}
|
|
6890
|
+
|
|
6878
6891
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6879
6892
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6880
6893
|
|
|
@@ -7096,6 +7109,7 @@ class WebRTCClient extends Emitter {
|
|
|
7096
7109
|
conference,
|
|
7097
7110
|
audioOnly,
|
|
7098
7111
|
},
|
|
7112
|
+
earlyMedia: true,
|
|
7099
7113
|
};
|
|
7100
7114
|
|
|
7101
7115
|
if (audioOnly) {
|
|
@@ -11884,10 +11898,15 @@ class Participant extends Emitter {
|
|
|
11884
11898
|
}
|
|
11885
11899
|
}
|
|
11886
11900
|
|
|
11887
|
-
broadcastStatus(inboundStatus = null) {
|
|
11901
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11888
11902
|
const status = inboundStatus || this.getStatus();
|
|
11889
11903
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11890
11904
|
|
|
11905
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11906
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11907
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11908
|
+
}
|
|
11909
|
+
|
|
11891
11910
|
this.room.sendSignal({
|
|
11892
11911
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11893
11912
|
origin: this.callId,
|
|
@@ -12530,7 +12549,7 @@ class Room$1 extends Emitter {
|
|
|
12530
12549
|
// callId is null, someone's requesting everyone's state;
|
|
12531
12550
|
// or callId is set and matches ours;
|
|
12532
12551
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12533
|
-
this.localParticipant.broadcastStatus();
|
|
12552
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12534
12553
|
}
|
|
12535
12554
|
|
|
12536
12555
|
// might as well update the requester's status
|
|
@@ -12632,7 +12651,7 @@ class Room$1 extends Emitter {
|
|
|
12632
12651
|
|
|
12633
12652
|
this.connected = true;
|
|
12634
12653
|
|
|
12635
|
-
localParticipant.broadcastStatus();
|
|
12654
|
+
localParticipant.broadcastStatus(null, true);
|
|
12636
12655
|
|
|
12637
12656
|
// we're in the room, now let's request everyone's status
|
|
12638
12657
|
if (this.localParticipant) {
|
package/lib/simple/index.js
CHANGED
|
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
|
|
4618
4618
|
useLocalVideoElement() {}
|
|
4619
|
+
|
|
4620
|
+
setMediaConstraints() {}
|
|
4619
4621
|
}
|
|
4620
4622
|
|
|
4621
4623
|
/* */
|
|
@@ -4793,6 +4795,11 @@ var dirdMethods = (client , baseUrl ) => ({
|
|
|
4793
4795
|
listPersonalContacts: (queryParams = null) =>
|
|
4794
4796
|
client.get(`${baseUrl}/personal`, queryParams).then(response => Contact.parseManyPersonal(response.items)),
|
|
4795
4797
|
|
|
4798
|
+
fetchPersonalContact: (contactUuid ) =>
|
|
4799
|
+
client
|
|
4800
|
+
.get(`${baseUrl}/personal/${contactUuid}`)
|
|
4801
|
+
.then(Contact.parsePersonal),
|
|
4802
|
+
|
|
4796
4803
|
addContact: (contact ) =>
|
|
4797
4804
|
client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
4798
4805
|
|
|
@@ -7206,6 +7213,12 @@ class WebRTCClient extends Emitter {
|
|
|
7206
7213
|
};
|
|
7207
7214
|
|
|
7208
7215
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
7216
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7217
|
+
ua.transport.connectPromise.catch((e => {
|
|
7218
|
+
logger$8.warn('Transport connect error', e);
|
|
7219
|
+
}));
|
|
7220
|
+
}
|
|
7221
|
+
|
|
7209
7222
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7210
7223
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7211
7224
|
|
|
@@ -7427,6 +7440,7 @@ class WebRTCClient extends Emitter {
|
|
|
7427
7440
|
conference,
|
|
7428
7441
|
audioOnly,
|
|
7429
7442
|
},
|
|
7443
|
+
earlyMedia: true,
|
|
7430
7444
|
};
|
|
7431
7445
|
|
|
7432
7446
|
if (audioOnly) {
|
|
@@ -12302,10 +12316,15 @@ class Participant extends Emitter {
|
|
|
12302
12316
|
}
|
|
12303
12317
|
}
|
|
12304
12318
|
|
|
12305
|
-
broadcastStatus(inboundStatus = null) {
|
|
12319
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12306
12320
|
const status = inboundStatus || this.getStatus();
|
|
12307
12321
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12308
12322
|
|
|
12323
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12324
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12325
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12326
|
+
}
|
|
12327
|
+
|
|
12309
12328
|
this.room.sendSignal({
|
|
12310
12329
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12311
12330
|
origin: this.callId,
|
|
@@ -12948,7 +12967,7 @@ class Room$1 extends Emitter {
|
|
|
12948
12967
|
// callId is null, someone's requesting everyone's state;
|
|
12949
12968
|
// or callId is set and matches ours;
|
|
12950
12969
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12951
|
-
this.localParticipant.broadcastStatus();
|
|
12970
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12952
12971
|
}
|
|
12953
12972
|
|
|
12954
12973
|
// might as well update the requester's status
|
|
@@ -13050,7 +13069,7 @@ class Room$1 extends Emitter {
|
|
|
13050
13069
|
|
|
13051
13070
|
this.connected = true;
|
|
13052
13071
|
|
|
13053
|
-
localParticipant.broadcastStatus();
|
|
13072
|
+
localParticipant.broadcastStatus(null, true);
|
|
13054
13073
|
|
|
13055
13074
|
// we're in the room, now let's request everyone's status
|
|
13056
13075
|
if (this.localParticipant) {
|