Back to news

*-dev: Another rewrite of cdr_addon_mysql

Author: Matt Riddell
Daily Asterisk News
Ask Question

Gil Kloepfer has posted details of some changes available to write custom information to CDR in Asterisk 1.4, much like the adaptive code that has been added to Asterisk 1.6. If you are stuck with 1.4 for the moment, this could really help out:

We had a need to use the user-defined CDR variables feature of Asterisk 1.4+ and a completely different table layout than was in cdr_addon_mysql (asterisk-addons). I started with the one that was there already, but did some significant work on it as well. Our version has:

o Support for all CDR fields, including user variables
o Ability to map CDR fields to any column name
o Times selectable for localtime or GMT in config file as in cdr_csv
o Simplified insert using prepared statement queries
o Allow literal strings to be put into the database when
logging, to track hostname, for example

I've been away from the mailing lists for some time and it looks like some other work has been done in this regard, but I wanted to make this available in case it was useful (I hope it is).

The code and a sample config file is in:
(cdr_addon_mysql.c, cdr_mysql.conf.sample)

I would appreciate any constructive feedback on this, particularly if someone finds it useful. The Asterisk installation I am responsible for supports a large University research laboratory of about 500 people and 900 telephones, mostly IP and some channel bank-based. Asterisk has been very useful for us and I would like to be able to contribute back to the project where possible.

Please send private e-mail via astrepl kloepfer(dot)org or the e-mail address listed in the C code.

Gil Kloepfer
astrepl <@> kloepfer. org


Related posts

Back to top

Ready to supercharge your business?

Dialer pricing from only $300 per month!