How to setup a SFTP service to collect CDRs
Applies to:
Imagicle UCX Suite (any version).
Description:
How to setup and configure a SFTP server on the Imagicle UCX Suite to replace the default FTP server included in the Windows platform to achieve greater security in the communication from Calling Platform to the Imagicle server.
If Imagicle UCX Suite already includes a SFTP server and a software update to latest release is performed, our package setup installs and configures a new SFTP server, while just one server is used. In this case, we suggest to disable the alternative SFTP server.
Three alternative methods are described.
Embedded SFTP Server on Windows Server 2019 and above
Up to 2022.Spring.1 Imagicle release
With Windows server 2019, it is possible to install an SFTP server right from the Windows Apps and Features section. Please follow below procedure:
Go to Windows Settings-->Apps
Click on "Manage optional features" Under apps and features menu
Look for OpenSSH Server, check if it's already installed, if not click on "Add a feature" to install it.
Configuring OpenSSH server to start on Windows startup:
Go to Windows services and look for "OpenSSH Authentication Agent " and "OpenSSH SSH Server" services.
Change both services startup type to "Automatic", and make sure that they are both started.
Changing the root directory of OpenSSH server:
Browse to directory "C:\ProgramData\ssh" (hidden folder) and locate "sshd_config" file.
Look for #ChrootDirectory and modify that line to:
ChrootDirectory "C:\Program Files (x86)\StonevoiceAS\Apps\BillyBlues\Engine\ccm5cdr" and save the file.Restart the "OpenSSH SSH Server" service".
From 2022.Spring.2 Imagicle release and newer
No need to manually install SSH Server. This is already included in Imagicle package. Just proceed with next step.
SFTP Credentials
Create a local user, on the Windows server of the Imagicle VM or an Active Directory user if the server is joined to the domain, for instance:
username: imagiclesftp
password: B1llyBlues$
In CUCM, go to Unified serviceability-->Tools-->CDR management
Add a new billing application server that has the following parameters:
IP address: ip address of the Imagicle VM
username: imagiclesftp
password: B1llyBlues$
Directory Path: /
Click on "Add".
For older versions of Windows Server OS, you can choose among existing third party SFTP services. Below, two examples.
SFTP SERVER with Solarwinds
To enable SFTP we need to use a third-party tool named SFTP/SCP Server from Solarwinds.
Download SFTP/SCP Server from here , install it and setup it following on screen instructions.
Edit SFTP server parameters and configure root directory as: <StonevoiceAS>\Apps\BillyBlues\Engine\ccm5cdr
Add the userUsrname: imagicleSFTPPassword: imagicleSFTP
Go to the Windows Service Panel and change the Startup Type of "Solarwinds SFTP/SCP Server" from "Manual" to "Automatic"


CUCM Configuration
Go to Cisco Unified Serviceability | Tools | CDR Management
Add "Billing Application Server Parameters" with the following parameters:
Host Name/ IP Address: UCX Suite ip address
User Name: imagicleSFTP
Password: imagicleSFTP
Protocol: SFTP
Directory Path: /
SFTP SERVER with FreeFTPd
To enable SFTP we need to use a third-party tool named freeFTPd from Freesshd.
Download freeFTPd.exe daemon (version 1.0.13) from http://www.freesshd.com and setup it following on screen instructions.
The service must be appropriately configured, during setup it is necessary:
Confirm the creation of a private security key
Enable freeFTPd to run as a service.
After setting it up run the freeFTPd tool and:
Enable SFTP service only and configure root directory as: <StonevoiceAS>\Apps\BillyBlues\Engine\ccm5cdr

Remember to click on "Apply & Save" button and start the service with the "Start" button on the Server status row.
Define a user "imagicleSFTP" with authorization: "Password stored as SHA1 hash", home directory "$SERVERROOT" and enable SFTP server:

CUCM Configuration
Go to Cisco Unified Serviceability | Tools | CDR Management
Add "Billing Application Server Parameters" with the following parameters:
Host Name/ IP Address: UCX Suite ip address
User Name: imagicleSFTP
Password: imagicleSFTP
Protocol: SFTP
Directory Path: /