[asterisk-bugs] [JIRA] (ASTERISK-23679) CDR userfield merged incorrectly in ast_bridge_call

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Apr 30 16:21:43 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217803#comment-217803 ] 

Matt Jordan commented on ASTERISK-23679:
----------------------------------------

Yes, you're missing my point.

Your patch:
{noformat}
 			snprintf(tmp, sizeof(tmp), "%s;%s", ast_channel_cdr(chan)->userfield, ast_channel_cdr(peer)->userfield);
-			ast_cdr_appenduserfield(chan, tmp);
+			ast_cdr_setuserfield(chan, tmp);
 		} else {
{noformat}

{{ast_cdr_setuserfield}} *destroys* what was on the channel. It doesn't append - it removes it. As I said, if the userfield on the channel was previously set because the channel was in a bridge with some other channel, you blow away that value instead of appending to it. That's a change in behaviour. Yes, the existing code is wrong - but yours changes the behaviour as opposed to just fixing the original bad append.

> CDR userfield merged incorrectly in ast_bridge_call 
> ----------------------------------------------------
>
>                 Key: ASTERISK-23679
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23679
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Features
>    Affects Versions: 11.9.0
>            Reporter: Vitezslav Novy
>            Severity: Minor
>         Attachments: 11-cdr_userfield.patch
>
>
> In function ast_bridge_call (in main/features.c) CDR field of B leg is appended to  CDR userfield of A leg.
> when at start userfield of leg A is 'aaa' and userfield of leg B is 'bbb' result in leg A userfield should be 'aaa;bbb'.
> Because of incorrect merge result is 'aaaaaa;bbb' 



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list