Introduction #
Creating custom records and archiving Call Detail Records was once a difficult task. However, 3CX Exporter has now made the job easy for you. Moving Call Detail Records from 3CX to SQL Server or MySQL reduces the demands on your 3CX server, and allows you to use the tools you already know to create custom reports.
What is 3CX Exporter? #
3CX Exporter automates the export of Call Detail Records (CDR) from 3CX’s internal PostgreSQL database to either Microsoft SQL server or MySQL. This small Windows service runs automatically in the background to keep your external database in sync with the data in 3CX.
Why 3CX Exporter? #
- Make it possible to create custom reports.
- To integrate (utilize) that data in other applications (like CRM integrations).
How to use 3CX Exporter? #
3CX Exporter is a onetime installation process. Once you install it, the product will automate the export of Call Detail Records according to the export frequency you set during the installation process. However, in future, you can change both the export frequency and database as well.
Prerequisites #
Before installing 3CX Exporter, you need to ensure that your computer meets the minimum requirements mentioned below:
- 3CX Version V18
- Windows 10 or above
- Microsoft SQL Server 2014 or above (Including the free SQL Express edition), or MYSQL
- Windows Server 2012 (64-bit) or above
- .Net 4.7.2
- If you are installing 3CX Exporter in a server other than 3CX Server, then you should install ‘C++ 2010 redistribution package (X86)’ in the 3CX Server. You can install it from the link: https://my.visualstudio.com/Downloads?pid=963
- 3CX Relay Service
- Installation on a domain controller may require additional assistance
Installation #
![]() | Download software | You can order 3CX Exporter on-line at https://www.voiptools.com. Your order confirmation email will include your license key and a link to download the software. |
![]() | Install Prerequisites | There are a number of prerequisites that must be installed prior to installing 3CX Exporter. These prerequisites include Microsoft SQL Server. |
![]() | Install 3CX Auuto Logout | This User Guide contains step-by-step instructions to successfully install 3CX Exporter. Begin by extracting the installer from the downloaded zip file (Step 1 above), then run the setup program named 3cxExporterInstaller.exe |
![]() | Register your License Key | You must register your license key to activate 3CX Exporter. Your license key is included in your order confirmation email, and can also be found in your order history on our website. |
NOTE:
- When installing SQL Server, we recommend you install it in “Mixed Mode” to include SQL Authentication, and install SQL Management Studio
- When installing IIS, be sure to install Basic Authentication, .Net Extensibility, and ASP.Net 4.X
Step by step Installation Procedure #
The following section guides you through a detailed walk-through of the installation process:
Step 1: Download ‘3CX Exporter’. #
- Find the software download link in the Order Confirmation Email, or you can find it in your order history on our website and download the 3CX Exporter application.
- In the Microsoft Defender SmartScreen, click the More Info option.
- Click the Run Anyway option to start the installation.
Step 2: Install Prerequisites #
Click on the software installer that was downloaded in step 1 above. The installation wizard will automatically identify the needed prerequisites and assist you with the install of the prerequisites needed to run ‘3CX Exporter’. These include .NET Framework (Web Installer), SQL Server Express (Web Installer) and, SQL Server Management Studio.
- Click the downloaded installer executable to launch the Prerequisites Setup Wizard and click Next.
- In the Prerequisites window, the installer will identify the missing prerequisites. It is important that you install all the required prerequisites. However, you can select/unselect the applications to be installed based on your unique requirements. Click Next to continue.
The installer will download and install the selected applications.
- If you have selected to install “SQL Server Express”, the Microsoft SQL Server License Terms page will display. Click Accept to acknowledge the license terms and continue.
- In the next window, the Media Location field displays the SQL Server Media target location. If required, you can browse to change the location. Click Install to begin the installation of SQL Server Express.
- Once the prerequisites are installed successfully, click Close.
- Microsoft SQL Server Management Studio begins to install. Once the installation is complete, click Next
- In the confirmation message box, click Yes to reboot the computer.
Figure 10: SQL Server Express: Reboot your computer
Step 3: Start the installation process #
- After all the prerequisites are installed, the 3CX Exporter Setup Wizard appears. Click Next to Continue.
- On the Select Installation Folder window, the Folder field displays the location where the ‘3CX Exporter’ will be installed. Note that you cannot change the path.
- Click Next to continue.
Step 4: Test Relay Settings #
- In the 3CX Relay Services window, in the Relay Host field, enter the FQDN of your 3CX server.
- Enter 8801 in the Relay Port field.
- Enter the public key you took from VoIPTools Relay services in the Public Key text area.
- Click the Test Relay Settings to confirm ‘3CX Exporter’ can communicate with the Relay services running on the 3CX server.
- If the ‘3CX Exporter’ is successfully able to communicate with the Relay services that run on the 3CX server, a Success message box appears. Click OK. If the test fails, you will not be able to continue until communication with the relay is established.
Step 5: Installing 3CX Exporter #
- In the Ready to Install window, click Install to start the installation of the ‘3CX Exporter’.
The application installation progresses. It may take several minutes to complete.
- Once the installation is complete, check Launch 3CX Exporter check box and then click Finish. The 3CX Exporter configuration screen opens. If you want to simply close the installer without opening the configuration screen, then simply uncheck Launch 3CX Exporter check box and then click Finish
Step 7: Register your Software #
Registration is required to authorize your license key. Registering also makes it possible for VoIPTools to provide a replacement key if your license key is ever lost. Also, it enables VoIPTools to notify you of any product updates, and reminders if your key is reaching the renewal date.
- Click the 3CX Exporter desktop icon
that is created when you install the application.
- Click the License tab and enter registration information.
- Click Register to complete the registration of your software.
3CX Exporter Settings #
The 3CX Exporter Settings configuration screen enables you to register software, setup the database, set export frequency value, get 3CX Settings, and start/stop 3CX Exporter service.
SQL tab #
The SQL tab enables you to setup the database.
- In the SQL tab, select the radio button of the appropriate server.
- For MySQL Server, the database will be automatically setup based on the credentials provided.
- For SQL Server, click Setup. In the Connection Properties dialog box, enter the SQL server name. If using the free SQL Express edition, the default SQL Instance name is SQLExpress.
- In the Connection Properties dialog box, enter the SQL server name. If using the free SQL Express edition, the default SQL Instance name is SQLExpress.
NOTE:
- If you want to use ‘SQL Authentication’, then install SQL Server in ‘Mixed‘ mode.
- If SQL Server is installed on a server other than the server where 3CX Exporter is installed, you will need to configure SQL Server to allow remote connections.
-
- Enter the login credentials following the steps
- If using Windows integrated security, select Use Windows Authentication. The VoIPTools installer will create a local windows user name as “VoIPToys” and will give sufficient rights to this user to create / update the SQL database.
- If SQL Server authentication is desired, select Use SQL Server Authentication. Be sure to select a SQL Login that has sufficient permissions to alter the database and create SQL objects. Enter the User name and Password, and select appropriate database value from the Select or enter a database name drop down.
NOTE:
The first time you install 3CX Exporter, DO NOT enter a database name. Choose Select or enter a database name and leave the database name blank. The installer will create the SQL database automatically and apply the necessary permissions. If upgrading 3CX Exporter from a previous version, select the existing database from the list.
-
- Click Test Connection button to confirm you can connect to SQL.
- Click OK to close the test results dialog
Export tab #
In the Export screen, you can setup the exporting of tables. From here, you can select and export the desired tables from the list. Exporting of tables from ‘3CX DB’ to ‘Exporter DB’ will take place in 3 scenarios:
- Based on the setup export frequency
- When you click Export button
- When you start 3CX Exporter service.

