[asterisk-bugs] [JIRA] (ASTERISK-29166) CDR_PROP, setting party_a, and expectations
Sean Bright (JIRA)
noreply at issues.asterisk.org
Wed Jul 7 14:51:33 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255550#comment-255550 ]
Sean Bright edited comment on ASTERISK-29166 at 7/7/21 2:49 PM:
----------------------------------------------------------------
Looking at [the below code|https://github.com/asterisk/asterisk/blob/6818c3d1d274dd8da973e693e3d98b565a762818/main/cdr.c#L1203-L1208], should the following be changed:
{noformat}
/* Try the Party A flag */
if (ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && !ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return left;
} else if (!ast_test_flag(right, AST_CDR_FLAG_PARTY_A) && ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return right;
}
{noformat}
The second evaluation appear to not take the left into consideration?
{noformat}
/* Try the Party A flag */
if (ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && !ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return left;
} else if (!ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return right;
}
{noformat}
was (Author: rossbeer):
Looking at the below code, should the following be changed:
{noformat}
/* Try the Party A flag */
if (ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && !ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return left;
} else if (!ast_test_flag(right, AST_CDR_FLAG_PARTY_A) && ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return right;
}
{noformat}
The second evaluation appear to not take the left into consideration?
{noformat}
/* Try the Party A flag */
if (ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && !ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return left;
} else if (!ast_test_flag(left, AST_CDR_FLAG_PARTY_A) && ast_test_flag(right, AST_CDR_FLAG_PARTY_A)) {
return right;
}
{noformat}
> CDR_PROP, setting party_a, and expectations
> -------------------------------------------
>
> Key: ASTERISK-29166
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29166
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/General, Functions/func_cdr
> Affects Versions: 16.14.1, 18.0.1
> Reporter: Kevin Harwell
> Severity: Trivial
>
> The [CDR_PROP|https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Function_CDR_PROP] function seemingly allows one to specify which channel is to be _party_a_. However in practice this does not seem to be the case. Or at least it allows picking in such a limited capacity to be of almost no use.
> So this is kind of a two-parter:
> 1) Figure out the use case(s) for when _party_a_ can be set via the function, and actually effect a record. If found then update the documentation. If possible fix any bugs related to setting _party_a_ on a given channel.
> 2) Potentially make it so setting _party_a_ using the function overrides even the dialer/dialed.
> To the second part, that's more of a new feature and after some preliminary code perusal possibly quite invasive. As is, a dialing channel is always _party_a_ and the dialed channel is _party_b_. In order to override this behavior one would have to "swap" the _party_a_ and _party_b_ snapshots on the cdr structure. Finding the various places to do that is not trivial, and a basic swap probably has unforeseen circumstances (we are talking about CDRs here after all).
> As a side note, I put Asterisk 12.0.0. as an affected version since it seems like things have been this way since the rewrite.
> Current CDR "spec":
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list