[Home]

Summary:ASTERISK-22954: [patch] Incorrect treatment of amaflags, accountcode and userfield since ASTERISK-16990
Reporter:Steve Davies (one47)Labels:
Date Opened:2013-12-09 09:52:02.000-0600Date Closed:2017-12-18 11:15:45.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:CDR/General
Versions:1.8.24.0 10.12.3 11.6.0 Frequency of
Occurrence
Frequent
Related
Issues:
is caused byASTERISK-16990 Setting CDR(userfield) through features.conf fails
Environment:Attachments:( 0) patches_1.8_10_11.diff
Description:During a blind transfer, or any other event that causes a channel masquerade, CDR records are swapped. The change made in ASTERISK-16990 (https://reviewboard.asterisk.org/r/1721/) does not take this into account.

This results in the amaflags, accountcode and userfield data for a completely unrealted call leg being copied into a bridge_cdr, just before it is sent to the database :(

It would almost be better if that patch had never been applied - Looking through the changelog, it has had a couple of knock on effects which are already patched.

(Not sure if this applies to version 12 as the bridge code is so changed.)
Comments:By: Steve Davies (one47) 2013-12-09 09:53:23.952-0600

This is 3 patches in 1 file against version 1.8, 10 and 11 respectively. This patch is tested here using Asterisk 1.8 and seems to work fine.

By: Matt Jordan (mjordan) 2013-12-12 16:54:56.657-0600

I enjoy the fact that this right after the comment "this is why you never touch CDR code." :-)

But I agree with your assessment. The point of that code block is to copy over the properties that were changed while the channel was bridged (which would typically happen due to dynamic features) to the CDR that will be posted - but if we happened to have been masqueraded away, what we have on the channel is not what we want.

So, in theory at least, the patch looks good.

But it is CDRs... we should probably run this through the Asterisk Test Suite at a minimum, and it'd be nice to get a few others to verify it.

By: Joshua C. Colp (jcolp) 2017-12-18 11:15:45.486-0600

CDRs were majorly rewritten as a result of work done in Asterisk 12 and Asterisk 13. We no longer swap records and such things.

If this issue is still applicable, though, feel free to comment and it will automatically reopen.