[mod_cdr_pg_csv] optionally honor force_process_cdr for B-leg CDRs#3063
Open
realsama wants to merge 1 commit into
Open
[mod_cdr_pg_csv] optionally honor force_process_cdr for B-leg CDRs#3063realsama wants to merge 1 commit into
realsama wants to merge 1 commit into
Conversation
mod_cdr_pg_csv chooses which legs to log solely from the global `legs` setting (a|b|ab); there is no per-call override. With the default legs=a, the B-leg of a bridged call never produces a CDR and cannot be billed from the pg_csv record, even when the application deliberately wants it. Add an opt-in `honor-force-process-cdr` setting (default off). When enabled, a B-leg whose force_process_cdr channel variable is set is logged regardless of the legs filter, mirroring the existing SWITCH_FORCE_PROCESS_CDR_VARIABLE handling in mod_json_cdr and mod_format_cdr. Default off, so existing behaviour is unchanged.
Author
|
Hi @andywolk could you please take a quick look at this one file PR when you get a chance? Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
mod_cdr_pg_csvchooses which legs to log solely from the globallegssetting(
a|b|ab); there is no per-call override. With the defaultlegs=a, theB-leg of a bridged call (e.g. an outbound
bridge/<Dial>) never produces a CDRand cannot be billed from the pg_csv record, even when the application deliberately
wants it recorded.
mod_json_cdrandmod_format_cdralready handle this via the standardforce_process_cdrchannel variable (SWITCH_FORCE_PROCESS_CDR_VARIABLE), reportedregardless of the leg filter.
mod_cdr_pg_csvhad no equivalent.This adds an opt-in
honor-force-process-cdrsetting (default off). Whenenabled, a B-leg whose
force_process_cdrvariable is set is logged even if thelegsfilter would otherwise skip it. Enable incdr_pg_csv.conf.xml:Type of Change
Related Issues
None.
Testing
Built against
master. The same change (on a 1.10.12 base) is running in production:with the setting on and a bridged B-leg exporting
force_process_cdr=true, the dialedleg now produces its own
cdrrow; with it off, output is identical to current behaviour.Checklist