Feature request: Call recording management

Discussions about new features or changes in existing features

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

Feature request: Call recording management

Postby kchung » Fri Sep 01, 2006 2:24 am

Currently, what's the best way to listen to the recordings?

Since User Stats lists last 50 calls, why not also list the call recordings there?
The problem is, the files are in /var/spool/asterisk/monitor. Can a script on the server redirect it to be served out via httpd?

While it's there, how about the ability to delete the files?

A separate call recording management page would be nice, with the ability to archive off calls, autopurge old calls and recording listening.
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Fri Sep 01, 2006 6:47 am

Dealing with recordings is a very difficult thing to standardize within astGUIclient/VICIDIAL. If you record all calls on an outbound VICIDIAL campaign there is no way to store recordings locally on the server, and if there was enough room you would not want the extra load of serving them up on a web page.

The next issue with recordings is if you have mulitple servers. What we have done at most of our installs is to set up an FTP server with a lot of drive space and a web server and use this as a central place for all servers to send recordings to and for users to retrieve recordings from with a simple PHP search page that queries the recording_log table.

There is also the issue of retrieving recordings by user. Since there is no user field in recording_log it is impossible to guarantee searching or retrieval of recordings by user ID.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Fri Sep 08, 2006 12:27 am

How about this:

Set a recording server path variable in our vicidial config (i.e. http://serverXYZ/vicidial/recordings/ or ftp://serverABC/vicidial/recordings/ ). The filename of the recording should be stored in table 'vicidial_agent_log' or recording_log with each row if the call was recorded.

When we pull user stats, the recording server path will be appended to the filename. Therefore, we're not bound by the asterisk server. You can have a script move it to a diff webserver and still have a link that's autogenerated.

Also, can the list of 'last 50 calls' be increased from 50 to something else or add a link for 'next 50 calls'?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Fri Sep 08, 2006 6:28 am

There is already a "location" field in the recording_log table that many companies use to locate recordings.

As for the vicidial_agent_log, we may want to add a recording_id field to that table in order to cross-reference recordings to agents and phone calls they've taken.

As for increasing the call_log number in user_stats.php, just increase the number in the code, replace 50 with whatevery you like.

For both of these issues you can also create "new feature" issues in the tracker for them:
http://www.eflo.net/VICIDIALmantis
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby gerski » Thu Sep 14, 2006 3:40 am

I also created a user_history.php same thing as the user_stats.php but with no authentication. Since some agent would like to see their own call history. And change the last 50 for about 200 last calls.

But it would be better if the user_stats.php will show the CALL HISTORY for the day that we input rather than the LAST XX CALLS.
gerski
 
Posts: 432
Joined: Fri Jul 14, 2006 6:21 am

Postby enjay » Thu Sep 14, 2006 10:24 am

Just an FYI I posted ( a while back ) a few different mix_recording scripts to Mantis where I had the recordnigs placed in a direcftory by date. I also pasted a snippet which sorts these via a php web interface so you can index them by Campaign, Agent, Phone Number and always sorted by date/time.

-enjay
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby kchung » Fri Sep 22, 2006 6:43 pm

Can someone please enlighten me as to which script is tasked with recording all calls? more specifically which script writes to the recording_log table?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Fri Sep 22, 2006 8:32 pm

manager_send.php starts the recordings and vdc_db_query.php will update the record at call hangup.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Tue Oct 03, 2006 4:47 pm

OK, I'm attempting to hack this in myself. I'll be posting my notes here.

First, i modify the DB to add a 'recording_id' to the 'vicidal_log' table:

ALTER TABLE `vicidial_log` ADD `recording_id` INT( 10 ) UNSIGNED NULL ;

Pull old data from recording_id back into vicidial_log:

update vicidial_log a, recording_log b set a.recording_id = b.recording_id where a.end_epoch = b.end_epoch

at line 959 of vdc_db_query.php, i changed it to read:

Code: Select all
echo "$recording_id|$length_in_min|";
$stmt = "UPDATE vicidial_log set recording_id='$recording_id'where lead_id='$lead_id' and uniqueid='$uniqueid';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
}
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby kchung » Wed Oct 04, 2006 1:21 pm

mflorell wrote:There is already a "location" field in the recording_log table that many companies use to locate recordings.
http://www.eflo.net/VICIDIALmantis


What script, if any, writes to the location field?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Wed Oct 04, 2006 8:35 pm

