@vgroup/dialbox 0.2.49 → 0.2.50
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.
|
@@ -538,26 +538,6 @@ class ExtensionService {
|
|
|
538
538
|
const httpOptions = { headers: new HttpHeaders(params) };
|
|
539
539
|
return this.http.put(environment.apiUrl + '/utilities/softphone/update/callerid/label', dtModel, httpOptions);
|
|
540
540
|
}
|
|
541
|
-
initiateCall(payload) {
|
|
542
|
-
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
543
|
-
return this.ipAddressService.getIpAddressInfo().pipe(switchMap(ipAddressInfo => {
|
|
544
|
-
const params = {
|
|
545
|
-
'Content-Type': 'application/json',
|
|
546
|
-
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
547
|
-
'ip-address': ipAddressInfo.ip,
|
|
548
|
-
'ip-country': ipAddressInfo.address.country,
|
|
549
|
-
};
|
|
550
|
-
payload = { ...payload, proxy: ipAddressInfo.proxy.toString() };
|
|
551
|
-
const httpOptions = { headers: new HttpHeaders(params) };
|
|
552
|
-
return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(catchError(error => {
|
|
553
|
-
return throwError(error);
|
|
554
|
-
}));
|
|
555
|
-
}), catchError(error => {
|
|
556
|
-
// Catch error from getIpAddressInfo
|
|
557
|
-
return throwError(error);
|
|
558
|
-
}));
|
|
559
|
-
}));
|
|
560
|
-
}
|
|
561
541
|
// initiateCall(payload: any): Observable<any> {
|
|
562
542
|
// return this.fetchBlockedCountries().pipe(
|
|
563
543
|
// switchMap(blockedCountries => {
|
|
@@ -571,7 +551,7 @@ class ExtensionService {
|
|
|
571
551
|
// };
|
|
572
552
|
// payload = {...payload, proxy:ipAddressInfo.proxy.toString()}
|
|
573
553
|
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
574
|
-
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/initiate/
|
|
554
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(
|
|
575
555
|
// catchError(error => {
|
|
576
556
|
// return throwError(error);
|
|
577
557
|
// }),
|
|
@@ -585,6 +565,26 @@ class ExtensionService {
|
|
|
585
565
|
// })
|
|
586
566
|
// );
|
|
587
567
|
// }
|
|
568
|
+
initiateCall(payload) {
|
|
569
|
+
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
570
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap(ipAddressInfo => {
|
|
571
|
+
const params = {
|
|
572
|
+
'Content-Type': 'application/json',
|
|
573
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
574
|
+
'ip-address': ipAddressInfo.ip,
|
|
575
|
+
'ip-country': ipAddressInfo.address.country,
|
|
576
|
+
};
|
|
577
|
+
payload = { ...payload, proxy: ipAddressInfo.proxy.toString() };
|
|
578
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
579
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/conference/call', payload, httpOptions).pipe(catchError(error => {
|
|
580
|
+
return throwError(error);
|
|
581
|
+
}));
|
|
582
|
+
}), catchError(error => {
|
|
583
|
+
// Catch error from getIpAddressInfo
|
|
584
|
+
return throwError(error);
|
|
585
|
+
}));
|
|
586
|
+
}));
|
|
587
|
+
}
|
|
588
588
|
getConferenceCallToken(payload) {
|
|
589
589
|
const params = {
|
|
590
590
|
"conferenceId": payload.conferenceId,
|