[Home]

Summary:ASTERISK-13744: [patch] SetVar from Cli or AMI not showing value on CDR Record
Reporter:Sebastian Gutierrez (sum)Labels:
Date Opened:2009-03-13 09:52:31Date Closed:2011-07-26 15:13:52
Priority:MinorRegression?No
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090505__DEBUG__issue14662.diff.txt
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.
Comments:By: Tilghman Lesher (tilghman) 2009-03-13 11:43:28

What are the exact commands that you are sending to set these variables?

By: Sebastian Gutierrez (sum) 2009-03-13 11:50:19

example from cli:

*CLI> core set chanvar SIP/1001-09656660 CDR(userfield) test
-- Channel variable 'CDR(userfield)' set to 'test' for 'SIP/1001-09656660'

*CLI> core show channel SIP/1001-09656660
.....
.....
 CDR Variables:
....
....
level 1: userfield=test


When Hangup the userfield is empty on mysql table.


from ami is the same.

By: Sebastian Gutierrez (sum) 2009-03-20 21:35:16

same issue with 1.6.2 (tested through AMI) beta 1, and the last addons 1.6.1....

there seems to be that core set chanvar has been deprecated, is it possible now to set directly from cli

UPDATE: I fund dialplab set chanvar, the issue still remains



By: Sebastian Gutierrez (sum) 2009-04-02 20:11:01

any update on this issue??

By: Matthew Nicholson (mnicholson) 2009-04-03 16:16:42

No updates at this time.  I do have some questions for you.

1. From your comment on 2009-03-20, what does this mean: "I fund dialplab set chanvar, the issue still remains"?

2. If you use one of the text cdr backends (cdr_csv, or cdr_custom), does this problem still occur?

By: Sebastian Gutierrez (sum) 2009-04-03 17:33:11

1. forget that comment, was about finding the commands to set the viarable from cli.

2. I made a call to the queue then from cli:

localhost*CLI> dialplan set chanvar SIP/1001-0a461b88  CDR(type) record
localhost*CLI>
   -- Channel variable 'CDR(type)' set to 'record' for 'SIP/1001-0a461b88'
(on both channels just in case)

then hangup, the result on cdr_csv is:

