[Asterisk-Users] MySQL CDR -- debugging

Shilliday, Jim JShilliday at ejcenter.org
Thu Oct 14 16:05:41 MST 2004


Thanks -- worked.  I now know that the mysql database is looking for two
mandatory fields -- uniqueid and userfield -- that * isn't sending.
I've missed something, but what?  Maybe a version problem?  

Jim Shilliday


-----Original Message-----
From: Matthew Boehm [mailto:mboehm at cytelcom.com] 
Sent: Thursday, October 14, 2004 5:54 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] MySQL CDR -- debugging

Check /etc/asterisk/logger.conf

Make sure you  have an uncommented  "debug =>" line.

If it is uncommented, then it should be located at
/var/log/asterisk/debug

If it is commented, un-comment it and restart asterisk.

Be warned, this debug log can grow by megabytes every hour.

Matthew

----- Original Message ----- 
From: "Shilliday, Jim" <JShilliday at ejcenter.org>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Thursday, October 14, 2004 4:14 PM
Subject: [Asterisk-Users] MySQL CDR -- debugging


I have the mysql cdr module installed and running:

asterisk-pit*CLI> cdr mysql status
Connected to asteriskcdrdb at localhost with username asterisk for
18 minutes, 9 seconds.
  Wrote 0 records since last restart.

But it's not logging any calls, e.g.:

Oct 14 16:50:37 ERROR[1115575616]: cdr_addon_mysql.c:200
mysql_log: Failed to insert into database.

I haven't been able to locate the log file -- near line 200, the source
says:

ast_log(LOG_DEBUG,"cdr_mysql: SQL command as follows
%s\n",sqlcmd);

if (mysql_real_query(&mysql,sqlcmd,strlen(sqlcmd))) {
ast_log(LOG_ERROR,"Failed to insert into
database.");
ast_mutex_unlock(&mysql_lock);
return -1;
} else {
records++;
totalrecords++;
}
}

Can someone tell me where that LOG_DEBUG info goes?  Do I need to turn
on debugging somewhere?  Is there a default MySQL log that will show the
error?

Thanks-----

Jim Shilliday
IT Director
Equal Justice Center
1315 Walnut St. Suite 400
Philadelphia PA 19107
215-238-6970

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list