Ticket #318 (assigned Feature Requests: None)

Opened 7 years ago

Last modified 2 years ago

Link to recordings from AMP reports (cdr).

Reported by: cupotka Assigned to: nobody (accepted)
Priority: minor Milestone: Undetermined
Component: None Version:
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by ryppn)

 Hi! 
 
ARI is very usefull, but it lucks options of complex
search with sorting. 
I'm trying to add links from AMP reports to ARI, to be
able to make a complex search with reports menu, and
then just by click to go specific record in ARI. 
 
In DB there's a uniqueid field, and I can find a
recording from url like: 
http://192.168.0.37/recordings/index.php?s=callmonitor&q=asterisk-13817-1131353495.213&start=0&btnS=Search

http://.....uniqueid..... 
So it's enouth to display a link in reports.php with
uniqueid to be able to access a recording from
reports.php. 
 
So if I add 'uniqueid' in call-log.php in the line: 
$FG_COL_QUERY='calldate, channel, src, clid, dst,
disposition, duration, uniqueid'; 
 
and add a line: 
$FG_TABLE_COL[]=array ("Recording", "uniqueid", "6%",
"center", "", "30"); 
 
It displays 'uniqueid' for every call in reports. 
 
If it will display it in the form of URL like in my
example: 
http://192.168.0.37/recordings/index.php?s=callmonitor&q=asterisk-13817-1131353495.213&start=0&btnS=Search

 
It will be possible to go directly to record for
speciffic call from reports. 
 
I'm not to strong in PHP :( 
Can somebody help me please to add this feature to AMP? 
I think it's nice to be able to see recordings from
reports. 

Attachments

callmonitor.module.tar.bz2 (5.5 kB) - added by rrb3942 on 02/09/10 10:02:11.
Modified to use glob when the logged in user is 'admin'. Also fixes a bad check for $uniqueid (previous checked for null but not empty)

Change History

11/07/05 09:48:30 changed by dan_littlejohn

Logged In: YES 
user_id=1318991

I think it would be easier to add the popup to the reports.

Attached are the popup files.

Use this to make the links (changing the relevant parts)

        $recordingLink = "<a href='#'
onClick=\"javascript:popUp('misc/recording_popup.php?recording="
. $recording . "&date=" . $date . "&time=" . $time . "')\">"
. _("play") . "</a>";

12/13/06 07:40:09 changed by lir

Whats up with this issue?

02/05/07 04:15:20 changed by splante

I had the same idea and created an update. I don't see a way to upload patches, so see Insight Systems' site for the tarfile and a brief explanation and instructions. There is a shell script to generate the links and some changes to call-log.php.

Now that there's code, what does it take to get this added to the next release?

03/08/07 05:23:12 changed by zanoman

I installed Splante (Scott) tar and get play column but no monitored called show up. Do I miss something?

07/24/08 19:30:24 changed by ryppn

  • milestone set to 3.0.
  • confirmation set to Unreviewed.
  • description changed.
  • svn_rev changed.
  • engine_version changed.

02/12/09 13:54:20 changed by rymes

I just tried this with FPBX 2.5.1.1 and it seems to work, but I have not verified that it doesn't break anything. (ie: changes made to call-log.php since 2.2.0)

Anyhow, it works as advertised, but it is hideously slow if you have a large number of call monitor files. We are an extreme example, but we have well over 100,000 recordings in /var/spool/asterisk/monitor/. Considering the usefulness here is likely limited to people who record a bunch of calls, I'm wondering what else might need to be done to make this work reasonably well. For example, a Call monitor rotation scheme, a'la logrotate, or maybe storing recordings in the database?

I know that most users will not run into this problem, as we have far more recordings than the average bear, but for anyone running a call center who wants to recording incoming or outgoing calls, providing a scalable solution to finding recordings via CDR reports would be a killer app.

08/22/09 19:44:12 changed by p_lindheimer

  • version deleted.
  • milestone changed from 2.6 to 2.7.

02/09/10 10:02:11 changed by rrb3942

  • attachment callmonitor.module.tar.bz2 added.

Modified to use glob when the logged in user is 'admin'. Also fixes a bad check for $uniqueid (previous checked for null but not empty)

02/09/10 10:05:02 changed by rrb3942

I attached a modified version of the callmonitor module that uses a glob to match call recording files when the logged in user is 'admin' and uniqueid is set. It also fixes a problem where they would try to match on a uniqueid even if it was an empty string.

globbing is not the prettiest or fastest thing but this seems to work. Tested it on a system with nearly 30000 recordings and it wasn't to bad.

(follow-up: ↓ 10 ) 02/09/10 10:42:32 changed by rymes

OK, I am certain that this is a boneheaded question, but I presume one should use the module admin to upload this module? I am currently on FPBX 2.5.2.2, and it complains that the module is a bz2 file instead of gzip. When I bunzip2 the file and then gzip it, it complains that the filename is not in the correct format, because it lacks a version number. Before I went and added a bogus version number, I wanted to check with the author. Also, is it safe to presume that an upgrade to the current version of FreePBX would be advised? (maybe it fixes these issues?)

(in reply to: ↑ 9 ) 02/09/10 10:49:14 changed by rrb3942

This is a module file for the ARI which is different from a freepbx module.

Extract the file and you should end up with a callmontior.module file. Replace the callmonitor.module file located in your webroot/recordings/modules (usually /var/www/html/recordings/modules/).

I would advise making a backup of the existing one first.

Soo...Download then

tar -jxf callmonitor.module.tar.bz2 cp callmonitor.module /var/www/html/recordings/modules/ Overwrite existing when prompted.

(follow-up: ↓ 12 ) 02/09/10 11:32:18 changed by rymes

Thanks for the info. I tried under 2.5.2.2 and I get the error "Fatal error: Cannot redeclare class callmonitor in /var/www/html/recordings/modules/callmonitor.module on line 11". I will update to 2.6 tonight and retry to see if that resolves the issue. I think this is a PEBKAC error, though, because the problem remains when I copy the old file back over the new one.

(in reply to: ↑ 11 ) 02/09/10 11:48:06 changed by rrb3942

I should work under 2.5.2.2. Make sure when you make your backup that you move it OUT of the modules directory. I had left mine in the folder as callmonitor.module.bak and it cause problems until I moved it out.

02/09/10 14:05:14 changed by rymes

Thank you, that was the trick. So, to install:

1.) Download 2.) mv /var/www/html/recordings/modules/callmonitor.module ~/callmonitor.module.bak 3.) tar -jxf callmonitor.module.bz2 4.) mv callmonitor.module /var/www/html/recordings/modules/

I think that's right. Thanks for the work in this area, it is much appreciated.

It does not work on my machine, but I am fairly certain that is due to issues with our old asterisk 1.2 version/install. I still get red text on top of the ARI page stating things like: "Asterisk command not understood AppData?: VMBOX=261" or "Asterisk command not understood Channel: Zap/1-1" or "Asterisk command not understood Application: Set"