[asterisk-users] Is possible to install CDR-Viewer in Asterisk 11?

Vitor Mazuco vitor.mazuco at gmail.com
Wed Dec 16 11:23:11 CST 2015

Hi everyone!

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

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]
  == Using SIP RTP CoS mark 5
    -- Executing [2020 at 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
[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
       > 0xb6e2f110 -- Probation passed - setting RTP source address
[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


enabled => yes
dsn => asterisk-connector
username => root
password => 100567
pooling => no
limit => 1
pre-connect => yes

And my [code]/etc/asterisk/cdr_odbc.conf[/code]

; cdr_odbc.conf
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?

More information about the asterisk-users mailing list