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