diff options
author | mjordan <mjordan@digium.com> | 2015-06-14 19:48:26 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-06-15 10:35:01 -0500 |
commit | 15c220870148fd71cbeb72585cafd33569871ecd (patch) | |
tree | b494af0c97b4eb7a2559b9e44c22860942d50e91 /main | |
parent | b8bc15286fd4610221e98f53c34ab486f357198e (diff) |
main/cdr: Carry over the disable flag when 'disable all' is specified
The CDR_PROP function (as well as the NoCDR application) set the
'disable all' flag (AST_CDR_FLAG_DISABLE_ALL) on the current CDR. This
flag is supposed to be applied to all CDRs that are currently in the
chain, as well as all CDRs that may be created in the future. Currently,
however, the flag is only applied to the existing CDRs in the chain; new
CDRs do not receive the 'disable all' flag. In particular, this affects
parallel dials, which generate new CDRs for each pair of channels in
the dial attempt.
This patch carries over the 'disable all' flag when it is specified on a
CDR and a new CDR is generated for the chain.
ASTERISK-24344 #close
Change-Id: I91a0f0031e4d147bdf8a68ecd08304d506fb6a0e
Diffstat (limited to 'main')
-rw-r--r-- | main/cdr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/cdr.c b/main/cdr.c index c1fea78db..8d7f53f17 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -915,6 +915,14 @@ static struct cdr_object *cdr_object_create_and_append(struct cdr_object *cdr) ast_string_field_set(new_cdr, context, cdr_last->context); ast_string_field_set(new_cdr, exten, cdr_last->exten); + /* + * If the current CDR says to disable all future ones, + * keep the disable chain going + */ + if (ast_test_flag(&cdr_last->flags, AST_CDR_FLAG_DISABLE_ALL)) { + ast_set_flag(&new_cdr->flags, AST_CDR_FLAG_DISABLE_ALL); + } + /* Copy over other Party A information */ cdr_object_snapshot_copy(&new_cdr->party_a, &cdr_last->party_a); |