[asterisk-bugs] [Asterisk 0013333]: mysql cdr not loging custom fields

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 18 17:24:54 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13333 
====================================================================== 
Reported By:                lazytt
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13333
Category:                   CDR/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.18 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-18 09:02 CDT
Last Modified:              2008-08-18 17:24 CDT
====================================================================== 
Summary:                    mysql cdr not loging custom fields
Description: 
When trying to add custom fields to the mysql crd table, asterisk will not
log the values assigned to them. I added a field called "monitor" and tried
using the following dialplan:

exten => s,1000,Set(CDR(monitor)=${CALLFILENAME}.${MIXMON_FORMAT})

However, all asterisk adds is:
cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield)
VALUES ('2008-08-18 17:01:59','\"lazytt\"
<220>','220','123456','from-internal',
'SIP/220-09024700','Zap/1-1','Dial','ZAP/g0/123456|300|T',10,5,'ANSWERED',3,'','1219068119.2','')

Using the same dialplan with variables such as userfeild works

====================================================================== 

---------------------------------------------------------------------- 
 (0091532) blitzrage (administrator) - 2008-08-18 17:24
 http://bugs.digium.com/view.php?id=13333#c91532 
---------------------------------------------------------------------- 
As mentioned by the other two posters you need CDR adaptive ODBC in order
to write custom fields to the database.

Backport available in the svncommunity via
http://svncommunity.digium.com/view/tilghman/branches/1.4/

Files:

cdr_adaptive_odbc.c
cdr_adaptive_odbc.conf.sample 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-18 17:24 blitzrage      Note Added: 0091532                          
======================================================================




More information about the asterisk-bugs mailing list