All valid suggestions above.
However, I would offer one small caution about using an IP socket connection as a means of collecting CDR data. In the old days when the phone system and hotel management system were on the same network (rather than separated by the internet), maybe it was feasible to use this approach of transferring data. But today many phone systems are hosted in the cloud and rely on the internet to connect the two systems together. While we all applaud the convenience of SIP trunks (that is what we use exclusively), the internet is not as reliable as a local connection.
The risk with a socket connection is the potential for the connection to drop either because of an internet drop, a software upgrade, or a server reboot, etc. With a socket connection there is no "retry" process after a failed connection is restored. That means any calls that took place during the outage will be lost with no ability to catch up later.
In contrast, CDR
files (barring a hard disk failure) are always available and provide a means to "catch up" after a connection failure. Originally I thought it might not be a huge problem if one or two calls were lost, but my position on this has changed based on customer feedback. If, for example, one of our wallboards do not match 3CX reports exactly people freak out. So, in my experience, the files are a safer, recoverable approach.
There are certainly commercial applications available for automating the copying of files. Perhaps FileZilla can do it in an automated way? I have not tried.
Another option is to take a look at our
3CX Exporter tool. Our tool detects when new CDR files are created in real-time and grabs the files, parses the data, and saves the data in Microsoft SQL, MySQL or MariaDB automatically. And, as I said, if you have an outage (server reboot, software upgrade, etc.) the second the connection comes back up it will "catch up" with any missed transactions. So, real-time data, auto-recovery, completely automated, and designed specifically for 3CX (Windows or Linux). What's not to like?