Enable CDR Logging?
Hello,
I am currently trying to set up CDR logging. I got all the ODBC stuff for my mysql server set up, also checked there’s a connection using “odbc show”
in the Asterisk console:
Name: asterisk
I also created a table for the CDR logs:
This table is also referenced in /etc/asterisk/cdr_adaptive_odbc.conf.
Now, what is the next step?
1) Do I have to call any CDR function in my dialplan for the CDR logging to become really active?
2) Do I have to create more fields in my asterisk_cdr table manually? Guess it should all be done automatically? Would I have needed the ID field at all?
Thanks for any hint
Best regards Stefan
Doug Lytle said:
Aug 19, 12 at 12:59 pmStefan at WPF wrote:
/etc/odbc.ini
[MySQL-cdr]
Description = CDR Database Driver = MySQL
Socket = /var/lib/mysql/mysql.sock Server = 172.19.8.9
User = username Password = password Database = asteriskcdr Option = 3
/etc/asterisk/res_odbc.conf
[MySQL-cdr]
enable => yes dsn => MySQL-cdr username => username password => password preconnect => yes
/etc/asterisk/cdr_odbc.conf
[global]
dsn=MySQL-cdr
;loguniqueid=yes dispositionstring=yes table
Stefan at said:
Aug 19, 12 at 1:39 pmThank you Doug, but if I don’t understand things wrong, you are not using adaptive ODBC?
I meanwhile found out that things work when I manually create the columns. Just wondering, is there any official specifications for the default columns, e.g. which datatype they shall have and so on?
Also, I am getting this errors:
As a reference, here is my complete configuration for adaptive odbc:
/etc/odbcinst.ini:
2012/8/19 Doug Lytle
Doug Lytle said:
Aug 19, 12 at 1:55 pmStefan at WPF wrote:
No, I’m not.
It looks like it’s failing to connect. I have had issue in the past, where connecting to a mysql database via 127.0.0.1 would work, where as using localhost would fail. And some times, where neither would work and I had to use the real IP address of the machine.
Maybe this is one of those cases?
Have you verified that your odbc setup is working properly for other queries?
This may be helpful:
http://www.easysoft.com/developer/interfaces/odbc/linux.html#testing_dsns_unixodbc
Doug