I have problems with writing to my cdr-table, which I created in postgresql (8.3.5). I connect through odbc. Asterisk is 1.6.0.1, running as non-root.
This is my table description:
asterisk=> \dt asterisk_cdr
List of relations
Schema | Name | Type | Owner
--------±-------------±------±---------
public | asterisk_cdr | table | asterisk
(1 row)
cdr_odbc.conf is configured as follows:
[global]
dsn=asterisk-connector
username=asterisk
password=something
loguniqueid=yes
table=asterisk_cdr
This is the output for “cdr show status”:
*CLI> cdr show status
CDR logging: enabled
CDR mode: simple
CDR output unanswered calls: no
CDR registered backend: ODBC
CDR registered backend: cdr-custom
CDR registered backend: csv
CDR registered backend: Adaptive ODBC
When I make a test call, I get a registration in Master.csv, but concerning ODBC I get following error message when hanging up, without registration of the call into the database:
*CLI>
== Using SIP RTP CoS mark 5
– Executing [6002@users:1] Dial(“SIP/6001-082b8bd8”, “SIP/6002”) in new stack
== Using SIP RTP CoS mark 5
– Called 6002
– SIP/6002-082c2420 is ringing
– SIP/6002-082c2420 answered SIP/6001-082b8bd8
– Packet2Packet bridging SIP/6001-082b8bd8 and SIP/6002-082c2420
[Jan 29 00:29:47] ERROR[3400]: cdr_odbc.c:133 odbc_log: Unable to retrieve database handle. CDR failed.
== Spawn extension (users, 6002, 1) exited non-zero on ‘SIP/6001-082b8bd8’
I don’t know what is meant by “Unable to retrieve database handle”. Probably I am missing something obvious, but I can’t put my finger on the trouble spot. Does anybody has any advice?
Thanks in advance
Toni