diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-12-19 00:50:01 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-12-19 00:50:01 +0000 |
commit | 7e9febbf86f7a9aa0cc1d9852d1ed1b77f25b3ce (patch) | |
tree | fafe2c3b45211d267449024e44dd10f65ac77e9d /main/pbx.c | |
parent | af723c6572e988753c24cbb911d6b521600f4a3f (diff) |
app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state
When doing the rework of the CDR engine that pushed all of the logic into cdr.c
and made it respond to changes in channel state over Stasis, we knew that
accessing the CDR engine from the dialplan would be "slightly"
non-deterministic. Dialplan threads would be accessing CDRs while Stasis
threads would be updating the state of said CDRs - whereas in the past,
everything happened on the dialplan threads. Tests have shown that "slightly"
is in reality "very".
This patch synchronizes things by making the dialplan applications/functions
that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and
CDR_PROP now all use Stasis to send their requests over to the CDR engine,
and synchronize on the channel Stasis topic via a subscription so that they
return their values/control to the dialplan at the appropriate time.
While going through this, the following changes were also made:
* DISA, which can reset the CDR when a user successfully authenticates, now
just uses the ResetCDR app to do this. This prevents having to duplicate
the same Stasis synchronization logic in that application.
* Answer no longer disables CDRs. It actually didn't work anyway - calling
DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer
time - it just kills all CDRs on that channel, which isn't what the caller
would intend.
(closes issue ASTERISK-22884)
(closes issue ASTERISK-22886)
Review: https://reviewboard.asterisk.org/r/3057/
........
Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/main/pbx.c b/main/pbx.c index 1e6a24625..c5eb5f116 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -104,10 +104,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") <para>Asterisk will wait this number of milliseconds before returning to the dialplan after answering the call.</para> </parameter> - <parameter name="nocdr"> - <para>Asterisk will send an answer signal to the calling phone, but will not - set the disposition or answer time in the CDR for this call.</para> - </parameter> </syntax> <description> <para>If the call has not been answered, this application will @@ -10727,9 +10723,7 @@ static int pbx_builtin_answer(struct ast_channel *chan, const char *data) } if (!ast_strlen_zero(args.answer_cdr) && !strcasecmp(args.answer_cdr, "nocdr")) { - if (ast_cdr_set_property(ast_channel_name(chan), AST_CDR_FLAG_DISABLE_ALL)) { - ast_log(AST_LOG_WARNING, "Failed to disable CDR on %s\n", ast_channel_name(chan)); - } + ast_log(AST_LOG_WARNING, "The nocdr option for the Answer application has been removed and is no longer supported.\n"); } return __ast_answer(chan, delay); |