Page 1 of 1
Howto archive recordings on DB
Posted:
Wed Oct 17, 2007 10:34 am
by eskali
Hi everybody,
I been trying to find "who" generate the wav files with the filename posted into the recording_log table. I mean, there must be an script that its executed and generate a recording wav file with the name that appear in the recording_log table, but i can't find it.
The problem is, i made some changes in the filename structure but the changes are not being applied when the wav file its created, just a part of the name, not completly.
Example: Agent_100-Date_20071017_161452-sold.wav and Agent_100-Date_20071017_161452-not_sold.wav.
I get: Agent_100-Date_20071017_161452-in.wav, Agent_100-Date_20071017_161452-out.wav
Does anybody have any experience with it ... why is that happening ? ... Does anybody know what scripts its executed in order to genere the wav file ?
Another thing, its there a way that i can make some changes in order to archive the recording files (wavs) into a table in the DB under blob field type ??
I really need something like this because i have to associate the recordings with some other results posted by the vicidial operators.
Is there a way to do that ? Where should i start looking at ? ...
If anybody can help me out with those things i would really appreciate it!
Thanks in advance, regards!
Eskali
Posted:
Wed Oct 17, 2007 10:52 am
by brown078
Example: Agent_100-Date_20071017_161452-sold.wav and Agent_100-Date_20071017_161452-not_sold.wav.
I get: Agent_100-Date_20071017_161452-in.wav, Agent_100-Date_20071017_161452-out.wav
The above looks as if the files aren't moving from a "ORIG" state to a "DONE" state. I haven't had luck adding the disposition on the end of the recording. Are your directories correct in your recording perl scripts?
As far as storing the binary recording data into a DB, you would have to modify the MIX_RECORDING perls scripts to suite the needs of archiving the data there. There are great examples of FTP, mp3, etc in the /usr/share/astguiclient directory after install or /usr/src/astguiclient
I hope this helps
Posted:
Wed Oct 17, 2007 11:05 am
by eskali
Thanks for your fast replay man. These are my answers ...
1- Yes, files are moving from ORIG to DONE state. Also, the wav filename is taked from the recording_log table, name that i changed in vicidial.php script. Im just wondering why the script that genere the wav file its not making it with the fullname that i defined. I though it could be a filename lenght limit but its not. Any other ideas /
2- About archiving recordings into the Database, you talk about some perl scripts in astguiclient directory, i looked every single file in that directory but i couldnt find a reference to recording_log table. So i assume that those scripts are not generating the wav files.
Does anybody know WHAT script (php noR perl) is the one that create the wav files ?
Thanks again!!
Posted:
Wed Oct 17, 2007 11:33 am
by brown078
As far as I can tell, the manager_send.php in your DOCROOT/agc directory is the one that inserts the INITIAL record into the log. What I was referring to is after the recording is completed (in a DONE state) one could utilize the AST_MIX_RECORDINGS.pl (thats off the top of my head ... i believe thats close enough
) script to parse the corresponding ID and update the recording_log record with that binary data.
Hope that helps
Posted:
Wed Oct 17, 2007 11:45 am
by eskali
Yeah that's a good though ... i use to think the same, but i can't find the "call" to the recording_log table inside that perl script (AKA AST_CRON_mix_recording.pl and AST_CRON_mix_recording_BASIC.pl).
So, if that script don't use that table, how the #@%$ get the filename that we defined ? ... =)
There must be another script running around that i can't find. The one who get that filename from the recording_log table and use it to create the wav or even to pass it to the AST_CRON_mix_recording.php as a parameter or any other way.
Regards!!
Posted:
Thu Oct 18, 2007 8:31 pm
by mflorell
The filename is defined in the manager_send.php script when it is called by the vicidial.php script. Storing WAV file audio in a database is a very bad idea if you have any kind of large number of recordings on your system.
Posted:
Fri Oct 19, 2007 1:48 am
by ramindia
Hi
is there any way i can pull the harddrive hardcoded path
and put in database, and pull them to webpage
like this
iam storing audio files
/var/www/sounds
when it stores the record to the call related
i should be able to store in database
/var/www/sounds/XXXXX
so i can hear online ( off the campaign)
ram
Posted:
Fri Oct 19, 2007 6:27 am
by eskali
Yes, you can store the fullpath ... you should look into the manager_send.php like matt said.
Matt, the operators of the campaign has to make sells and if that sells goes fine, then, the wav file should be named like "Agent_110-Date_20071019-sold.wav" ... and if the sell wasn't ok, then "Agent_110-Date_20071019-not_sold.wav".
Everything goes fine until the sold/not_sold prefix at the end of the file, i already add a lil block of code where the vicidial INSERT that record into the recording_log table in order to get if the sell was ok or not if yes, then i add $filename .= '-sold'; ... the filename has been stored fine into the database, my problem is that the wav file its created without the last prefix and it use -in.wav and -out.wav ... and i can't figure it out why!
Thanks again everybody!!
ps: about the db wav storing, ye ... you got a point i will store fullpath, no binary files.
Posted:
Thu Oct 25, 2007 1:13 am
by mflorell
I would suggest using one of the AST_CRON_mix_recordings scripts to do a lookup of the leadID when the recordings are moved to an archive server and rename the file at that time.