@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
|
@@ -614,13 +614,7 @@ class ExtensionService {
|
|
|
614
614
|
return this.http.post(environment.apiUrl + '/add/first/participant', payload, httpOptions);
|
|
615
615
|
}
|
|
616
616
|
addParticipant(payload) {
|
|
617
|
-
|
|
618
|
-
"conferenceId": payload.conferenceId,
|
|
619
|
-
"conferenceSid": payload.conferenceSid,
|
|
620
|
-
"participantNumber": payload.participantNumber
|
|
621
|
-
};
|
|
622
|
-
const httpOptions = { headers: new HttpHeaders(params) };
|
|
623
|
-
return this.http.post(environment.apiUrl + '/add/participant', payload, httpOptions);
|
|
617
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload);
|
|
624
618
|
}
|
|
625
619
|
// getAllParticipants(id:any, payload: any) {
|
|
626
620
|
// const params = {
|
|
@@ -2110,14 +2104,15 @@ class CallProgressComponent {
|
|
|
2110
2104
|
}
|
|
2111
2105
|
startCall(callData) {
|
|
2112
2106
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2107
|
+
console.log(callData, 'callData');
|
|
2113
2108
|
try {
|
|
2114
2109
|
this.showRingAnimation = true;
|
|
2115
2110
|
const payload = {
|
|
2116
2111
|
channelId: environment.channelId,
|
|
2117
2112
|
userId: localStorage.getItem('userId'),
|
|
2118
2113
|
to: callData.phone,
|
|
2114
|
+
fromNumber: callData.from,
|
|
2119
2115
|
scope: 'local',
|
|
2120
|
-
fromNumber: callData.from
|
|
2121
2116
|
};
|
|
2122
2117
|
const response = yield this.initiateCall(payload);
|
|
2123
2118
|
if (response.status == 200) {
|
|
@@ -2125,9 +2120,20 @@ class CallProgressComponent {
|
|
|
2125
2120
|
this.getUserInformation(callAuthId);
|
|
2126
2121
|
this.recordCall = recordCall; // Store the recordCall value
|
|
2127
2122
|
const tokenData = yield this.getOutgoingCallToken(callAuthId);
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2123
|
+
if (tokenData.status == 200) {
|
|
2124
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
2125
|
+
var _a;
|
|
2126
|
+
yield this.addParticipantToCall({
|
|
2127
|
+
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2128
|
+
route: "OUTGOING",
|
|
2129
|
+
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2130
|
+
conferenceId: (_a = response === null || response === void 0 ? void 0 : response.callauth) === null || _a === void 0 ? void 0 : _a.id
|
|
2131
|
+
});
|
|
2132
|
+
yield this.connectToDevice(tokenData.token, callData);
|
|
2133
|
+
// Poll the status for 30-45 seconds
|
|
2134
|
+
this.pollCallStatus(callAuthId);
|
|
2135
|
+
}), 1300);
|
|
2136
|
+
}
|
|
2131
2137
|
}
|
|
2132
2138
|
else if (response.status == 201) {
|
|
2133
2139
|
swal("Error", response.message.join("<br/>"), "error");
|
|
@@ -2148,6 +2154,11 @@ class CallProgressComponent {
|
|
|
2148
2154
|
return yield this.extensionService.initiateCall(payload).toPromise();
|
|
2149
2155
|
});
|
|
2150
2156
|
}
|
|
2157
|
+
addParticipantToCall(payload) {
|
|
2158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2159
|
+
return yield this.extensionService.addParticipant(payload).toPromise();
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2151
2162
|
getCallAuthId(response) {
|
|
2152
2163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2153
2164
|
return {
|