@vgroup/dialbox 0.4.150 → 0.4.151

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.
@@ -726,9 +726,15 @@ class ExtensionService {
726
726
  'Content-Type': 'application/json',
727
727
  'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
728
728
  });
729
- const httpOptions = { headers: headers };
730
- payload = { ...payload, ipAddress: this.ipAddressInfo?.ip, ipCountry: this.ipAddressInfo?.country };
731
- return this.http.post(environment.apiUrl + `/utilities/twilio/incoming/conference/ip`, payload, httpOptions);
729
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
730
+ const httpOptions = { headers: headers };
731
+ payload = { ...payload, ipAddress: ipAddressInfo?.ip, ipCountry: ipAddressInfo?.country };
732
+ return this.http.post(environment.apiUrl + `/utilities/twilio/incoming/conference/ip`, payload, httpOptions);
733
+ }), catchError((error) => {
734
+ // Properly catch errors
735
+ return throwError(error);
736
+ }));
737
+ // return this.http.post(environment.apiUrl + `/utilities/twilio/incoming/conference/ip`, payload, httpOptions);
732
738
  }
733
739
  //sms api
734
740
  sendSms(c2c_latlong, c2c_request, dtModel) {