Recording

My call recording needs seem to be getting overly complicated to implement. What has me stumped at the moment is the ability to determine if a channel is already recorded. The second set of monitor renames the recorded file name already started.

; this macro sets the original monitor
[macro-std-queue]
exten => s,1,Set(REC=${EPOCH})
exten => s,n,Monitor(wav,$REC,b)
exten => s,n,Queue(Example)

; this macro sets the second monitor and probably could use some sort of GotoIf(${ISRECORDED}) if such a thing exists
[macr-std-exten]
exten => s,1,Set(REC=${EPOCH})
exten => s,n,Monitor(wav,$REC,b)
exten => s,n,Dial(${ARG1},20,t)

What have others done in this situation? Anyone know what Trixbox, FreePBX, and the others do?

What I see happen (this is all one call):

SIP/trunk > (queue) > SIP/agent1 = original.wav
SIP/agent1 > (transfer) > SIP/agent2 = renamed.wav <== this is the full recording, original.wav was renamed at set of second monitor