Hello abw10im ,
First thanks for your help . I will try to answer your questions :
Which module is used to post the CDR ( or cdr_mysql.so cdr_adaptive_odbc.so or cdr_odbc.so ) ?
I can not answer that question, but I believe it is the cdr_adaptive_odbc.so as those you mentioned only set up the file cdr_adaptive_odbc.conf .
Pls show the output of asterisk- rx " cdr show status " .
[root @ localhost ~ ] # asterisk- rx " cdr show status "
Call Detail Record ( CDR ) settings
Logging : Enabled
Mode: Simple
Log unanswered calls : No
Log congestion : No
-
Registered Backends
csv
Adaptive ODBC
cdr -custom
[root @ localhost ~ ] #
And pls post the content of the Appropriate conf -file ( cdr_mysql.conf , cdr_odbc.conf or cdr_adaptive_odbc.conf ) .
File cdr_odbc.conf :
;
, cdr_odbc.conf
;
, [ global]
, dsn = MySQL -test
, loguniqueid = yes
, 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
File cdr_adaptive_odbc.conf :
[ adaptive_connection ]
connection = asterisk
table = cdr
File cdr_mysql.conf :
;
, Note - if the database server is hosted on the machine the same- the
, Asterisk server , you can Achieve a local Unix socket connection by
, Setting hostname = localhost
;
, Port and sock Both are optional parameters . If hostname is specified
, And is not " localhost " (you can use address 127.0.0.1 instead ) , then
, Cdr_mysql will attempt to connect to the specified port or use the
Being the default port . If hostname is not specified or if hostname is
, " Localhost " , then cdr_mysql will attempt to connect to the socket file
, Specified by sock or otherwise use the default socket file .
;
, [ global]
, hostname = database.host.name
, dbname = asteriskcdrdb
, table = cdr
, password = password
, user = asteriskcdruser
, port = 3306
, sock = / tmp / mysql.sock
, timezone = UTC ; Previously called usegmtime
;
, If your system 's locale Differs from mysql database character set ,
, Cdr_mysql can damage non - latin characters in CDR variables. Use this
, Option to protect your data .
; charset = koi8r
;
, Older versions of cdr_mysql Set the field to calldate Whenever the
, Record was posted , rather than the start date of the call . this flag
, Reverts to the old ( incorrect) behavior. Note that you’ll also need
, To comment out the " start = calldate " alias , below , to use this .
, compat = no
;
, Ssl connections (optional )
, ssl_ca =
, ssl_cert =
, ssl_key =
;
, You may also configure the field names used in the CDR table .
;
[ columns ]
; static " " = >
, alias = >
alias start = > calldate
, alias clid = > <a_field_not_named_clid>
, alias src = > <a_field_not_named_src>
, alias dst = > <a_field_not_named_dst>
, alias dcontext = > <a_field_not_named_dcontext>
, alias channel = > <a_field_not_named_channel>
, alias dstchannel = > <a_field_not_named_dstchannel>
, alias lastapp = > <a_field_not_named_lastapp>
, alias lastdata = > <a_field_not_named_lastdata>
, alias duration = > <a_field_not_named_duration>
, alias billsec = > <a_field_not_named_billsec>
, alias disposition = > <a_field_not_named_disposition>
, alias amaflags = > <a_field_not_named_amaflags>
, alias accountcode = > <a_field_not_named_accountcode>
, alias UserField = > <a_field_not_named_userfield>
, alias uniqueid = > <a_field_not_named_uniqueid>
At least it would be helpful to see Your mysql - tablestructure ( cdr desc Within mysql ) .
This I did not understand , but I imagine it would be like the table was created , then follows the script used :
CREATE TABLE cdr (
calldate datetime NOT NULL default ‘0000 - 00-00 00:00:00 ’ ,
clid varchar ( 80 ) NOT NULL default’’ ,
src varchar ( 80 ) NOT NULL default’’ ,
dst varchar ( 80 ) NOT NULL default’’ ,
dcontext varchar ( 80 ) NOT NULL default’’ ,
channel varchar ( 80 ) NOT NULL default’’ ,
dstchannel varchar ( 80 ) NOT NULL default’’ ,
lastapp varchar ( 80 ) NOT NULL default’’ ,
lastdata varchar ( 80 ) NOT NULL default’’ ,
duration int ( 11 ) NOT NULL default ‘0 ’ ,
billsec int ( 11 ) NOT NULL default ‘0 ’ ,
disposition varchar ( 45 ) NOT NULL default’’ ,
amaflags int ( 11 ) NOT NULL default ‘0 ’ ,
accountcode varchar ( 20 ) NOT NULL default’’ ,
uniqueid varchar ( 32 ) NOT NULL default’’ ,
UserField varchar ( 255 ) NOT NULL default’’
);
I hope you managed to pass the information you need.
thank you
Ivan Paes