[Asterisk-Users] ODBC cdr tearing my hair out
Jean-Michel Hiver
jhiver at ykoz.net
Sat Jun 17 01:07:21 MST 2006
Julian Lyndon-Smith a écrit :
> svn trunk.
>
> I'm trying to get cdr to work with my odbc database. I have followed a
> checklist that I had previously but still can't get it to work. There
> are no errors (verbose 40 and debug 40), I get
>
> [cdr_odbc.so] => (ODBC CDR Backend)
> == Parsing '/etc/asterisk/cdr_odbc.conf': Found
Hi,
Do you see a message on the CLI saying:
> cdr_odbc: Query Successful!
?
If not, what do you see?
>
> *CLI> cdr status
> CDR logging: enabled
> CDR mode: simple
> CDR registered backend: cdr-custom
> CDR registered backend: csv
> CDR registered backend: cdr_manager
>
> As I said there are no errors, but the cdr odbc does not show up :(
Have you got:
; Database Call Detail Records
load => cdr_odbc.so ; ODBC CDR Backend - Requires N/A
In your modules.conf?
> what is really strange is that I have also set up the same odbc
> database for func_odbc, and registered my custom SQL functions and can
> access these (the db manager shows that this session is connected)
>
> cdr.conf
> ==========
> [general]
> enable=yes
>
> cdr_odbc.conf
> ==========
> [general]
> dsn=mydsn
> username=myuser
> password=mypassword
> loguniqueid=yes
> dispositionstring=yes
> table=PUB.cdr ;"cdr" is default table name
> usegmtime=no ; set to "yes" to log in GMT
I don't know if it will help, but I will share my config with you. I can
get realtime sip_friends, iax_friends, and CDRs to work. For some
reason, no realtime extensions though :-(
I use unixODBC.
/usr/local/etc/asterisk/cdr_odbc.conf
[global]
dsn=PostgreSQL
username=asterisk_db
password=*********
loguniqueid=yes
usegmtime=yes
/usr/local/etc/odbcinst.ini
[PostgreSQL]
Description = PostgreSQL driver for Linux & Win32
Driver = /usr/local/lib/libodbcpsql.so
Setup = /usr/local/lib/libodbcpsqlS.so
FileUsage = 1
/usr/local/etc/odbc.ini
[PostgreSQL]
Description = Connection to asterisk_db
Driver = PostgreSQL
Trace = Yes
TraceFile = /tmp/sql.log
Database = asterisk_db
Servername = localhost
UserName =
Password =
Port = 5432
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
> I must be missing something really really obvious here and would
> appreciate any help
I can't see exactly what your problem is. I used to have the same
problem but then realized that cdr_odbc was doing cdr logging GMT and I
was selecting "yesterday" but in my time zone and thought there was a
problem was actually everything was working fine :/
Good luck!
Cheers,
Jean-Michel.
--
Jean-Michel Hiver - http://ykoz.net/
Découvrez la Réunion des Technologies IP & Telecom
TEL: +262 (0)262 55 03 98 - RCS 434 273 330 SAINT PIERRE
More information about the asterisk-users
mailing list