Call-id legs

Hi guys, I’m looking for a solution for my issue. I have two asterisk servers (serverA and serverB).CDR record for serverA is stored on serverA and for serverB on serverB. Is there any way how to join both CDR records when user from serverA call to user on serverB?

for example, serverA know call-id1 and call-id2(there is in SIP Header), but I cant store call-id2 on serverA, asterisk variable ${SIPCALLID} is call-id1.