cdr: allow disabling CDR by default on new channels

Adds a new option, defaultenabled, to the CDR core to
control whether or not CDR is enabled on a newly created
channel. This allows CDR to be disabled by default on
new channels and require the user to explicitly enable
CDR if desired. Existing behavior remains unchanged.

ASTERISK-29808 #close

Change-Id: Ibb78c11974bda229bbb7004b64761980e0b2c6d1
This commit is contained in:
Naveen Albert
2021-12-15 18:36:42 +00:00
committed by Friendly Automation
parent cf17b3d211
commit 1a8d320a29
5 changed files with 48 additions and 3 deletions

View File

@@ -224,6 +224,7 @@ enum ast_cdr_settings {
CDR_END_BEFORE_H_EXTEN = 1 << 4, /*!< End the CDR before the 'h' extension runs */
CDR_INITIATED_SECONDS = 1 << 5, /*!< Include microseconds into the billing time */
CDR_DEBUG = 1 << 6, /*!< Enables extra debug statements */
CDR_CHANNEL_DEFAULT_ENABLED = 1 << 7, /*!< Whether CDR is enabled for each channel by default */
};
/*! \brief CDR Batch Mode settings */