Asterisk CDR not reporting correct durration or billsec

I have noticed CDR is not reporting the correct duration of calls.

In my case I have calls being answered and a dialplan request for a pin before placing the caller into a confbridge.

In some instances the duration of the call is reported to be the number of seconds before the call is placed into confbridge but none of the confbridge seconds are reported.

If I put a second call into the same bridge the first call will report all the correct duration but the second call will report the duration of the call up to the point it is placed into the confbridge.

Is this a bug?

My cdr config is simple. I am using CDR adaptive

alias start => calldate

Something I do notice. When a second call joins the same bridge as the first call the first call shows the destination of the second calls channel.

In addition the set(CDR(userfield) is echoed twice for the first call and once for the second. This is not behavior I would have expected. Surly each call should be reported in CDR as a separate call!

Which version of Asterisk are you using? In 1.8 CDRs were deprecated in favour of channel event logging, because it had been found impossible to make them work for complex calls without causing collateral damage to other scenarios. However, in a later version, there was some attempt to rework them to be a bit more useful for complex cases.

I don’t understand what you are saying here. Set(CDR(userfield)=…) should not cause any CDRs to be output.

I’m testing asterisk 13.0.2

What I was trying to say is I get a double output in the userfield. I was expecting to only get one cdr output per call example of a first call joined by a second to confbridge

2014-12-28 02:31:00;""“2581"” <2581>";“2581”;“1001”;“apps”;“SIP/2581-00000010”;“SIP/2581-00000011”;“ConfBridge”;“1005 user_admin menu_admin”;“43”;“43”;“ANSWERED”;“3”;;“1419733860.55”;“Bridge-1005;Bridge-1005”

I raised a ticket on the bug tracker.

For everyone’s information CDR’s interaction with confbridge is inconsistent and therefor looks like a bug.

When the first call is placed into conference CDR stops tracking time but continues once a second call enters the bridge.

I’m struggling to see how the spec for CDR is fit for purpose.

Has anyone else experienced issues with CDR and confbridge?