[asterisk-bugs] [Asterisk 0014662]: [patch] SetVar from Cli or AMI not showing value on CDR Record

Asterisk Bug Tracker noreply at bugs.digium.com
Tue May 5 10:58:30 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14662 
====================================================================== 
Reported By:                sum
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   14662
Category:                   Addons/cdr_addon_mysql
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0.6 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-13 09:52 CDT
Last Modified:              2009-05-05 10:58 CDT
====================================================================== 
Summary:                    [patch] SetVar from Cli or AMI not showing value on
CDR Record
Description: 
Setting a value of CDR like:

CDR(userfield) or a custom variable CDR(test) are not shown on cdr record
(MySQL Backend), when you check channel variables these looks ok, but at
the moment of hangup and check CDR record there is nothing there.

If I set te variable from the Dialplan works fine.
====================================================================== 

---------------------------------------------------------------------- 
 (0104222) sum (reporter) - 2009-05-05 10:58
 http://bugs.digium.com/view.php?id=14662#c104222 
---------------------------------------------------------------------- 
Asterisk*CLI> dialplan set chanvar SIP/1001-0978cd38 CDR(userfield) prueba
Asterisk*CLI> 
    -- Channel variable 'CDR(userfield)' set to 'prueba' for
'SIP/1001-0978cd38'
[May  5 10:13:52] DEBUG[19474]: cdr.c:952 ast_cdr_setuserfield: Setting
userfield to 'prueba'
[May  5 10:13:52] DEBUG[19474]: logger.c:1231 ast_backtrace: Got 12
backtrace records
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=0:
[0x80ec84e] /usr/sbin/asterisk(ast_backtrace+0x3e) [0x80ec84e]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=1:
[0x808d572] /usr/sbin/asterisk(ast_cdr_setuserfield+0x62) [0x808d572]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=2:
[0x5f3c70] /usr/lib/asterisk/modules/func_cdr.so [0x5f3c70]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=3:
[0x810bb29] /usr/sbin/asterisk(ast_func_write+0xf9) [0x810bb29]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=4:
[0x810be4b] /usr/sbin/asterisk(pbx_builtin_setvar_helper+0x1eb)
[0x810be4b]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=5:
[0x810c9f1] /usr/sbin/asterisk [0x810c9f1]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=6:
[0x80a35ee] /usr/sbin/asterisk(ast_cli_command_full+0xfe) [0x80a35ee]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=7:
[0x80a387c] /usr/sbin/asterisk(ast_cli_command_multiple_full+0x6c)
[0x80a387c]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=8:
[0x8075bb2] /usr/sbin/asterisk [0x8075bb2]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=9:
[0x81592fb] /usr/sbin/asterisk [0x81592fb]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=10:
[0x51749b] /lib/libpthread.so.0 [0x51749b]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace:
http://bugs.digium.com/view.php?id=11:
[0x1e142e] /lib/libc.so.6(clone+0x5e) [0x1e142e]
[May  5 10:13:53] DEBUG[19476]: rtp.c:1181 ast_rtcp_read: Got RTCP report
of 176 bytes
[May  5 10:13:56] DEBUG[19476]: rtp.c:1181 ast_rtcp_read: Got RTCP report
of 176 bytes
[May  5 10:13:59] DEBUG[19476]: rtp.c:1181 ast_rtcp_read: Got RTCP report
of 176 bytes
[May  5 10:14:01] DEBUG[19477]: audiohook.c:257 audiohook_read_frame_both:
Failed to get 160 samples from write factory 0x9790330
[May  5 10:14:02] DEBUG[19476]: rtp.c:1181 ast_rtcp_read: Got RTCP report
of 176 bytes
[May  5 10:14:02] DEBUG[19477]: audiohook.c:238 audiohook_read_frame_both:
Failed to get 160 samples from read factory 0x978f910
[May  5 10:14:02] DEBUG[19476]: rtp.c:1181 ast_rtcp_read: Got RTCP report
of 160 bytes
[May  5 10:14:02] DEBUG[19477]: audiohook.c:257 audiohook_read_frame_both:
Failed to get 160 samples from write factory 0x9790330
[May  5 10:14:02] DEBUG[19476]: channel.c:4524 ast_generic_bridge: Didn't
get a frame from channel: SIP/1001-0978cd38
[May  5 10:14:02] DEBUG[19476]: channel.c:4948 ast_channel_bridge: Bridge
stops bridging channels IAX2/1003-5011 and SIP/1001-0978cd38
[May  5 10:14:02] DEBUG[19476]: cdr_sqlite3_custom.c:261 sqlite3_log:
About to log: INSERT INTO cdr
(calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,test)
VALUES ('2009-05-05
10:13:21','1003','outgoing','IAX2/1003-5011','Agent1','Queue','Pedidos','41','40','ANSWERED','DOCUMENTATION','Agente3','1241529201.2','','')
[May  5 10:14:02] DEBUG[19476]: cdr_addon_mysql.c:299 mysql_log: Inserting
a CDR record.
[May  5 10:14:02] DEBUG[19476]: cdr_addon_mysql.c:302 mysql_log: SQL
command as follows: INSERT INTO cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid)
VALUES ('2009-05-05
10:13:21','1003','1003','121','outgoing','IAX2/1003-5011','Agent1','Queue','Pedidos','41','40','ANSWERED','3','Agente3','1241529201.2')
[May  5 10:14:02] DEBUG[19476]: res_config_mysql.c:1596 mysql_reconnect:
MySQL RealTime: Connection okay.
[May  5 10:14:02] DEBUG[19476]: res_config_mysql.c:830 store_mysql: MySQL
RealTime: Insert SQL: INSERT INTO queue_log (time, callid, queuename,
agent, event, data) VALUES ('1241529242', '1241529201.2', 'Pedidos',
'Agent1', 'COMPLETEAGENT', '1|40|1')
[May  5 10:14:02] DEBUG[19476]: res_config_mysql.c:843 store_mysql: MySQL
RealTime: row inserted on table: queue_log, id: 1316 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-05 10:58 sum            Note Added: 0104222                          
======================================================================




More information about the asterisk-bugs mailing list