cdr_odbc.c:163 odbc_log: Unable to retrieve database handle.

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

cdr_odbc.c:163 odbc_log: Unable to retrieve database handle.

Postby vitormazuco » Mon Dec 14, 2015 6:56 am

I'm trying to install a database using the asterisk-CDR-viewer. It uses MySQL and I'm using Asterisk 11.I know that it needs to synchronize with the ODBC database.

But I'm in trouble, it shows an error message will play when the database "cdr_odbc.c: 163 odbc_log:. Unable to retrieve database handle CDR failed."

See the full log

Code: Select all
cdr-teste*CLI> module reload res_odbc.so
    -- Reloading module 'res_odbc.so' (ODBC resource)
  == Parsing '/etc/asterisk/res_odbc.conf': Found
[Dec 14 10:44:03] NOTICE[1591]: res_odbc.c:1529 odbc_obj_connect: Connecting asterisk
[Dec 14 10:44:03] NOTICE[1591]: res_odbc.c:1568 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]
[Dec 14 10:44:03] NOTICE[1591]: res_odbc.c:919 load_odbc_config: Registered ODBC class 'asterisk' dsn->[asterisk-connector]
cdr-teste*CLI>
  == Using SIP RTP CoS mark 5
    -- Executing [2020@ramais:1] Dial("SIP/2021-00000002", "SIP/2020,60,tT") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/2020
    -- SIP/2020-00000003 is ringing
       > 0xb6e2f110 -- Probation passed - setting RTP source address to 192.2.1.165:57040
[Dec 14 10:44:16] NOTICE[1593][C-00000001]: res_rtp_asterisk.c:4441 ast_rtp_read: Unknown RTP codec 95 received from '(null)'
    -- SIP/2020-00000003 answered SIP/2021-00000002
       > 0xb6e10210 -- Probation passed - setting RTP source address to 192.2.1.60:8000
       > 0xb6e2f110 -- Probation passed - setting RTP source address to 192.2.1.165:57040
[Dec 14 10:44:17] ERROR[1593][C-00000001]: cdr_odbc.c:163 odbc_log: Unable to retrieve database handle.  CDR failed.
  == Spawn extension (ramais, 2020, 1) exited non-zero on 'SIP/2021-00000002'


I don't know if can be the problem in my files of configuration

Code: Select all
/etc/asterisk/res_odbc.conf


Code: Select all
[asterisk]
enabled => yes
dsn => asterisk-connector
username => root
password => 100567
pooling => no
limit => 1
pre-connect => yes


And my
Code: Select all
/etc/asterisk/cdr_odbc.conf


Code: Select all
;
; cdr_odbc.conf
;
[global]
dsn=asterisk-connector
loguniqueid=yes
username=asterisk
password=100567
dispositionstring=yes
table=cdr               ;"cdr" is default table name
usegmtime=no             ; set to "yes" to log in GMT
hrtime=yes              ;Enables microsecond accuracy with the billsec and duration fields
;newcdrcolumns=yes ; Enable logging of post-1.8 CDR columns (peeraccount, linkedid, sequence)
~           


Can anyone tell me what is the problem?
vitormazuco
Oldsterisk
 
Posts: 51
Joined: Mon Mar 02, 2015 11:37 am
Location: São Paulo, Brazil

Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 1 guest

cron