[Asterisk-Users] MySQL CDR -- debugging

2004-10-14 Thread Shilliday, Jim
I have the mysql cdr module installed and running:
 
asterisk-pit*CLI cdr mysql status
Connected to [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] MySQL CDR -- debugging

2004-10-14 Thread Matthew Boehm
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 [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
[EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] MySQL CDR -- debugging

2004-10-14 Thread Shilliday, Jim
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:[EMAIL PROTECTED] 
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 [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
[EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] MySQL CDR -- debugging

2004-10-14 Thread Shilliday, Jim
Aahhh, found it -- in the wiki:
http://www.voip-info.org/tiki-index.php?page=Asterisk%20cdr%20mysql

Gotta recompile it or kill the uniqueid field in MySQL.

Jim Shilliday


-Original Message-
From: Shilliday, Jim 
Sent: Thursday, October 14, 2004 7:06 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MySQL CDR -- debugging

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:[EMAIL PROTECTED] 
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 [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
[EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
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
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users