I am trying to get * to write CDR records to an MS SQL table. I am used the freeTDS set up (not using UNIX ODBC), and it appears to be making the connection to the database, but I make a call, I get this error: WARNING[3369]: cdr_tds.c:180 tds_log: Reconnected to SQL database. ERROR[3369]: cdr_tds.c:191 tds_log: Failed to insert Call Data Records into SQL database. I've assigned all rights to the cdr table in SQL to the user. I am not sure how to troubleshoot this from this point. Does anyone know else these errors are? Thanks for any direction. Phil
Tony Mountifield
2005-May-26 13:39 UTC
[Asterisk-Users] Re: tds_CDR and MS SQL Server troubleshooting
In article <22367601.1117138575516.JavaMail.root@wamui-darkeyed.atl.sa.earthlink.net>, PA <taihome@earthlink.net> wrote:> I am trying to get * to write CDR records to an MS SQL table. I am used the freeTDS set up > (not using UNIX ODBC), and it appears to be making the connection to the database, but I > make a call, I get this error: > > WARNING[3369]: cdr_tds.c:180 tds_log: Reconnected to SQL database. > ERROR[3369]: cdr_tds.c:191 tds_log: Failed to insert Call Data Records into SQL database. > > I've assigned all rights to the cdr table in SQL to the user. I am not sure how to > troubleshoot this from this point. Does anyone know else these errors are? Thanks for any > direction.It's probably a database or SQL Server configuration problem. The module works, because I'm using it in production. If you are using safe_asterisk to start up, put the following lines into /usr/sbin/safe_asterisk near the top, just after the DUMPDROP definition: TDSDUMP=/tmp/tdsdump.$$.log TDSDUMPCONFIG=/tmp/tdsdumpconfig.$$.log export TDSDUMP TDSDUMPCONFIG Then look for those files in the /tmp directory when asterisk is running. They will contain a lot more debugging information from the FreeTDS libraries. If you're not using safe_asterisk, then just call the above lines from your shell before you invoke asterisk. Hope this helps Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org
Colin Anderson
2005-May-26 13:43 UTC
[Asterisk-Users] tds_CDR and MS SQL Server troubleshooting
In the SQL server MMC, you can expand SQL server > Management > Process Info and see if your defined user is listed in there after you try to hit SQL server. If not, it is most certainly a rights problem. Quick and dirty way to determine if it's a rights problem is to use the sql server SA account as the login. If it works, then it's a rights problem. hth -----Original Message----- From: PA [mailto:taihome@earthlink.net] Sent: Thursday, May 26, 2005 2:16 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] tds_CDR and MS SQL Server troubleshooting I am trying to get * to write CDR records to an MS SQL table. I am used the freeTDS set up (not using UNIX ODBC), and it appears to be making the connection to the database, but I make a call, I get this error: WARNING[3369]: cdr_tds.c:180 tds_log: Reconnected to SQL database. ERROR[3369]: cdr_tds.c:191 tds_log: Failed to insert Call Data Records into SQL database. I've assigned all rights to the cdr table in SQL to the user. I am not sure how to troubleshoot this from this point. Does anyone know else these errors are? Thanks for any direction. Phil _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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
Duane Cox
2005-May-26 18:22 UTC
[Asterisk-Users] tds_CDR and MS SQL Server troubleshooting
did you follow the directions in doc/cdr.txt in the asterisk distro? Duane Cox ----- Original Message ----- From: "PA" <taihome@earthlink.net> To: <asterisk-users@lists.digium.com> Sent: Thursday, May 26, 2005 3:16 PM Subject: [Asterisk-Users] tds_CDR and MS SQL Server troubleshooting>I am trying to get * to write CDR records to an MS SQL table. I am used >the freeTDS set up (not using UNIX ODBC), and it appears to be making the >connection to the database, but I make a call, I get this error: > > WARNING[3369]: cdr_tds.c:180 tds_log: Reconnected to SQL database. > ERROR[3369]: cdr_tds.c:191 tds_log: Failed to insert Call Data Records > into SQL database. > > I've assigned all rights to the cdr table in SQL to the user. I am not > sure how to troubleshoot this from this point. Does anyone know else > these errors are? Thanks for any direction. > > Phil > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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 >
Thank you very much for that debugging information Tony. That's exactly what I was looking for, I just didn't know how to ask for it. You understand Noobian very well ;). It lead me right to the problem. Unfortunately, it was not a dazzling problem, it was a hard (for me) to spot typo in a column name (dsst rather than dst). Thanks for the other suggestions too from Colin and Duane, I had done those already and that's why I was at my wits end without knowing how to get a more detailed error log. Cheers, Phil>>>It's probably a database or SQL Server configuration problem. The moduleworks, because I'm using it in production. If you are using safe_asterisk to start up, put the following lines into /usr/sbin/safe_asterisk near the top, just after the DUMPDROP definition: TDSDUMP=/tmp/tdsdump.$$.log TDSDUMPCONFIG=/tmp/tdsdumpconfig.$$.log export TDSDUMP TDSDUMPCONFIG Then look for those files in the /tmp directory when asterisk is running. They will contain a lot more debugging information from the FreeTDS libraries. If you're not using safe_asterisk, then just call the above lines from your shell before you invoke asterisk. Hope this helps Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org>I am trying to get * to write CDR records to an MS SQL table. I am used >the freeTDS set up (not using UNIX ODBC), and it appears to be making the >connection to the database, but I make a call, I get this error: > > WARNING[3369]: cdr_tds.c:180 tds_log: Reconnected to SQL database. > ERROR[3369]: cdr_tds.c:191 tds_log: Failed to insert Call Data Records > into SQL database. > > I've assigned all rights to the cdr table in SQL to the user. I am not > sure how to troubleshoot this from this point. Does anyone know else > these errors are? Thanks for any direction. > > Phil > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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 >