[Asterisk-Users] cdr_unixodbc

Brian West brian at bkw.org
Tue Nov 25 07:03:07 MST 2003


http://www.bkw.org/~brian/cdr_unixodbc.tar.gz

asterisk root # cd /usr/src/

asterisk src # tar zxfv cdr_unixodbc.tar.gz
cdr_unixodbc/
cdr_unixodbc/cdr_unixodbc.c
cdr_unixodbc/Makefile
cdr_unixodbc/mkdep
cdr_unixodbc/cdr_unixodbc.conf.sample

asterisk src # cd cdr_unixodbc
asterisk cdr_unixodbc # make
./mkdep -fPIC -I../asterisk `ls *.c`
gcc -fPIC -I../asterisk   -c -o cdr_unixodbc.o cdr_unixodbc.c
gcc -shared -Xlinker -x -o cdr_unixodbc.so cdr_unixodbc.o -lodbc -lz
-fPIC -I../asterisk

asterisk cdr_unixodbc # make install
for x in cdr_unixodbc.so; do install -m 755 $x /usr/lib/asterisk/modules ;
done

asterisk cdr_unixodbc #cp cdr_unixodbc.conf.sample to /etc/asterisk/cdr_unixodbc.conf

vi /etc/asterisk/cdr_unixodbc.conf

set the dsn, username, password from your odbc.ini file for the database
you setup fro asterisk cdr.

Also if you find a bug or can do something better in the code please feel
free to do so.  It took all of 3 hours total to write this(most of the
time was finding unixODBC docs.. jesus they say * has bad docs... just try
to find unixODBC docs).  So i'm sure its not without its bugs.

bkw




More information about the asterisk-users mailing list