Get CDR data from second IAX2 server


I have two Asterisk servers connected via IAX. Is it possible to get CDR data of a call from second server into first dialplan?
From Server1 call goes to second server. How do I get CDR data of that call back on first server’s dialplan?

Server1 dialplan

 same => n,MixMonitor(/home/asterisk/recordings/${myid}.wav,b)
        same => n,Dial(IAX2/axsecond/${EXTEN}@second_server)
        same => n,Verbose(callduration: ${CDR(billsec)})
        same => n,StopMixMonitor()
        same => n,Hangup()

It’s not possible within Asterisk. You would need to do it externally somehow.