3CX SMDR setup and CDR format
This page shows how to get call records out of the 3CX into Advanced PBX Data Logger: the connection settings, the parser to select and the 22 fields the logger extracts for reports or a database. The settings apply to our logger; other call accounting software may expect a different configuration.
Quick facts
| Item | 3CX |
|---|---|
| Interface | LAN. The PBX sends records to the logger PC; the logger listens on TCP port 2002. |
| Port | 2002 |
| Parser to select | 3CX |
| Fields extracted | 22 |
Enable CDR
To enable CDR, access the 3CX Management console. Go to "Settings → CDR", choose "Generate CDR". Select the "Active Socket" output type.
Configuring the CDR fields
Our software is configured for the following STRUCTURE and the position of the CDR data
historyid
callid
duration
time-start
time-answered
time-end
reason-terminated
from-no
to-no
from-dn
to-dn
dial-no
reason-changed
final-number
final-dn
bill-code
bill-rate
bill-cost
bill-name
chain
from-type
to-type
final-type
from-dispname
to-dispname
final-dispname
More info about the CDR format and settings you may find here.
Configuring Advanced PBX Data Logger as a TCP server
Advanced PBX Data Logger should be configured to the TCP server mode and listen on 0.0.0.0:2002 (see below). The IP address 0.0.0.0 allows receiving data from all network connections on your computer. The port number should match the value from the SMDR settings in your 3CX.
1. Add a new configuration with the TCP data source (if you didn't it before).

2. Configure the TCP settings as shown below.

2002
2002
Selecting the correct parser for 3CX

3CX
3CX
Data items
| Description | Data type | Column name |
|---|---|---|
| Record No | string | FLAG4 |
| Call ID | string | FLAG1 |
| Call duration | datetime | CALL_DURATION |
| Call duration (s) | integer | CALL_DURATION_S |
| Call time | datetime | CALL_TIME |
| Ring | datetime | RING |
| Terminated | string | FLAG5 |
| Call type | string | DIRECTION |
| Extension | string | EXT |
| Trunk | string | TRUNK |
| Called phone | string | CALLER_PHONE |
| Extension name | string | EXT_NAME |
| Dialed phone | string | DIALED_PHONE |
| Call charge | float | COST |
| Caller name | string | FLAG2 |
| Change reason | string | FLAG6 |
| Chain (full) | string | CHAIN |
| Chain | string | FLAG3 |
| Display name (from) | string | DISPNAME_FROM |
| Display name (to) | string | DISPNAME_TO |
| Display name (final) | string | DISPNAME_FINAL |
| Missed queue calls | string | MISSED_QUEUE |
Sample record
As delivered by the system; phone numbers, names and public addresses are masked.
Call 4248,00000BEEF4878DCB_247,,2016/10/14 15:30:46,,2016/10/14 15:31:02,Failed,Ext.404,786xxxxxxx,404,786xxxxxxx,786xxxxxxx,,,,,,,, Call 4249,00000BEEF487F38D_248,,2016/10/14 15:31:12,,2016/10/14 15:31:18,Failed,Ext.404,786xxxxxxx,404,786xxxxxxx,786xxxxxxx,,,,,,,, Call 4250,00000BEEF47E5DBD_236,00:10:28,2016/10/14 15:20:44,2016/10/14 15:20:53,2016/10/14 15:31:22,TerminatedBySrc,Ext.418,774xxxxxxx,418,10000,774xxxxxxx,,,,,1,10.48,default,Chain: Ext.418;774xxxxxxx;
Reports and a database
Once records arrive, the logger writes them to a text file or to any ODBC database in real time, or hands them to the PBX Reports utility for manual, scheduled and e-mailed reports with a built-in web server. See exporting call log data to a database for the database setup.
Related 3CX systems
3COM NBX (XML, v6)AYC IPcts
Aastra 470 (PC5 format)
All supported PBX systems
Note: Products and companies mentioned here are used only for definition and identification purposes and can be trademarks and/or registered trademarks of the respective companies.
Related topics: Advanced PBX Data Logger
hereCall logging Call accounting SMDR to SQL SMDR Listener Cables and signals
