[asterisk-users] 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 DSN:asterisk-connector Last connection attempt: 1970-01-01 01:00:00 Pooled: No Connected: Yes I also created a table for the CDR logs: CREATE TABLE asterisk_cdr (id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)); 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 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Enable CDR logging?
Stefan at WPF wrote: Thanks for any hint :-) /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=cdr usegmtime=no ;hrtime=yes Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Enable CDR logging?
Thank 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: [Aug 19 20:36:11] WARNING[2386]: res_odbc.c:601 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk-connector]... [Aug 19 20:36:11] ERROR[2386]: cdr_odbc.c:162 odbc_log: CDR direct execute failed I guess they have nothing to do with adaptive odbc? As a reference, here is my complete configuration for adaptive odbc: /etc/odbcinst.ini: [MySQL] Description = ODBC for MySQL Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so FileUsage = 1 /etc/odbc.ini: [asterisk-connector] Description = MySQL connection to 'asterisk' database Driver= MySQL Database = asterisk Server= localhost UserName = user Password = password Port = 3306 Socket= /var/run/mysqld/mysqld.sock cdr_adaptive_odbc.conf: [mytable] connection = asterisk table = asterisk_cdr res_odbc.conf: [asterisk] enabled = yes dsn = asterisk-connector username = user password = password pre-connect = yes pooling = no limit = 1 cdr.conf: [general] enable = yes unanswered = yes 2012/8/19 Doug Lytle supp...@drdos.info Stefan at WPF wrote: Thanks for any hint :-) /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=cdr usegmtime=no ;hrtime=yes Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- __**__**_ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/**mailman/listinfo/asterisk-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Enable CDR logging?
Stefan at WPF wrote: Thank you Doug, but if I don't understand things wrong, you are not using adaptive ODBC? No, I'm not. 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: [Aug 19 20:36:11] WARNING[2386]: res_odbc.c:601 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk-connector]... [Aug 19 20:36:11] ERROR[2386]: cdr_odbc.c:162 odbc_log: CDR direct execute failed 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 -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users