[Asterisk-Users] Re: tds_CDR and MS SQL Server troubleshooting

Tony Mountifield tony at softins.clara.co.uk
Thu May 26 13:39:26 MST 2005


In article <22367601.1117138575516.JavaMail.root at wamui-darkeyed.atl.sa.earthlink.net>,
PA <taihome at 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 at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list