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

zvision (JIRA) noreply at issues.asterisk.org
Fri Feb 7 04:47:03 CST 2014


zvision created ASTERISK-23260:
----------------------------------

             Summary: ForkCDR v option does not keep CDR variables for subsequent records
                 Key: ASTERISK-23260
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23260
             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:
  ast_set2_flag(ast_channel_cdr(chan), keepvars, AST_CDR_FLAG_KEEP_VARS);
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:
Set(CDR(one)=1)
ForkCDR(v)
Set(CDR(two)=2)
ForkCDR(v)
Set(CDR(three)=3)

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