Question about CDR and transfer

Hello
i’m using asterisk with it’s CDR and here is the situation i want 2 ask about:
if the caller X call someone else Y and talk for about 20 seconds and after that Y transfer X to another person Z and X talk to Z for about 25 second and then hangup; asterisk then will put a record in the CDR showing that X called Z and talk to him for 45 seconds and that’s not true. i want asterisk to put two records in the CDR showing that X talk to Y for 20 seconds and then another records showing that X talk to Z for 25 seconds. is there anyone have anyidea how can i do that??
thank you