ODBC using cdr_odbc

Compile, configure, and install the latest unixODBC package:

Compile, configure, and install the latest FreeTDS package:

Compile, or recompile, asterisk so that it will now add support for cdr_odbc.

Setup odbc configuration files. These are working examples from my system. You will need to modify for your setup. You are not required to store usernames or passwords here.

Only install one database connector. Do not confuse asterisk by using both ODBC (cdr_odbc) and FreeTDS (cdr_tds). This command will erase the contents of cdr_tds.conf

NOTE: unixODBC requires the freeTDS package, but asterisk does not call freeTDS directly.

Now set up cdr_odbc configuration files. These are working samples from my system. You will need to modify for your setup. Define your usernames and passwords here, secure file as well.

And finally, create the 'cdr' table in your mssql database. Start asterisk in verbose mode, you should see that asterisk logs a connection to the database and will now record every call to the database when it's complete.

lmadsen 2010-01-14