Howto archive recordings on DB

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Howto archive recordings on DB

Postby eskali » Wed Oct 17, 2007 10:34 am

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
eskali
 
Posts: 9
Joined: Mon Aug 27, 2007 5:43 pm

Postby brown078 » Wed Oct 17, 2007 10:52 am

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
brown078
 
Posts: 23
Joined: Sat Oct 06, 2007 10:08 pm

Postby eskali » Wed Oct 17, 2007 11:05 am

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!!
eskali
 
Posts: 9
Joined: Mon Aug 27, 2007 5:43 pm

Postby brown078 » Wed Oct 17, 2007 11:33 am

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 :P ) script to parse the corresponding ID and update the recording_log record with that binary data.

Hope that helps
brown078
 
Posts: 23
Joined: Sat Oct 06, 2007 10:08 pm

Postby eskali » Wed Oct 17, 2007 11:45 am

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!!
eskali
 
Posts: 9
Joined: Mon Aug 27, 2007 5:43 pm

Postby mflorell » Thu Oct 18, 2007 8:31 pm

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.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ramindia » Fri Oct 19, 2007 1:48 am

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
Kindly post your feedback, if this solution works.
so its very usefull for others who join later as a NEWBIE.
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby eskali » Fri Oct 19, 2007 6:27 am

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.
eskali
 
Posts: 9
Joined: Mon Aug 27, 2007 5:43 pm

Postby mflorell » Thu Oct 25, 2007 1:13 am

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.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: jovieticar101 and 135 guests