aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 19:14:04 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 19:14:04 +0000
commit1c9e1d5b2e00b34755f2f198e59fd4e1f8c18657 (patch)
treefa17112c46ada09909b0b9249cccd62784ed3308 /main
parent14f999674368002d851d26b5f52db0ce642c8daf (diff)
Add an 'e' option to ResetCDR which re-enables a CDR that has been disabled.
(closes issue #11170) Reported by: kratzers Patches: ResetCDR.1.diff uploaded by kratzers (license 307) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104215 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/cdr.c6
-rw-r--r--main/pbx.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/main/cdr.c b/main/cdr.c
index 488eeee1c..00d66afec 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -1025,6 +1025,12 @@ void ast_cdr_reset(struct ast_cdr *cdr, struct ast_flags *_flags)
ast_set_flag(cdr, AST_CDR_FLAG_POSTED);
}
+ /* enable CDR only */
+ if (ast_test_flag(&flags, AST_CDR_FLAG_POST_ENABLE)) {
+ ast_clear_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+ continue;
+ }
+
/* clear variables */
if (!ast_test_flag(&flags, AST_CDR_FLAG_KEEP_VARS)) {
ast_cdr_free_vars(cdr, 0);
diff --git a/main/pbx.c b/main/pbx.c
index e59ee9ea8..d790dddf1 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -589,6 +589,7 @@ static struct pbx_builtin {
" w -- Store the current CDR record before resetting it.\n"
" a -- Store any stacked records.\n"
" v -- Save CDR variables.\n"
+ " e -- Enable CDR only (negate effects of NoCDR).\n"
},
{ "Ringing", pbx_builtin_ringing,
@@ -6846,6 +6847,7 @@ AST_APP_OPTIONS(resetcdr_opts, {
AST_APP_OPTION('w', AST_CDR_FLAG_POSTED),
AST_APP_OPTION('a', AST_CDR_FLAG_LOCKED),
AST_APP_OPTION('v', AST_CDR_FLAG_KEEP_VARS),
+ AST_APP_OPTION('e', AST_CDR_FLAG_POST_ENABLE),
});
/*!