I need to assign incoming calls to the last extension that called. Unfortunately 3cx does not record calls except those answered. Is it possible to record even unanswered calls?
You will have to enter the information for calls not answered into MySQL yourself. One option is to monitor the CDR files. Every call, whether answered or not, causes 3CX to create a CDR file. You would need to parse the information in the CDR file and put the data into your database.
If monitoring and parsing the CDR files is too big of a hassle (especially for hosted 3CX servers), you may want to take a look at our 3CX Exporter tool. This tool can, in real-time, monitor for new CDR files, parse them, and put the data directly into MySQL even if the 3CX server is hosted.