Instructions
- In the Export tab, set Export frequency (in seconds) value. This is the frequency for automatic synchronizing of updates from 3CX database to Exporter database.
- Check the desired export tables that you want to delete.
- Click Save to save the settings.
CDR Settings tab #
Enter Domain Name, User Name and Password if the 3CX Exporter and PBX are on different servers, so that the web server (IIS) can access the Call Detail Records (CDR) and update the database.
- To process CDR files, check Process CDR Files check box.
- In the CDR Settings section, and in the Cdr Path field, enter the path where the cdr files should be stored in 3CX Console.
- In the Delete Policy section, check the Delete processed CDRs older than check box if you want to enable the delete policy.<.p>
- In the Days field, enter the number of days so that the processed cdr files older than the specified number of days will be deleted automatically at the scheduled Delete at timing.
- In the Delete at time box, enter the time using up and down arrows so that the scheduler will delete the processed cdr files older than specified number of days at the scheduled time.
Call Detail Records (CDR) Files #
In addition to exporting data directly from the 3CX PostgreSQL database, Exporter can also export Call Detail Records (CDR) created by 3CX as text files. Instructions for configuring 3CX to create these optional files are outlined below. The CDR files contain useful information about every phone call including participants, duration, the call chain, etc. While the CDR files do not include the same level of detail available in the PostgreSQL database, the data structure is far easier to understand. If the CDR files contain all the information you need, it is recommended that you utilize the CDR files rather than accessing the PostgreSQL database.
Configure 3CX to Automatically Create CDR Files #
- Log in to 3CX Management Console with valid credentials.
- On the left navigation pane, select Reports from the menu.
- In the Reports dropdown, select the $CDR icon to display the CDR Settings screen.

- Check the Generate CDR checkbox.

- Select Separate files for each call from the combo box.
NOTE:
It is important that you configure 3CX to save each call as an individual file.

- Under Configure CDR Output fields section, click Add CDR button.

- In the Select CDR Output fields to add pop up, you can see a list of CDR Output fields that need to be added to the CDR table.
- Select all the fields by holding down the shift button and clicking on each field, then press OK to add all the fields.

NOTE:
Be sure not to remove any fields from the list or change the order of the fields. Exporter expects all the fields to be exported in the default order. Therefore, order is important. Below is a list of all the fields in the proper order.
- Scroll down to confirm all the new CDR Output fields are added to the list. To know the list of supported output fields and what they mean, click here.
Figure 30: Default Order of CDR Fields
- Once you have added all the CDR fields, Scroll up to the top of the screen. Next to CDR Settings, press OK to save your changes.

