Renaming Recording File name?

Hi all,
I really appreciate it if someone help me to rename recording filename in FreePBX. I posted this topic for weeks. There was one person saying something but I could not do it.
The thing is, by default FreePBX names a recording file name like this:
Date_Time_UniqueID_someNumber.wav (UniqueID doesnot contain the extension
number, or channel name)
Now, I would like to change it like:
Date_Time_ExtensionNumber.wav
Thank you so much for helping me,
__________________
Dan Strong



Solved!!!!!!!!!!!!!!!!!!!!!!!!!!!
I got it. Thank you!!!
It's so simple if you found it out. It's just a line of coding....
Dan Strong
Rename file
It is possible to let me know how this was done please?
Recording Files
copy [macro-record-enable] from extensions_additional.conf to extensions_override_freepbx.conf and then add -${REALCALLERIDNUM}-${ARG1} to end of set filename, there are three places, then reload config. I cannot however set an outside number being dialed in the filename
Here's how..
Samo was almost there, so here's how to do the whole thing. You just have to pass your variables to the PHP AGI script from your dialplan.
Like above, paste the following to /etc/asterisk/extensions_override_freepbx.conf:
------------ CUT -------------
[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = ""]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMonitor()
exten => s,n(check),AGI(recordingcheck,${STRFTIME(${EPOCH},,%Y%%d%H%M%S)},${UNIQUEID},${REALCALLERIDNUM},${CALLERID(dnid)})
exten => s,n,MacroExit()
exten => s,1+998(record),MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT},,${MIXMON_POST})
; end of [macro-record-enable]
------------ CUT -------------
Now, edit /var/lib/asterisk/agi-bin/recordingcheck and add these two lines just below the line $agi = new AGI();:
$icid = $argv[3];
$dial = $argv[4];
Now you can use {$icid} and {$dial} for your incoming and outgoing numbers. Just insert those variables into the filename strings lower down in the recordingcheck file.
For reference:
$icid = Incoming Caller ID
$dial = Outbound Number Dialed
There you have it!
Gary Allen
Solution Stars, LLC
------------------------------
Also do not forget to chmod the recordingcheck file to read only or it will get overwritten. Changing permissions on this file will not cause any other issues that I have found.
------------------------------
Inbound Usage Example:
$agi->verbose("Recording enabled for".$exten);
$agi->verbose("CALLFILENAME=IN{$exten}-{$timestamp}-{$icid}"); $agi->set_variable("CALLFILENAME","IN{$exten}-{$timestamp}-{$icid}");
$agi->set_priority('record');
exit(0);
Outbound Usage Example:
$agi->verbose("Outbound recording enabled."); $agi->verbose("CALLFILENAME=OUT{$exten['data']}-{$timestamp}-{$dial}"); $agi->set_variable("CALLFILENAME","OUT{$exten['data']}-{$timestamp}-{$dial}");
$agi->set_priority('record');
exit(0);