Hello,
i have installed Thirdlane PBX 5.0.46 and i would like to enable CDR MySQL logs. I have installed all necessary asterisk packages. Is there a documentation available regarding the MySQL database, table structure etc required for using Thirdlane PBX and MySQL cdrs? Do i just configure the database like mentioned here http://www.voip-info.org/wiki-Asterisk+cdr+mysql or is it something more.
It would be nice to include the MySQL code for the db creation in the support documentation.
thanks,
KM
Needed to dig this back up
Having a similar problem trying to get MTE to talk to a local mysql database for the first time. Is the table definition above still relevent in Thirdlane 6.0.1 / Asterisk 1.4, or is this right?:
CREATE TABLE asterisk14cdr (
accountcode varchar(20) NOT NULL default '',
src varchar(80) NOT NULL default '',
dst varchar(80) NOT NULL default '',
dcontext varchar(80) NOT NULL default '',
clid 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 '',
start char(21) NOT NULL default '0000-00-00 00:00:00',
answer char(21) NOT NULL default '0000-00-00 00:00:00',
end char(21) NOT NULL default '0000-00-00 00:00:00',
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',
userfield varchar(255) NOT NULL default '',
uniqueid varchar(32) NOT NULL default ''
);
Is there somewhere I can get full step by step instructions? (like here?)
the order of the schema
the order of the schema needs to match mine otherwise it wont work. You really should name your table 'cdr' for compatibility with some non-flexible billing solutions out there. I have been using that schema file for 4 years without issue, ever.
Now, a read back issue
I thought I had this all running. However, it seems TL can happily write to the DB, but when I go to look at call history, it can never display anything from the DB. It does appear that it is trying, because if I take away all priviledges from the DB user, TL says the user can't perform the SELECT command on the DB. Is there something I can check to see what is up? Tried enabling errors and warnings in /etc/my.cnf, but the logs never show any attempts for anything.
i have no clue.. 5.0.46 is no
i have no clue.. 5.0.46 is no longer supported. I would recommend upgrading. and when you do start a new thread.
Death to anyone who resurrects 2 yr old posts.
Thanks
I can always depend on your pithy retorts to focus and redouble my efforts. Anyway, my issue turned out to be the age-old issue of mysql DB cdr table userfield write omission and the various asterisk-addon editing stuff to resolve. Building a log in /etc/my.cnf (log=/tmp/mysql_query.log) helped to figure out what was up. I figured it out.
finally
the table structure, as of now, is static within asterisk.
since you already have webmin installed first ensure you have mysql server installed and then use mysqladmin to set the root password
mysqladmin -uroot password 'newpassword'
then log into the mysql interface in webmin, it will only ask you the login for root one time
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 ''
);
mysql -uroot -pnewpassword asteriskcdrdb < cdr_mysql.sql