Asterisk 1.8 does not log CDRs via TDS directly?

According to the docs (Asterisk MSSQL CDR Logging), it should be easy to get CDRs logged to a remote MS SQL Server.

It does not seem to work with Asterisk 1.8 though. Is that correct?

Here is what I tried:
I have the module installed and showing in Asterisk with “module show”.
Config files are:


host = SIPCDR1
port = 1360
tds version = 7.3



The table “cdrCurrent” exists in the database “PhoneList” on the server.
I can connect to the server with:

tsql -S cdrSQL -U asterisk -P (veryverysecret)

CDR logging is enabled in /etc/asterisk/cdr.conf.
In fact Asterisk logs all CDRs to Master.csv in the cdr_custom directory.

What I want that it additionally logs them to that MSSQL server but there is no output to the table, and there is no error message in any log, no trace of any problem but no data gets logged.

I enabled dump file in freetds.conf but I do not understand anything what it logs or if this even has anything to do with Asterisk.

As a note, the same server uses FreeTDS to save data from a web app to another MS SQL server but it has no configuration settings in /etc/freetds. I guess the app has its own config to do so.

What is the procedure to track something like this down?


What does “cdr show status” have to say about whta you have configured

should get something like this back

CLI> cdr show status

Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No

  • Registered Backends

    Adaptive ODBC


Here is what it shows:

Call Detail Record (CDR) settings
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       No
  * Registered Backends

Does the logs show anything ? also is cdr show FreeTDS status a valid command ??


As mentioned in my original post, there is nothing in the logs. They only show that Asterisk loads the cdr_tds module upon restart.

What about on teh database server do you see it connecting ? and attempting to write logs, also set debug and verbose logging to 99 to see if anything is attempted.

After a few more restarts of the entire server, with no config change, it was finally working. I cannot see why it did not work before. One thing I did was to add a line with


into cdr.conf.It started to log calls after this (and a restart of the server).
I have taken this line out again now, and restart server again - and it still logs correctly. So that [tds] line is not really it either. I cannot tell at this point what went wrong, but it is working at least.