@vgroup/dialbox 0.2.48 → 0.2.49
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 -14
- package/fesm2015/vgroup-dialbox.mjs +20 -17
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +18 -13
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -2116,13 +2116,13 @@ class CallProgressComponent {
|
|
|
2116
2116
|
};
|
|
2117
2117
|
const response = await this.initiateCall(payload);
|
|
2118
2118
|
if (response.status == 200) {
|
|
2119
|
-
const {
|
|
2120
|
-
this.getUserInformation(
|
|
2121
|
-
this.recordCall = recordCall; // Store the recordCall value
|
|
2122
|
-
const tokenData = await this.getOutgoingCallToken(
|
|
2119
|
+
const { authId } = await this.getConferenceCallToken(response);
|
|
2120
|
+
this.getUserInformation(authId);
|
|
2121
|
+
// this.recordCall = recordCall; // Store the recordCall value
|
|
2122
|
+
const tokenData = await this.getOutgoingCallToken(authId);
|
|
2123
2123
|
await this.connectToDevice(tokenData.token, callData);
|
|
2124
2124
|
// Poll the status for 30-45 seconds
|
|
2125
|
-
this.pollCallStatus(
|
|
2125
|
+
this.pollCallStatus(authId);
|
|
2126
2126
|
}
|
|
2127
2127
|
else if (response.status == 201) {
|
|
2128
2128
|
swal("Error", response.message.join("<br/>"), "error");
|
|
@@ -2140,10 +2140,15 @@ class CallProgressComponent {
|
|
|
2140
2140
|
async initiateCall(payload) {
|
|
2141
2141
|
return await this.extensionService.initiateCall(payload).toPromise();
|
|
2142
2142
|
}
|
|
2143
|
-
async getCallAuthId(response) {
|
|
2143
|
+
// private async getCallAuthId(response: any) {
|
|
2144
|
+
// return {
|
|
2145
|
+
// id: response.callauth.id,
|
|
2146
|
+
// recordCall: response.callauth.recordCall
|
|
2147
|
+
// };
|
|
2148
|
+
// }
|
|
2149
|
+
getConferenceCallToken(response) {
|
|
2144
2150
|
return {
|
|
2145
|
-
|
|
2146
|
-
recordCall: response.callauth.recordCall
|
|
2151
|
+
authId: response.callauth.id,
|
|
2147
2152
|
};
|
|
2148
2153
|
}
|
|
2149
2154
|
async getOutgoingCallToken(callAuthId) {
|
|
@@ -2367,10 +2372,10 @@ class CallProgressComponent {
|
|
|
2367
2372
|
};
|
|
2368
2373
|
const response = await this.initiateCall(payload);
|
|
2369
2374
|
if (response.status == 200) {
|
|
2370
|
-
const {
|
|
2371
|
-
this.getUserInformation(
|
|
2372
|
-
this.recordCall = recordCall;
|
|
2373
|
-
const tokenData = await this.getOutgoingCallToken(
|
|
2375
|
+
const { authId } = await this.getConferenceCallToken(response);
|
|
2376
|
+
this.getUserInformation(authId);
|
|
2377
|
+
// this.recordCall = recordCall;
|
|
2378
|
+
const tokenData = await this.getOutgoingCallToken(authId);
|
|
2374
2379
|
// Connect to new call
|
|
2375
2380
|
const options = {
|
|
2376
2381
|
codecPreferences: ['opus', 'pcmu'],
|
|
@@ -2408,7 +2413,7 @@ class CallProgressComponent {
|
|
|
2408
2413
|
// Setup event listeners for new call
|
|
2409
2414
|
this.setupEventListeners();
|
|
2410
2415
|
// Poll call status
|
|
2411
|
-
this.pollCallStatus(
|
|
2416
|
+
this.pollCallStatus(authId);
|
|
2412
2417
|
console.log('New call initiated to:', phoneNumber);
|
|
2413
2418
|
this.cdr.detectChanges();
|
|
2414
2419
|
}
|