@vgroup/dialbox 0.2.57 → 0.2.59
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/esm2020/lib/components/call-progress/call-progress.component.mjs +6 -3
- package/esm2020/lib/service/extension.service.mjs +17 -20
- package/fesm2015/vgroup-dialbox.mjs +23 -21
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +21 -21
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/lib/service/extension.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -594,27 +594,14 @@ class ExtensionService {
|
|
|
594
594
|
const httpOptions = { headers: new HttpHeaders(params) };
|
|
595
595
|
return this.http.post(environment.apiUrl + '/utilities/ext/ur/generate/conference/token', payload, httpOptions);
|
|
596
596
|
}
|
|
597
|
-
// getConferenceCallToken(payload: any) {
|
|
598
|
-
// console.log(payload, 'payload');
|
|
599
|
-
// const params = {
|
|
600
|
-
// 'Content-Type': 'application/json',
|
|
601
|
-
// 'Auth-Key': "Bearer " + localStorage.getItem('ext_token'),
|
|
602
|
-
// 'c2c-request': window.location.hostname
|
|
603
|
-
// }
|
|
604
|
-
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
605
|
-
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/generate/token', payload, httpOptions);
|
|
606
|
-
// }
|
|
607
|
-
// addFirstParticipant(payload: any){
|
|
608
|
-
// const params = {
|
|
609
|
-
// conferenceId: payload.conferenceId,
|
|
610
|
-
// participantNumber: payload.participantNumber
|
|
611
|
-
// }
|
|
612
|
-
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
613
|
-
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/add/participant', payload, httpOptions);
|
|
614
|
-
// }
|
|
615
597
|
addParticipant(payload) {
|
|
598
|
+
const headers = new HttpHeaders({
|
|
599
|
+
'Content-Type': 'application/json',
|
|
600
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
601
|
+
});
|
|
602
|
+
const httpOptions = { headers: headers };
|
|
616
603
|
console.log(payload, 'payload');
|
|
617
|
-
return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload);
|
|
604
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload, httpOptions);
|
|
618
605
|
}
|
|
619
606
|
// getAllParticipants(id:any, payload: any) {
|
|
620
607
|
// const params = {
|
|
@@ -640,6 +627,16 @@ class ExtensionService {
|
|
|
640
627
|
const httpOptions = { headers: new HttpHeaders(params) };
|
|
641
628
|
return this.http.post(environment.apiUrl + '/update/hold/unhold', params, httpOptions);
|
|
642
629
|
}
|
|
630
|
+
getCallStatusOfParticipants(participantId) {
|
|
631
|
+
const params = {};
|
|
632
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
633
|
+
return this.http.get(environment.apiUrl + `/utilities/ext/ur/call/status/participant/${participantId}`, httpOptions);
|
|
634
|
+
}
|
|
635
|
+
muteParticipant() {
|
|
636
|
+
const params = {};
|
|
637
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
638
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/ur/mute/participant', httpOptions);
|
|
639
|
+
}
|
|
643
640
|
fetchBlockedCountries() {
|
|
644
641
|
return this.http.get(environment.apiUrl + '/global/master/ur/blacklisted/countrylist').pipe(map(response => {
|
|
645
642
|
if (response.response === 'Success' && Array.isArray(response.countries)) {
|
|
@@ -2118,15 +2115,15 @@ class CallProgressComponent {
|
|
|
2118
2115
|
this.getUserInformation(callAuthId);
|
|
2119
2116
|
this.recordCall = recordCall; // Store the recordCall value
|
|
2120
2117
|
const tokenData = await this.getOutgoingCallToken(callAuthId);
|
|
2118
|
+
await this.connectToDevice(tokenData.token, callData);
|
|
2119
|
+
this.pollCallStatus(callAuthId);
|
|
2121
2120
|
await this.addParticipantToCall({
|
|
2122
2121
|
from: callData?.from,
|
|
2123
2122
|
route: "OUTGOING",
|
|
2124
2123
|
participantNumber: callData?.phone,
|
|
2125
2124
|
conferenceId: response?.callauth?.id
|
|
2126
2125
|
});
|
|
2127
|
-
await this.connectToDevice(tokenData.token, callData);
|
|
2128
2126
|
// Poll the status for 30-45 seconds
|
|
2129
|
-
this.pollCallStatus(callAuthId);
|
|
2130
2127
|
}
|
|
2131
2128
|
else if (response.status == 201) {
|
|
2132
2129
|
swal("Error", response.message.join("<br/>"), "error");
|
|
@@ -2147,6 +2144,9 @@ class CallProgressComponent {
|
|
|
2147
2144
|
async addParticipantToCall(payload) {
|
|
2148
2145
|
return await this.extensionService.addParticipant(payload).toPromise();
|
|
2149
2146
|
}
|
|
2147
|
+
async getCallStatusOfParticipants(participantId) {
|
|
2148
|
+
return await this.extensionService.getCallStatusOfParticipants(participantId).toPromise();
|
|
2149
|
+
}
|
|
2150
2150
|
async getCallAuthId(response) {
|
|
2151
2151
|
return {
|
|
2152
2152
|
id: response.callauth.id,
|