"12","1001","141","outgoing","""1001"" <1001>","SIP/1001-0a461b88","1001","Queue","Pedidos,c,,,120,,CTI,,","2009-04-03 05:16:11","2009-04-03 05:16:11","2009-04-03 05:16:54",43,43,"ANSWERED","DOCUMENTATION","1238735771.0",""

By: Sebastian Gutierrez (sum) 2009-04-13 15:27:00

any update on this one? thnks!

By: Matthew Nicholson (mnicholson) 2009-04-21 15:19:30

With cdr_custom this works fine for me.

cdr_custom.conf:
[mappings]
Master.csv => "${CDR(type)}"

extensions.conf:
[default]
exten => 100,1,Noop
exten => 100,n,Answer
exten => 100,n,Wait(30)
exten => 100,n,Hangup

core set chanvar SIP/chan-1234abc CDR(type) type

That produces a line with "type" on it in Master.csv.  Userfield should work with cdr_csv, but custom variables won't.  I tested with the latest SVN version of 1.6.0 (r189666).

How exactly are you reproducing this bug?  Also please test with cdr_custom so that we can better classify this as either a general cdr bug or a bug with cdr_mysql.

By: Sebastian Gutierrez (sum) 2009-04-21 15:27:50

I'm not using cdr_custo just cdr_mysql, when I do something like this:

core set chanvar SIP/chan-1234abc CDR(type) type

and I check the channels variables I can see the CDR(type) value setted, but when I hangup is not shown on Mysql table.

So for what you are saying is ok that on cdr_csv the custom variable isn't there for that cases exists the cdr_custom, but this issue seems to be on cdr_mysql then, cause the variable is shown on channel variables if I check them from the cli.
Let me know if you need any particular test.

By: Matthew Nicholson (mnicholson) 2009-04-21 15:30:57

Yes.  This seems to be a problem specific to cdr_mysql.

@lmadsen
Please reassign this bug to the correct person.

By: Leif Madsen (lmadsen) 2009-04-21 21:12:39

Reassigned to Tilghman as I believe he is the most appropriate to look into this issue. Thanks!

By: Sebastian Gutierrez (sum) 2009-04-29 19:47:06

any update on this issue?

By: Tilghman Lesher (tilghman) 2009-05-04 18:05:58

Please turn on debug, level 1, and show the CLI output when the CDR is posted.

By: Sebastian Gutierrez (sum) 2009-05-04 20:02:41

Asterisk*CLI> dialplan set chanvar SIP/1001-08d1d138 CDR(type) prueba
Asterisk*CLI>
   -- Channel variable 'CDR(type)' set to 'prueba' for 'SIP/1001-08d1d138'
Asterisk*CLI>
[May  4 19:17:39] DEBUG[9936]: rtp.c:1181 ast_rtcp_read: Got RTCP report of 176 bytes
[May  4 19:17:43] DEBUG[9936]: rtp.c:1181 ast_rtcp_read: Got RTCP report of 176 bytes
[May  4 19:17:44] DEBUG[9936]: rtp.c:1181 ast_rtcp_read: Got RTCP report of 160 bytes
[May  4 19:17:44] DEBUG[9937]: audiohook.c:257 audiohook_read_frame_both: Failed to get 160 samples from write factory 0x8d4c588
[May  4 19:17:44] DEBUG[9937]: audiohook.c:257 audiohook_read_frame_both: Failed to get 160 samples from write factory 0x8d4c588
[May  4 19:17:44] DEBUG[9936]: channel.c:4524 ast_generic_bridge: Didn't get a frame from channel: SIP/1001-08d1d138
[May  4 19:17:44] DEBUG[9936]: channel.c:4948 ast_channel_bridge: Bridge stops bridging channels IAX2/1003-16335 and SIP/1001-08d1d138
[May  4 19:17:44] DEBUG[9936]: 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-04 19:17:17','1003','outgoing','IAX2/1003-16335','Agent1','Queue','Pedidos','27','25','ANSWERED','DOCUMENTATION','Agente3','1241475437.10','','')
[May  4 19:17:44] DEBUG[9936]: cdr_addon_mysql.c:299 mysql_log: Inserting a CDR record.
[May  4 19:17:44] DEBUG[9936]: 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-04 19:17:17','1003','1003','121','outgoing','IAX2/1003-16335','Agent1','Queue','Pedidos','27','25','ANSWERED','3','Agente3','1241475437.10')
[May  4 19:17:44] DEBUG[9936]: res_config_mysql.c:1596 mysql_reconnect: MySQL RealTime: Connection okay.
[May  4 19:17:44] DEBUG[9936]: res_config_mysql.c:830 store_mysql: MySQL RealTime: Insert SQL: INSERT INTO queue_log (time, callid, queuename, agent, event, data) VALUES ('1241475464', '1241475437.10', 'Pedidos', 'Agent1', 'COMPLETEAGENT', '2|25|1')
[May  4 19:17:44] DEBUG[9936]: res_config_mysql.c:843 store_mysql: MySQL RealTime: row inserted on table: queue_log, id: 1305
[May  4 19:17:44] DEBUG[9936]: channel.c:1671 ast_hangup: Hanging up channel 'SIP/1001-08d1d138'

By: Tilghman Lesher (tilghman) 2009-05-05 08:49:07

Okay, that log clarifies that it is indeed the core where the problem lies, not in cdr_addon_mysql.  This patch gives me additional information, but you'll need to configure Asterisk specially in order to give me maximum information:

% ./configure --enable-dev-mode

will enable some extra debugging information.  Please apply this patch and re-run configure with the above flag, compile, install, restart, then supply the same console output with debug level 1.

By: Sebastian Gutierrez (sum) 2009-05-05 10:07:43

Asterisk*CLI> dialplan set chanvar SIP/1001-09789420 CDR(type) prueba
Asterisk*CLI>
   -- Channel variable 'CDR(type)' set to 'prueba' for 'SIP/1001-09789420'
Asterisk*CLI>
[May  5 09:24:04] DEBUG[18677]: rtp.c:1181 ast_rtcp_read: Got RTCP report of 176 bytes
[May  5 09:24:06] DEBUG[18677]: rtp.c:1181 ast_rtcp_read: Got RTCP report of 160 bytes
[May  5 09:24:06] DEBUG[18678]: audiohook.c:257 audiohook_read_frame_both: Failed to get 160 samples from write factory 0x9790330
[May  5 09:24:06] DEBUG[18677]: channel.c:4524 ast_generic_bridge: Didn't get a frame from channel: SIP/1001-09789420
[May  5 09:24:06] DEBUG[18677]: channel.c:4948 ast_channel_bridge: Bridge stops bridging channels IAX2/1003-3830 and SIP/1001-09789420
[May  5 09:24:06] DEBUG[18677]: 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 09:23:33','1003','outgoing','IAX2/1003-3830','Agent1','Queue','Pedidos','33','23','ANSWERED','DOCUMENTATION','Agente3','1241526213.0','','')
[May  5 09:24:06] DEBUG[18677]: cdr_addon_mysql.c:299 mysql_log: Inserting a CDR record.
[May  5 09:24:06] DEBUG[18677]: 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 09:23:33','1003','1003','121','outgoing','IAX2/1003-3830','Agent1','Queue','Pedidos','33','23','ANSWERED','3','Agente3','1241526213.0')
[May  5 09:24:06] DEBUG[18677]: res_config_mysql.c:1596 mysql_reconnect: MySQL RealTime: Connection okay.
[May  5 09:24:06] DEBUG[18677]: res_config_mysql.c:830 store_mysql: MySQL RealTime: Insert SQL: INSERT INTO queue_log (time, callid, queuename, agent, event, data) VALUES ('1241526246', '1241526213.0', 'Pedidos', 'Agent1', 'COMPLETEAGENT', '10|23|1')
[May  5 09:24:06] DEBUG[18677]: res_config_mysql.c:843 store_mysql: MySQL RealTime: row inserted on table: queue_log, id: 1312
[May  5 09:24:06] DEBUG[18677]: channel.c:1671 ast_hangup: Hanging up channel 'SIP/1001-09789420'
[May  5 09:24:06] DEBUG[18677]: chan_sip.c:5601 sip_hangup: Hangup call SIP/1001-09789420, SIP callid 6086cecc469004ee213732a7121965ff@192.168.175.134
[May  5 09:24:06] DEBUG[18657]: app_queue.c:1057 handle_statechange: Device 'SIP/1001' changed to state '1' (Not in use)
[May  5 09:24:06] DEBUG[18657]: app_queue.c:1057 handle_statechange: Device 'SIP/1001' changed to state '1' (Not in use)
[May  5 09:24:06] DEBUG[18677]: res_config_mysql.c:1596 mysql_reconnect: MySQL RealTime: Connection okay.

By: Tilghman Lesher (tilghman) 2009-05-05 10:31:01

sum:  Please repeat, setting userfield only.

By: Sebastian Gutierrez (sum) 2009-05-05 10:58:30

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: #0: [0x80ec84e] /usr/sbin/asterisk(ast_backtrace+0x3e) [0x80ec84e]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: #1: [0x808d572] /usr/sbin/asterisk(ast_cdr_setuserfield+0x62) [0x808d572]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: #2: [0x5f3c70] /usr/lib/asterisk/modules/func_cdr.so [0x5f3c70]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: #3: [0x810bb29] /usr/sbin/asterisk(ast_func_write+0xf9) [0x810bb29]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: #4: [0x810be4b] /usr/sbin/asterisk(pbx_builtin_setvar_helper+0x1eb) [0x810be4b]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-1: [0x810c9f1] /usr/sbin/asterisk [0x810c9f1]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-2: [0x80a35ee] /usr/sbin/asterisk(ast_cli_command_full+0xfe) [0x80a35ee]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-3: [0x80a387c] /usr/sbin/asterisk(ast_cli_command_multiple_full+0x6c) [0x80a387c]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-4: [0x8075bb2] /usr/sbin/asterisk [0x8075bb2]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-5: [0x81592fb] /usr/sbin/asterisk [0x81592fb]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-6: [0x51749b] /lib/libpthread.so.0 [0x51749b]
[May  5 10:13:52] DEBUG[19474]: logger.c:1233 ast_backtrace: ASTERISK-7: [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

By: Sebastian Gutierrez (sum) 2009-05-06 16:22:45

any other test??

By: Tilghman Lesher (tilghman) 2009-05-06 16:40:14

a) What are the contents of your cdr_sqlite3_custom.conf ?
b) Output of 'describe cdr;' on your mysql command line ?

By: Sebastian Gutierrez (sum) 2009-05-06 16:45:45

a) it's the default
;
; Mappings for custom config file
;
[master] ; currently, only file "master.db" is supported, with only one table at a time.
table   => cdr
columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, test
values  => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}','${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}'


b)
Field type null keyy default extra
'calldate', 'datetime', 'NO', 'MUL', '0000-00-00 00:00:00', ''
'clid', 'varchar(80)', 'YES', '', '', ''
'src', 'varchar(80)', 'YES', '', '', ''
'dst', 'varchar(80)', 'YES', 'MUL', '', ''
'dcontext', 'varchar(80)', 'YES', '', '', ''
'channel', 'varchar(80)', 'YES', '', '', ''
'dstchannel', 'varchar(80)', 'YES', '', '', ''
'lastapp', 'varchar(80)', 'YES', '', '', ''
'lastdata', 'varchar(80)', 'YES', '', '', ''
'duration', 'int(11)', 'YES', '', '0', ''
'billsec', 'int(11)', 'YES', '', '0', ''
'disposition', 'varchar(45)', 'YES', '', '', ''
'amaflags', 'int(11)', 'YES', '', '0', ''
'accountcode', 'varchar(20)', 'YES', 'MUL', '', ''
'userfield', 'varchar(255)', 'YES', '', '', ''
'uniqueid', 'varchar(32)', 'YES', '', '', ''
'type', 'varchar(3)', 'YES', '', '', ''
'guid', 'varchar(45)', 'YES', '', '', ''
'causecode', 'varchar(45)', 'YES', '', '16', ''
'campaign', 'varchar(45)', 'YES', '', '', ''

By: Tilghman Lesher (tilghman) 2009-05-07 12:59:52

b) that's not the output of 'desc cdr'.  That looks like your table plan, but not what is actually within the table.

By: Sebastian Gutierrez (sum) 2009-05-07 16:11:12

that is the output of the mysql client (windows gui tools), what's exactly what you need? so I can provide it.

By: Tilghman Lesher (tilghman) 2009-05-07 18:26:49

I believe the Windows gui client is caching the information.  You should login to the Mysql system and use the 'mysql' command line tool to obtain that information.

By: Sebastian Gutierrez (sum) 2009-05-07 18:31:57

this is the output (looks the same to me)

mysql> desc cdr;
+-------------+--------------+------+-----+---------------------+-------+
| Field       | Type         | Null | Key | Default             | Extra |
+-------------+--------------+------+-----+---------------------+-------+
| calldate    | datetime     | NO   | MUL | 0000-00-00 00:00:00 |       |
| clid        | varchar(80)  | YES  |     | NULL                |       |
| src         | varchar(80)  | YES  |     | NULL                |       |
| dst         | varchar(80)  | YES  | MUL | NULL                |       |
| dcontext    | varchar(80)  | YES  |     | NULL                |       |
| channel     | varchar(80)  | YES  |     | NULL                |       |
| dstchannel  | varchar(80)  | YES  |     | NULL                |       |
| lastapp     | varchar(80)  | YES  |     | NULL                |       |
| lastdata    | varchar(80)  | YES  |     | NULL                |       |
| duration    | int(11)      | YES  |     | 0                   |       |
| billsec     | int(11)      | YES  |     | 0                   |       |
| disposition | varchar(45)  | YES  |     | NULL                |       |
| amaflags    | int(11)      | YES  |     | 0                   |       |
| accountcode | varchar(20)  | YES  | MUL | NULL                |       |
| userfield   | varchar(255) | YES  |     | NULL                |       |
| uniqueid    | varchar(32)  | YES  |     | NULL                |       |
| type        | varchar(3)   | YES  |     | NULL                |       |
| guid        | varchar(45)  | YES  |     | NULL                |       |
| causecode   | varchar(45)  | YES  |     | 16                  |       |
| campaign    | varchar(45)  | YES  |     | NULL                |       |
+-------------+--------------+------+-----+---------------------+-------+
20 rows in set (0.00 sec)

I'm using MySQL 5.1 btw. maybe changed the beheavior of that sentence.



By: Sebastian Gutierrez (sum) 2009-05-12 16:15:15

any other way to get the info you need?

By: Sebastian Gutierrez (sum) 2009-05-26 18:44:43

anything I can do to move this issue forward? thanks!

By: Tilghman Lesher (tilghman) 2009-05-27 02:04:42

The only thing that's going to move this issue in any direction whatsoever is for someone to track down exactly where the problem lies.  If moving this issue forward is important to you, that is what you'll need to do.

By: Sebastian Gutierrez (sum) 2009-05-27 13:44:15

I made some test and I would like someone to point me on the right direction to be able to check the code.

My last test was:

1) I made a call to a queue, while the call was waiting for an agent a set the chanvar and hangup the call, the cdr shows correctly the value setted (CDR(type)=test)

2) Same test but an agent answered the call, I seted both channels with the same var as before when I hung up the value is not present at cdr

Seems to me that when merging the values of the channels to make the cdr record, is not checking for the custom var.

By: Sebastian Gutierrez (sum) 2009-06-15 08:46:39

Other test I made:

I setted on the dialplan CDR(type)= test
I checked at the channel vars and was setted ok
I changed the var to CDR(type) = test2 and checked the channel vars and was successfully updated, when I hang up, the CDR on MySQL shows CDR(type) = test
and not test2

any hint?

By: Tilghman Lesher (tilghman) 2009-06-15 10:49:30

sum:  again, the only way you're going to move this forward is to figure it out yourself.  We're baffled by this behavior.

By: Sebastian Gutierrez (sum) 2009-06-15 11:09:24

I just wanted to add the info to the issue, and know if anyone reading this has any suggestion about where to look at. As you now the Asterisk code much better I thought if I add my results here someone could give me a hint, I'm a bit lost where the problem really is.
I'll try to find the problem by myself but any help is appreciated.

By: David Woolley (davidw) 2009-11-04 13:21:19.000-0600

I think the problem here is that only the copy of the CDR on the channel is getting set, not that on the bridge.  I tried using dialplan set chanvar on a bridged channel, for the userfield.  The change took according to core show channel, but when I ended the call, the original userfield value was output.

By: Sebastian Gutierrez (sum) 2011-02-10 13:34:35.000-0600

any update on this?

By: Leif Madsen (lmadsen) 2011-07-26 14:18:00.606-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!