With the above we were getting the double entry in the CDRs, and the entries had the same unique ID. One saying ANSWERED the other saying NO ANSWER
We changed our dialplan to:
exten => h,1,NoOp("Hanging up and cleaning up")
exten => h,n,NoOp("accnt code = ${CDR(accountcode)}")
exten => h,n,AGI(hangup.pl,${ACCNT},${dstacct})
And everthing went back to normal. The reason we were calling ResetCDR and NoCDR was due to a problem with 1.4 not closing the CDR before the h exten was called. And then in 1.6 that got fixed.
I may be way off for your setup but any little bit of info helps right?
My apologies for not providing enough additional info about my configuration. I did not realize that it could be of any help for analyzing the problem, since each and every call had duplicate CDR entries.
But anyway, your info surely helped a lot and pointed me into the right direction!
I changed part of my dialplan from:
; What to do on hangup.
[macro-hangupcall]
exten => s,1,ResetCDR(w)
exten => s,n,NoCDR()
to
; What to do on hangup.
[macro-hangupcall]
exten => s,n,NoCDR()
And now only one CDR entry is being produced.
So thank you very much for your feedback!