Hello,
being requested several times and as I did get to do some acc work, I added the code for storing dialog-based cdrs to database. But I had no time to setup a testbed for it, hopefully those interested in the feature will help testing a bit.
It follows closely the same logic as writing cdrs to syslog. You have to create table acc_cdrs (see utils/kamctl/mysql/acc-create.sql), then add extra columns as you need. The attribute name in cdr_extra has to match the column name (the type for extra columns have to be string/varchar). In kamailio.cfg you have to set the cdrs_table parameter to acc_cdrs.
One odd by now is that duration column is also string, because is how existing code (for syslog writing) stored in internally -- plan to change it in the near future, for now sql gives the tools for converting.
More details can be found in acc module readme: - http://kamailio.org/docs/modules/devel/modules/acc.html
Let me know the results, to tune it properly.
Cheers, Daniel