Cdrs completely lost

Hello, I need some urgent help,

I have a problem if a call (initiated by a .call file starting in context[wait4key]) changes the extension in the dialplan during input of WaitExten.

The problem is that in this case no cdr in all is written for the call. Here is my snipset from the dialplan

If I don’t do a WaitExten and do a Goto instead (the outcommented line) the script did not leave the _X. extension and the cdr is written.

What Can I do do get a cdr written even in that case that I change the extension with the WaitExten?

exten => _X.,n(RepeatWait4Star),NoOP
exten => _X.,n,BackGround(press-star)
exten => _X.,n,WaitExten(5)
;exten => _X.,n,Goto(ContinueCall)
exten => _X.,n,Goto(RepeatWait4Star)

exten => _X.,n(ContinueCall),NoOP()

exten => _X.,n,hangup()

exten => *,1,NoOP(dosomething),NoOP
exten => *,n,Goto(_X.,ContinueCall)

Even with debug and verbose settings the asterisk does not complain about problems writing the cdr.

I use asterisk version and log the cdrs to a postgres DB

Thanks for any help

There is a current issue on the issue tracker about missing CDRs when using call files. However, it is known that CDRs do not handle complex cases well, and you may have to waid for call event logging in upcoming versions.