Hi Daniel,
I'm not very familiar with coding. As far as I know you need to set a flag for accounting. This is happening as I an acc request at failover scenario. I think for a cdr request the dialog needs to be set. But I think this should be done by dmq replication. Maybe that is the part that is missing here. I generated two debug log files. The first one is a normal call without failover. At the end of the call a CDR is generated. The second one is captured on the standby node that is getting active before I terminate the call. After terminating the call the BYE message is handled correctly. I see also a ACC request but no ACC CDR. I hope you can find something as I think it would be more than nice if a CDR is generated after one machine failed.
BR, Björn
[debug_with_failover.txt](https://github.com/kamailio/kamailio/files/9704543/debug_with_failover.txt) [debug_without_failover.txt](https://github.com/kamailio/kamailio/files/9704544/debug_without_failover.tx...)