Renaming record filename, problem with the relation of 2 recorded files when a call is transferred

I made the appropriate modifications from the thread:

I have a last thing to do for having recorded files meet my needs. All in calls come in one ext and that person than transfer the call to the right ext. In this case I have 2 files recorded


how can I modify the IN case in recordingcheck in order to save the second file name with InExt - extCid when a call is transferred or to have the same UniqueID in both files in order to get the relation between these two files.