@vgroup/dialbox 0.2.53 → 0.2.55
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 +19 -5
- package/esm2020/lib/service/extension.service.mjs +2 -8
- package/fesm2015/vgroup-dialbox.mjs +22 -11
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +19 -11
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -613,13 +613,7 @@ class ExtensionService {
|
|
|
613
613
|
return this.http.post(environment.apiUrl + '/add/first/participant', payload, httpOptions);
|
|
614
614
|
}
|
|
615
615
|
addParticipant(payload) {
|
|
616
|
-
|
|
617
|
-
"conferenceId": payload.conferenceId,
|
|
618
|
-
"conferenceSid": payload.conferenceSid,
|
|
619
|
-
"participantNumber": payload.participantNumber
|
|
620
|
-
};
|
|
621
|
-
const httpOptions = { headers: new HttpHeaders(params) };
|
|
622
|
-
return this.http.post(environment.apiUrl + '/add/participant', payload, httpOptions);
|
|
616
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload);
|
|
623
617
|
}
|
|
624
618
|
// getAllParticipants(id:any, payload: any) {
|
|
625
619
|
// const params = {
|
|
@@ -2106,14 +2100,15 @@ class CallProgressComponent {
|
|
|
2106
2100
|
});
|
|
2107
2101
|
}
|
|
2108
2102
|
async startCall(callData) {
|
|
2103
|
+
console.log(callData, 'callData');
|
|
2109
2104
|
try {
|
|
2110
2105
|
this.showRingAnimation = true;
|
|
2111
2106
|
const payload = {
|
|
2112
2107
|
channelId: environment.channelId,
|
|
2113
2108
|
userId: localStorage.getItem('userId'),
|
|
2114
2109
|
to: callData.phone,
|
|
2110
|
+
fromNumber: callData.from,
|
|
2115
2111
|
scope: 'local',
|
|
2116
|
-
fromNumber: callData.from
|
|
2117
2112
|
};
|
|
2118
2113
|
const response = await this.initiateCall(payload);
|
|
2119
2114
|
if (response.status == 200) {
|
|
@@ -2121,9 +2116,19 @@ class CallProgressComponent {
|
|
|
2121
2116
|
this.getUserInformation(callAuthId);
|
|
2122
2117
|
this.recordCall = recordCall; // Store the recordCall value
|
|
2123
2118
|
const tokenData = await this.getOutgoingCallToken(callAuthId);
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2119
|
+
if (tokenData.status == 200) {
|
|
2120
|
+
setTimeout(async () => {
|
|
2121
|
+
await this.addParticipantToCall({
|
|
2122
|
+
from: callData?.from,
|
|
2123
|
+
route: "OUTGOING",
|
|
2124
|
+
participantNumber: callData?.phone,
|
|
2125
|
+
conferenceId: response?.callauth?.id
|
|
2126
|
+
});
|
|
2127
|
+
await this.connectToDevice(tokenData.token, callData);
|
|
2128
|
+
// Poll the status for 30-45 seconds
|
|
2129
|
+
this.pollCallStatus(callAuthId);
|
|
2130
|
+
}, 1300);
|
|
2131
|
+
}
|
|
2127
2132
|
}
|
|
2128
2133
|
else if (response.status == 201) {
|
|
2129
2134
|
swal("Error", response.message.join("<br/>"), "error");
|
|
@@ -2141,6 +2146,9 @@ class CallProgressComponent {
|
|
|
2141
2146
|
async initiateCall(payload) {
|
|
2142
2147
|
return await this.extensionService.initiateCall(payload).toPromise();
|
|
2143
2148
|
}
|
|
2149
|
+
async addParticipantToCall(payload) {
|
|
2150
|
+
return await this.extensionService.addParticipant(payload).toPromise();
|
|
2151
|
+
}
|
|
2144
2152
|
async getCallAuthId(response) {
|
|
2145
2153
|
return {
|
|
2146
2154
|
id: response.callauth.id,
|