It is possible sending files to a remote Reseller using the WebDav protocol. WebDAV is a standard protocol based on HTTP connections, so it has encryption by default (using HTTPS), and it can pass through firewalls.
customizations/ExportToFoo.php
like this
class ExportToFoo extends ExportCDRSToReseller { /** * @return string */ function getResellerCode() { return 'foo'; } public function getActivationDate() { // NOTE: before this date the info is manually sent, retrieving from the historic data. // From this data the info is sent live, the rates are aligned. return strtotime('2017-01-01'); } }
customizations/ExportServicesToFoo.php
like this
class ExportServicesToFoo extends ExportServiceCDRSToReseller { /** * @return string */ function getResellerCode() { return 'foo'; } public function getActivationDate() { // NOTE: before this date the info is manually sent, retrieving from the historic data. // From this data the info is sent live, the rates are aligned. return strtotime('2017-01-01'); } }
fabric_data/asterisell_instances.py
custom_files = { 'ExportToFoo':'apps/asterisell/lib/jobs/customizations', 'ExportServicesToFoo':'apps/asterisell/lib/jobs/customizations' } custom_export_jobs = [ 'ExportToFoo', 'ExportServicesToFoo' ] webdav_users = [('foo','some-password')]
https://provider-url/get-foo
You can inspect the /etc/nginx/
configurations inside the Asterisell instance.
class FooImportCDRSFromBar extends ImportCDRSFromRemoteAsterisellProvider { function getConnectionName() { return 'bar'; } function getCDRProviderName() { return 'bar'; } function skipSSLCertificateVerify() { return true; } }
custom_files = { 'FooImportCDRSFromBar':'apps/asterisell/lib/jobs/customizations' } import_cdrs_jobs = [ 'FooImportCDRSFromBar' ] def conf_connection_params(self): r = [] c = lib.ConnectionParams() c.connection_name = 'bar' c.user = 'foo' c.password = self.get_password_for('bar-foo') c.host = 'http://local-ip/admin/get-foo/' c.port = '8001' r.append(c) return r
class FooImportCDRSFromBar extends ImportCDRSFromRemoteAsterisellProvider { function getConnectionName() { return 'bar'; } function getCDRProviderName() { return 'bar'; } function skipSSLCertificateVerify() { return false; } }
custom_files = { 'FooImportCDRSFromBar':'apps/asterisell/lib/jobs/customizations' } import_cdrs_jobs = [ 'FooImportCDRSFromBar' ] def conf_connection_params(self): r = [] c = lib.ConnectionParams() c.connection_name = "bar" c.user = "foo" c.password = self.get_password_for('bar-foo') c.host = 'https://provider-url/admin/get-foo/' c.port = '443' r.append(c) return r
curl -v --basic --user foo:some-password https://provider-url/admin/get-foo/is_asterisell_directory.chk
--insecure
for debugging SSL certificate problems.