CDR Records – Output Field Definitions #
The following are the supported output fields and what they mean:

HISTORYID | This is the call number – each call has a number, internal to 3CX. It is useful for call tracking. |
---|---|
CALLID | This is the Call ID – the unique identifier of the call. |
DURATION | Call Duration time. |
TIME-START | Call Start time. |
TIME-ANSWERED | Answered time. |
TIME-END | Call terminated time. |
REASON-TERMINATED | Why the call was terminated. |
FROM-NO | Source caller number. |
TO-NO | Destination To Number. |
FROM-DN | Distinguished name of caller – this is 3CX Specific Can be omitted by 3rd party developers. |
TO-DN | Distinguished name of To – Destination – this is 3CX Specific Can be omitted by 3rd party developers. |
DIAL-NO | Dialed number. |
REASON-CHANGED | The Reason why a change occurred in a call – example in a transfer you will see “ReplacedDst” which means that the destination was replaced with something else. |
FINAL-NUMBER | Final Number – the final number which was replaced (In a transfer this will be the final connected number). |
FINAL-DN | The Distinguished name of the final number entity – this is 3CX Specific and can be omitted by 3rd party dev. |
BILL-CODE | Billing code dialed after the destination (for example: **Sales). |
BILL-RATE | The billing rate that matched the prefix of the rate. This is used to apply a cost calculation variance. |
BILL-COST | The Cost of the call calculated with simple proportion / minute. |
BILL-NAME | The rate name of the billing variance. |
CHAIN | All endpoints which were involved in the call. |
FROM-TYPE | Source type |
TO-TYPE | Destination type. |
FINAL-TYPE | Final destination type. |
FROM-DISPNAME | Source Display Name. |
TO-DISPNAME | Destination Display Name. |
FINAL-DISPNAME | Final destination Display Name. |
MISSED-QUEUE-CALLS | The number of missed calls for an extension in a queue. |
Configure Exporter to Process CDR Files #
Once 3CX has been configured to generate CDR files, you must configure Exporter to process the files and import the data into SQL or MySQL.
NOTE:
Once you have successfully configured 3CX to automatically create CDR files, all the CDR data from then on will export into exporter database.
- Start 3CX Exporter service.
- Select the CDR Settings tab.
- Select the Process CDR Files check box
- Press Save to save your changes
- When asked whether to restart the service, chose Yes to restart the Exporter service
NOTE:
Exporter will place the CDR data extracted from the 3CX CDR files into the table named cdr.
View 3CX Database Records #
- Connect to database server.
- Under Object Explorer navigation pane, expand Databases, and then expand 3CX Exporter and Tables to see various tables.
Figure 33: Object Explorer
- Right click on any table to see the right click menu.
- Choose Select Top 1000 Rows to view data in the workspace area.
View Data in Microsoft SQL Server Database #
To view the exported data in the Microsoft SQL Server database, install the SQL Server Management studio and follow the instructions below:
- Connect to Microsoft SQL Server database server with valid credentials.
- Under Object Explorer navigation pane, expand Databases, and then expand 3CX Exporter and Tables to see dbo.cdr table. You will see that the new CDR Output fields that you just added through 3CX Management Console are now added to the dbo.cdr table in the database server./p>
Figure 34: New CDR Output fields added to dbo.cdr table in the database server
Support #
Visit our website to access our online manuals and receive quick answers to most of your questions. Otherwise, you can contact us by phone, email, live chat, and on the VoIPTools forums.
Support Hours (USA and India) #
Our team is ready to assist you with answers to your technical questions and we now offer 24/7, 365 days a year.
Windows Event Log (Applications and Services VoIPTools) #
The Windows Event Log lists various errors, information messages, and warnings related to all our VoIPTools applications and services. The data here can be used for troubleshooting various application errors.
Forums #
Our forum is intended for VoIPTools customers to collaborate on real-life challenges, solutions, and best practices. You can participate on our forum at: https://www.voiptools.com/community/
Submit a Bug #
If you suspect a bug in any of our VoIPTools products, you can bring it to our notice by reporting your issue at: https://www.voiptools.com/report-a-bug/
Live Chat #
Our chat support team is ready to acknowledge your queries in real time. You can start a live chat with us by simply clicking on the Live Chat button at the lower right corner of our web page.
Email #
You can email us at: support@voiptools.com. Be sure to describe your issue in detail. We’ll get back to you within one business day of receiving your request.
Phone #
You can call us at +1 801-642-4655 to reach a representative. VoIPTools will accept calls at this number from 8:00 AM to 6:00 PM (Central Standard Time).
Support Services #
Free Support: #
If you purchased our products through a VoIPTools Partner, your Partner will provide first-level support. Partners have access to 100% free technical support, provided they participate actively in the troubleshooting process.
VoIPTools customers have access to our online manuals and we will respond to emails (next business day) and live chat, but we will not log in to your servers remotely.
Paid Support: #
If you purchase “Installation Support’ our support team can log in to your servers and install and configure all our tools for you. This includes installing SQL Server Express and Internet Information Server if required. Our team will work with you to configure our applications to best meet your needs.