Nothing does in the release. It is easy to add a MySQL query that would though. And in the archival systems I've built I usually have a drop-box on the FTP server and then send the files to other servers depending on the campaign they were recorded in and the location field is used by that archival system.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby vctor » Thu Oct 26, 2006 10:55 am

You can just create a PHP page that queries the recording_log, you can then symlink the folder to an apache folder, that way you can view it on the web. and you can manipulate it using PHP,
vctor
 
Posts: 49
Joined: Tue Jun 13, 2006 9:32 pm

Postby mflorell » Sat Oct 28, 2006 8:54 am

What if your recordings are not stored on your web server?

If someone wants to submit a page that will do this, I will try to get it into the next release. It will need to be posted to the tracker though.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Mon Oct 30, 2006 4:34 pm

ok, lemme rehack my patch so it uses record_log instead. What's my deadline for this to make it into the next release?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby Op3r » Mon Oct 30, 2006 7:57 pm

What if your recordings are not stored on your web server?


You can just compile/install apache on the asterisk server then have the php page call for it.

anything that can make the recordings simple process is a great idea.
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1432
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila

Postby mflorell » Tue Oct 31, 2006 12:24 am

All of the overhead of runing Apache/PHP on a VICIDIAL server is a lot of load not to mention the added disk read activity if you are retrieving recordings during production hours while recording.

If you have a patch please post it to the tracker.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mflorell » Tue Oct 31, 2006 12:25 am

kchung wrote:ok, lemme rehack my patch so it uses record_log instead. What's my deadline for this to make it into the next release?


Not sure. i am hoping to do the next release before December. November 14th sounds like a reasonable day for a deadline.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby vctor » Tue Nov 07, 2006 1:25 pm

mflorell wrote:All of the overhead of runing Apache/PHP on a VICIDIAL server is a lot of load not to mention the added disk read activity if you are retrieving recordings during production hours while recording.

If you have a patch please post it to the tracker.


Then just install apache on a recording server. It does not mean the asterisk server.
vctor
 
Posts: 49
Joined: Tue Jun 13, 2006 9:32 pm

Postby kchung » Wed Nov 22, 2006 3:44 pm

mflorell wrote:manager_send.php starts the recordings and vdc_db_query.php will update the record at call hangup.


Am I correct to say that vdc_db_query.php only stops recording and update the record if a call hung up?

I'm trying to put uniqueid into the recording_log via manager_send.php line 884 and 946:
Code: Select all
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,uniqueid) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$uniqueid')";


It won't do a thing. How can I pass uniqueid into this script properly?
Also, i see debugging facilities for these scripts. How do I invoke them and view the debug data?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Wed Nov 22, 2006 11:12 pm

You need to send the uniqueid with the XMLHTTPRequest call that hangs up the call in the vicidial.php script.(This is also where you would need to trigger the debugging)

Why do you want to store uniqueid in recording_log?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Fri Nov 24, 2006 8:44 pm

mflorell wrote:Why do you want to store uniqueid in recording_log?


I want to be able to link a recording or sets of recordings with a call record.

Before, I put the recording_id with each call recordin in the vicidial_log table, but that won't work if there's multiple recordings per call. I had modified user_stats.php and admin_modify_lead.php to display the recording_id next to the lead column, which is linked to the recording mp3.

So the best thing to do, i think, is to put the uniqueid with the recording record in the recording_log table and do the same type of query to get the recording ID and filename of the recording.

mflorell wrote:You need to send the uniqueid with the XMLHTTPRequest call that hangs up the call in the vicidial.php script.(This is also where you would need to trigger the debugging)


Dude, you totally lost me there. Can you provide some code snippets? And where would you see the debugging info?
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Sat Nov 25, 2006 1:13 am

I was planning on adding the lead_id to the recording_log table which would have the effect of tracking the recordings that happen within a call without the problems that can occur with the uniqueID(some different Asterisk versions use different types of uniqueID, for VICIDIAL dialing out manual dial, the uniqueID will change after the call hangs up leading to a different uniqueid for ring time than for after the Answer signal.).

As for debugging and XMLHTTPRequest, that's a different world of programming. The vicidial.php script needs to send a request with some Javascript variables in it to the php script that will do the recording, that second script needs to take in the variables and parse them then do the database queries to activate recording.

You will have to edit the request string in the conf_send_recording function of vicidial.php to add lead_id to the query string.

Then in the manager_send.php script you have to go to the MonitorConf section and add lead_id to the insert statement for the recording_log table.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mflorell » Thu Nov 30, 2006 5:16 pm

I have added the lead_id into the recording_log table as of SVN 2-X today(2006-11-30)

