[asterisk-bugs] [JIRA] (ASTERISK-23271) [patch]ForkCDR v option does not keep CDR variables for subsequent records

Rusty Newton (JIRA) noreply at issues.asterisk.org
Mon Feb 10 17:35:04 CST 2014


Rusty Newton created ASTERISK-23271:
---------------------------------------

             Summary: [patch]ForkCDR v option does not keep CDR variables for subsequent records
                 Key: ASTERISK-23271
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23271
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Applications/app_forkcdr
    Affects Versions: 11.8.0
            Reporter: zvision
            Severity: Minor


When the 'v' option is specified to ForkCDR application, AST_CDR_FLAG_KEEP_VARS flag is set only for the first CDR in the chain. So ForkCDR works fine with this option only once. After the second and further calls to ForkCDR, CDR variables get cleared on all CDRs besides the first one and moved to the newly forked CDR.
The problematic code is in the forkcdr_exec function:

{noformat}
  ast_set2_flag(ast_channel_cdr(chan), keepvars, AST_CDR_FLAG_KEEP_VARS);
{noformat}

It always sets the KEEP_VARS flag on the first CDR in the chain, instead of the most recent CDR which is used as a base to fork a new CDR.
Sample dialplan sequence that does not work:

{noformat}
Set(CDR(one)=1)
ForkCDR(v)
Set(CDR(two)=2)
ForkCDR(v)
Set(CDR(three)=3)
{noformat}

The first CDR will get the 'one' variable set and KEEP_VARS flag set.
The second CDR will get no variables and KEEP_VARS cleared.
The third CDR will get one, two, three variables.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list