diff options
author | Anthony Minessale II <anthmct@yahoo.com> | 2004-09-24 21:33:48 +0000 |
---|---|---|
committer | Anthony Minessale II <anthmct@yahoo.com> | 2004-09-24 21:33:48 +0000 |
commit | 255ce936167f0735871f09e0af89615243a3516f (patch) | |
tree | 9dc1614246c2f8319edee2064d5efe8b24880b6a /pbx.c | |
parent | 4ffa6c246f614a3b01731f4215b3cb7ad5ed987f (diff) |
add app_forkcdr
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -4387,11 +4387,16 @@ static int pbx_builtin_setlanguage(struct ast_channel *chan, void *data) static int pbx_builtin_resetcdr(struct ast_channel *chan, void *data) { + int flags = 0; /* Reset the CDR as specified */ - if (data) - ast_cdr_reset(chan->cdr, strchr((char *)data, 'w') ? 1 : 0); - else - ast_cdr_reset(chan->cdr, 0); + if(data) { + if(strchr((char *)data, 'w')) + flags |= AST_CDR_FLAG_POSTED; + if(strchr((char *)data, 'a')) + flags |= AST_CDR_FLAG_LOCKED; + } + + ast_cdr_reset(chan->cdr, flags); return 0; } |