[asterisk-bugs] [JIRA] (ASTERISK-26173) CDR function does not permit empty values to be assigned

gkloepfer (JIRA) noreply at issues.asterisk.org
Tue Jul 5 13:07:56 CDT 2016


gkloepfer created ASTERISK-26173:
------------------------------------

             Summary: CDR function does not permit empty values to be assigned
                 Key: ASTERISK-26173
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26173
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Functions/func_cdr
    Affects Versions: 13.9.1, 13.7.0
         Environment: Will affect all operating systems and platforms (see description).
            Reporter: gkloepfer


As of at least 13.7.0 (probably affects earlier releases), function CDR (func_cdr.c) does not allow empty values to be assigned to any CDR variables.  This was permitted in earlier Asterisk releases (11.x, for example, allowed this behavior).  Attempting to assign an empty value from the dialplan, as in:

{noformat}
same => n,Set(CDR(final_ganyid)=${myvariable})
{noformat}

will fail if the variable ${myvariable} is empty (or if the assignment is purposely blank) with a message such as:

{noformat}
[Jul  5 10:57:20] WARNING[2875]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
{noformat}

In func_cdr.c (cdr_write_callback) this is due to the following code:

{code:title=func_cdr.c}
        if (ast_strlen_zero(payload->value)) {
                ast_log(AST_LOG_WARNING, "%s requires a value (%s(variable)=value)\n)",
                        payload->cmd, payload->cmd);
                return;
        }
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list