FreePBX | Register | Issues | Wiki | Portal | Support

Data Dictionary for the FreePBX tables

freepbx
Tags: #<Tag:0x00007fafc58b2fc8>

(Mark) #1

Hi -

I have been tasked to add some custom screens ‘off to one side’ of the cdr screen. The project is not fully defined so part of the issue is my manager needs to know what is possible. Is there a data dictionary available anywhere that explains what each of the fields are in the cdr database (see below)?

Thanks -


CREATE TABLE cdr (
calldate datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
clid varchar(80) NOT NULL DEFAULT ‘’,
src varchar(80) NOT NULL DEFAULT ‘’,
dst varchar(80) NOT NULL DEFAULT ‘’,
dcontext varchar(80) NOT NULL DEFAULT ‘’,
channel varchar(80) NOT NULL DEFAULT ‘’,
dstchannel varchar(80) NOT NULL DEFAULT ‘’,
lastapp varchar(80) NOT NULL DEFAULT ‘’,
lastdata varchar(80) NOT NULL DEFAULT ‘’,
duration int(11) NOT NULL DEFAULT ‘0’,
billsec int(11) NOT NULL DEFAULT ‘0’,
disposition varchar(45) NOT NULL DEFAULT ‘’,
amaflags int(11) NOT NULL DEFAULT ‘0’,
accountcode varchar(20) NOT NULL DEFAULT ‘’,
uniqueid varchar(32) NOT NULL DEFAULT ‘’,
userfield varchar(255) NOT NULL DEFAULT ‘’,
did varchar(20) NOT NULL DEFAULT ‘’,
recordingfile varchar(255) NOT NULL DEFAULT ‘’,
cnum varchar(40) NOT NULL DEFAULT ‘’,
cnam varchar(40) NOT NULL DEFAULT ‘’,
outbound_cnum varchar(40) NOT NULL DEFAULT ‘’,
outbound_cnam varchar(40) NOT NULL DEFAULT ‘’,
dst_cnam varchar(40) NOT NULL DEFAULT ‘’
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



– Table structure for table cel

CREATE TABLE cel (
id int(11) NOT NULL,
eventtype varchar(30) NOT NULL,
eventtime datetime NOT NULL,
cid_name varchar(80) NOT NULL,
cid_num varchar(80) NOT NULL,
cid_ani varchar(80) NOT NULL,
cid_rdnis varchar(80) NOT NULL,
cid_dnid varchar(80) NOT NULL,
exten varchar(80) NOT NULL,
context varchar(80) NOT NULL,
channame varchar(80) NOT NULL,
src varchar(80) NOT NULL,
dst varchar(80) NOT NULL,
channel varchar(80) NOT NULL,
dstchannel varchar(80) NOT NULL,
appname varchar(80) NOT NULL,
appdata varchar(80) NOT NULL,
amaflags int(11) NOT NULL,
accountcode varchar(20) NOT NULL,
uniqueid varchar(32) NOT NULL,
linkedid varchar(32) NOT NULL,
peer varchar(80) NOT NULL,
userdeftype varchar(255) NOT NULL,
eventextra varchar(255) NOT NULL,
userfield varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


#2

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-SysAdmin-SECT-1.html

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Monitoring_id246945.html


(Mark) #3

Perfect! Thanks!


(Tom Ray) #4

You probably want to look at this https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification as CDRs changed in Asterisk 12 (that book doesn’t cover anything 12+). There are new fields and Adaptive CDRs are a thing now allowing you to add custom fields to the CDR structure and Asterisk just knows they are available to use.


(system) closed #5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.