[Home]

Summary:ASTERISK-22613: cdr_prop function is not working
Reporter:Private Name (falves11)Labels:
Date Opened:2013-09-27 19:06:04Date Closed:2013-09-30 14:59:03
Priority:MajorRegression?
Status:Closed/CompleteComponents:Functions/func_cdr
Versions:12.0.0-alpha1 Frequency of
Occurrence
Related
Issues:
Environment:debian 7 Attachments:
Description:In this function, the "cmd" variable has the wrong content when I execute set(CDR_PROP(disable)=true)
I always get the error "Unknown option CDR_PROP", so I set a warning before, and in fact, the cmd variable contains "CDR_PROP" when it should contain "disable"
{code}
       enum ast_cdr_options option;
       if (!strcasecmp("party_a", cmd)) {
               option = AST_CDR_FLAG_PARTY_A;
       } else if (!strcasecmp("disable", cmd)) {
               option = AST_CDR_FLAG_DISABLE_ALL;
       } else {
               ast_log(AST_LOG_WARNING, "Unknown option %s used with CDR_PROP\n", cmd);
               return 0;
{code}

This is part of larger issue. I have simple call-in and call-out scenario, with channel PJSIP. For some reason, I think by design, I get a second CDR record, completely wrong and unnecessary. In this unwanted record, most fields are empty and the duration and billsec do not match the "correct" record.
So I am trying to disable the "party_B" cdr.
In general, how do I get the right CDR in this dialplan.
(Two lines).
{noformat}
exten=> _X.,1,Dial(PJSIP/ENDPOINT/sip:${EXTEN}@X.Y.Z.T)
exten=> _X.,n,Hangup()
{noformat}
Comments:By: Matt Jordan (mjordan) 2013-09-30 14:36:54.979-0500

Yup, it's flat out broke. It isn't parsing the parameters correctly.

I'll have a patch in shortly.

By: Matt Jordan (mjordan) 2013-09-30 14:58:11.902-0500

This should now be fixed in r400196 of the Asterisk 12 branch.