There is also a list of recordings for a lead on the lead modification page accessible from the lead search on the admin.php page.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Thu Nov 30, 2006 5:40 pm

It would be very handy to see user_id in there too. Please add!
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Fri Dec 01, 2006 2:27 am

I'm thinking about it. It was not very involved to add lead_id so this shouldn't be a problem.

If it will be added, the field would be "user". I'm not sure if I would want to index the column or not. I will have to test.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mflorell » Fri Dec 01, 2006 11:50 am

user has been added in SVN 2-X as of this morning. I also modified user_stats.php to list recordings fo an agent.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ramindia » Fri Dec 08, 2006 2:16 am

Hi Matt

I have updated to my setup with latest SVN

iam able to see the User_stats

is there any option we can add some hyper link on FILENAME
so can hear from the Page directly.. just iam thinking that Idea

is that Good Idea ?


Another thing i noticed is some of the pages
we can not go back to main admin page, we need to use back button to go to main admin page.

adding small hyper link to go to the main Admin page
would be great.

any suggestions

Ram
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby kchung » Fri Dec 08, 2006 2:22 am

I've modded an older build to do that. I've been meaning to contribute it but haven't had the time.
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby ramindia » Fri Dec 08, 2006 2:27 am

Hi

thats great
why dont you contribute or upload your files
so people can look around and modify as per the convinient

Ram
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby mflorell » Fri Dec 08, 2006 10:08 am

Can you list the pages that don't have Admin links so that I can add them?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ramindia » Fri Dec 08, 2006 11:56 am

ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby Op3r » Mon Dec 11, 2006 1:44 pm

Whats the status of this feature?

kchung do you mind if you upload the script to tracker so that we may contribute something?
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1432
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila

Postby mflorell » Wed Dec 13, 2006 4:02 pm

I have added links to the admin page from several of the scripts that did not have them, including the ones you listed. Thanks.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ramindia » Wed Dec 13, 2006 9:18 pm

Hi

is there any document, how we can upgrade the files in web server
from old to new

or just get them from SVN and copy to respected directories.

how can i do only modified files, since i have also edited some files for my own use

Ram
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby mflorell » Wed Dec 13, 2006 10:33 pm

You would just need to copy them manually if you do not want to just run the install.pl and update everything.

A lot of the scripts have changed from 2.0.1. You might do better to copy your files off for backup and run install.pl and then run WinMerge or another diff utility to see the differences between your customized scripts and the new ones.

As for which files have changed, just get RapidSVN and you can look at the changelog for each file right in the RapidSVN GUI.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ramindia » Wed Dec 13, 2006 11:26 pm

Hi

thats good idea

i have moved aleady from 2.0.1 to 2.0.2, but some latest changes need to update

i will work on that, post if any problem.
and any links have problem, not going to admin page.


Ram
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby ramindia » Fri Dec 15, 2006 3:20 am

Hi

I have updated latest SVN, the links which were not going back to admin page, now its solved.

apprciated for this work

Ram
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

Postby kchung » Fri Dec 29, 2006 4:01 pm

My patch has been uploaded! see mantis: http://www.eflo.net/VICIDIALmantis/view.php?id=44

recording mgmt.patch enhances 2.0.2's recording management features.

Adds several new variables:
PATHmon_done - where processed recordings will be saved at on the server; was at PATHmonitor/DONE, now defaults to PATHweb/vicidial/recordings
VARREC_loc - web address where the recording can be reached
VARREC_format - file extension of the recordings depending on which AST_CRON_mix_recordings script you choose

Modifies:
/install.pl - adds the new variables to the install & astguiclient.conf
/bin/AST_CRON_mix_recording scripts - uses the PATHmon_done path for done recordings
/www/vicidial/dbconnect.php - passes the VARREC variables
/www/vicidial/user_stats.php - Added hyperlinks to Campaigns, Lists and Recordings based on $VARREC_loc and $VARREC_format
/www/vicidial/admin_modify_lead.php - Modifed Comments to use textarea & added hyperlinks to Campaign, List and Recordings based on $VARREC_loc and $VARREC_format
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Postby mflorell » Fri Dec 29, 2006 4:05 pm

Thank you very much for posting!
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby kchung » Fri Dec 29, 2006 4:08 pm

no, no! thank you very much for the changes you've made to 2.0.2 which made this much easier!
kchung
 
Posts: 208
Joined: Fri Aug 04, 2006 5:28 pm

Next

Return to Features

Who is online

Users browsing this forum: No registered users and 34 guests