bg

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

Item3CX
InterfaceLAN. The PBX sends records to the logger PC; the logger listens on TCP port 2002.
Port2002
Parser to select3CX
Fields extracted22

Enable CDR

To enable CDR, access the 3CX Management console. Go to "Settings → CDR", choose "Generate CDR". Select the "Active Socket" output type.

CDR settings

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).

TCP/IP Data Interface

2. Configure the TCP settings as shown below.

TCP Server Mode for 3CX

2002

2002

Selecting the correct parser for 3CX

Parser Selection For PBX Data Logger

3CX

3CX

Data items

DescriptionData typeColumn name
Record NostringFLAG4
Call IDstringFLAG1
Call durationdatetimeCALL_DURATION
Call duration (s)integerCALL_DURATION_S
Call timedatetimeCALL_TIME
RingdatetimeRING
TerminatedstringFLAG5
Call typestringDIRECTION
ExtensionstringEXT
TrunkstringTRUNK
Called phonestringCALLER_PHONE
Extension namestringEXT_NAME
Dialed phonestringDIALED_PHONE
Call chargefloatCOST
Caller namestringFLAG2
Change reasonstringFLAG6
Chain (full)stringCHAIN
ChainstringFLAG3
Display name (from)stringDISPNAME_FROM
Display name (to)stringDISPNAME_TO
Display name (final)stringDISPNAME_FINAL
Missed queue callsstringMISSED_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.