The file_age variable was in one of the two files I used to compile the code. I was not sure what it did, and since I do not fully understand the code, I left it. I have since commented it out.
If I am to understand your second comment. The purging is the changing of the cdr log. Correct?
As for the script not affecting the call connection time. I understand that it should not affect this but as soon as I disabled the post recording script the issue of call connection lag was no longer present. When I re-enable this conversion calls start to take nearly 90 seconds to connect.
I have no idea why as that script should have no impact on the dialplan until “hangup”. Perhaps a copy of a call from the “full” log would helpfully provide timestamps to possibly show any delays,
I will comment though that you call the script with ^{ARG3}, again why? , your post is not actually a complete working script as there is no initial hash/bang line apparent, $dtpath is neither apparently defined and I would not run any command through nice yet.
Perhaps you could post the script in it’s entirety.
The purging could be good for deleting recordings over 365 day to conserve disk space and remain compliant, deleting the cdr records really won’t save any space though.
I also have a script that i would like to run after a call is recorded. If I call the script manually it works fine, /usr/sbin/./convert_wav2mp3 but if I put that in Advanced settings “Post Call Recording Script” not only does it not run but it also stops the call from being recorded, what would be the proper entry in “Post Call Recording Script” to call that script.
Thanks dicko for your reply, I moved the script to the location you suggested, and made asterisk:asterisk and executable I can still run the script from cammand line ./convert_wav2mp3 and it works, but can not get it to run from “Post Call Recording Script” what command do I need to place into that field.
It works flawless. I put the script into /var/lib/asterisk/bin and then change the ownership and then added
/var/lib/asterisk/bin/convert_wav2mp3.sh to the Post Call Recordings section of Advanced Settings.
What are all all the variables used for in Post Call Recordings.
“An optional script to be run after the call is hangup. You can include channel and MixMon variables like ${CALLFILENAME}, ${MIXMON_FORMAT} and ${MIXMON_DIR}. To ensure that you variables are properly escaped, use the following notation: ^{MY_VAR}”
Just want to thank you all. You are my heroes. I was able to take a customer with 80 gb (3 months) of recordings and shrink it down to 16 gb. This solves our disk problems for past and future calls.
I know this is an old post but I had to submit my 2 cents. First of all jhayes and dicko, I can’t thank either of you enough for your knowledge and direction. Using your scripts I was able to convert my client’s database of 2.7 million recordings to a reasonable size, and implement a long term storage strategy. You guys saved me a ton of time, and I can’t thank you guys enough. If you’re ever in Phoenix send me a message and the beers are on me!