Links to recorded calls in CDR reports?

I am referring to the Trixbox CDR report, not the FreePBX CDR report, which is completely separate. To get to the one to which I refer, go to “http://your.trixbox.ip/maint” and then choose “CDR Report” from the “Asterisk” drop-down menu. You can also see a screenshot of what I mean on the Feature Request ticket (#3217) I submitted:

http://freepbx.org/trac/ticket/3217

It clearly shows the CDR report, which is in the Trixbox Web interface, not the FreePBX interface (the standard FreePBX one is there, too, of course). You can also see the links to the recorded files.

Rymes

I installed it yesterday and it looks pretty cool. I don’t have nearly as many calls as you (only about 8000). The problem I am having is the play button is not showing up for the calls. From other posts I have read in this forum my installation (PBX in a Flash) did not set up the database with unique naming. The person in the post was having my same problem but he re-compiled his asterisk with the unique naming and the play button showed up for him. Doing all that is a little above my skill level so I had to leave CRI for now. Sorry this post is a little vague but I have to run to a meeting. IF you do some looking around you might find that CRI might help. The link below is where you can download it.

http://www.tikalnetworks.com/voip/index.php?cid=38

Jared

Ticket #318 has been open for 3 years and is assigned to the 3.0 milestone. That ticket has a link to patch code that was written for FreePBX 2.2.0, but never became part of FreePBX. It is likely that some trixbox users have installed this patch, so now see a playback link in their CDR reports. However, this patch uses a piece of ARI to play the file. To allow this, ARI had a giant security problem, which was fixed in FreePBX 2.5. Since it was a security fix, it was also released back to 2.4 and 2.3. That means that the patch from #318 will not work on any current release of 2.3 or better of FreePBX.

rymes, your requests, #3216 and #3217 have been assigned to the 3.0 milestone. You can check those tickets at any time to see the current status.

Thanks, Seth

Well, I don’t know about Ticket #318. I have a vanilla Trixbox 2.2.4 install on which I have updated FreePBX to current (2.5), and I have not patched anything manually. The Trixbox CDR report (again, NOT FReePBX CDR, they’re different) works just fine, even with the latest versions of ARI and the ARI framework.

Also, ARI does not provide links to the recorded calls on my machine. I will look into re-compiling asterisk as sjaredj mentioned, as well as CRI.

Lastly, AsteriskNOW 1.5 is looking interesting! Glad to see the switch to FreePBX!

you are right and again I learn something new…

I’ve used trixbox/@home for 3 years now and have never noticed that screen. I stopped using the maint screens a long time ago when the package manager started screwing up, I only use that screen as a admin for the phpmyadmin pages now. Almost everything else like editing is done via CLI. The end point manager didn’t have a option for Aastra phones when we purchased ours and the configurations were so easy to edit and set in the tftpboot directory I have not looked back.

Sorry for my lack of looking more closely.

Deleted… whoops.

rymes, i took a look at the Trixbox CDR report code and it turns out that it is not original to Trixbox. The code is from Elastix, so you should be able to switch to Elastix and have the same type of CDR report available.

OK, I will look into Elastix. Heck, I speak Spanish, maybe i could even help with translation of various items.

However, I am still flummoxed as to why my ARI will not provide me with Access to call recordings. It works fine for voicemail recordings, I can even click the phone icon and it will call my phone and playback the message. (How cool is that?!). However, I cannot playback recorded calls from our incoming call queue. There are no icons displaying in the interface when I click into the Call Monitor part of the interface. All of the CDR records seem to be there, but none of them have the playback option. I looked into the /var/www/html/recordings/includes/main.conf.php file and found the following settings:

$ASTERISK_CALLMONITOR_PATH = “/var/spool/asterisk/monitor”;

$CALLMONITOR_ADMIN_EXTENSIONS =“all”;

$CALLMONITOR_ALLOW_DELETE = 1;

$CALLMONITOR_AGGRESSIVE_MATCHING = 1;

$CALLMONITOR_ONLY_EXACT_MATCHING = 1;

I had to change “$CALLMONITOR_ADMIN_EXTENSIONS” to “all” from “”, but that seemed to have no effect. Do I need to restart something to make that work? Everything else seems to be appropriate.

Also, I am still getting errors like this in ARI (in red at the top of the page): "Asterisk command not understood Status: 0 " or "Asterisk command not understood Privilege: call,all " or “Asterisk command not understood AppData: AMPUSERCIDNAME=Suzy Jones” and "Asterisk command not understood AppData: CFUEXT= "

Of course, part of the problem is bound to be that I have a total of 1132720 entries in the list and that number grows every day…

Tom

So after about 5 hours of hair pulling, I was able to get the link to show up to play back recorded calls. Here’s what I had to do:

  1. Recompile asterisk-addons with #define MYSQL_LOGUNIQUEID added to the cdr/cdr_addon_mysql.c file. Also, since I was running on a 64-bit machine, I was missing a few 64-bit libraries (I installed via AsteriskNow 1.5 beta CD), so I also had to install zlib and openssl-devel. Also had to download and unzip the Asterisk distribution (1.4) and had to use --with-asterisk=/usr/src/asterisk for the ./configure program to properly see what I had. I turned off the polish number counting and ooh323 addons, but kept the formatmp3 and others.

  2. Set the $CALLMONITOR_ONLY_EXACT_MATCHING to 1 in the main.conf.php.

  3. That still wasn’t working, but then I discovered that the permissions on the /var/spool/asterisk/monitor were set incorrectly. Set it as follows (same as the voicemail directory):

That was it. Seems a lot easier now that I write it out. The recompiling was the hardest part, as it took a while to figure out that the problem it was reporting (couldn’t find -lmysqlclient) wasn’t really the problem. The key there was to look in the config.log file to see what the real problem was with the mysql pre-compile check.

OK, that’s great news, but can you do us one better? Can you start a thread in asterisknow.org forum about this so we can get this functionality built-in to the RPMS that come with the system? It sure would be nice to be able to use ARI for call recordings out of the box on AsteriskNOW and not have to recompile asterisk addons each time a new version is released!

If not, i can post a link to this thread on the forum, but it would be better if you were around for questions, considering you have the experience!

Tom

I will start a thread in asterisknow too… But also wanted to share a bug I found. When logged in as admin, outgoing recorded calls weren’t matching up (at least in my config) because it was using the extension “admin” instead of the actual source extension. So by adding the line $extension = $data_value['src']; around line 431 in modules/callmonitor.module (where it’s reading in the other values), it will properly display outgoing calls too. Haven’t tested that this doesn’t break viewing recordings when logged in for a particular extension, but I would assume it doesn’t.

I also made my own little enhancement to have a default duration filter of 1 second to get rid of all the 0 second entries. It looks like there’s code to set a cookie to remember the last duration setting, but it doesn’t seem to work for me. So you can add the line if ($duration_filter=='') $duration_filter='1'; around line 120 in modules/callmonitor.module. Should come right after the line $duration_filter = getArgument($args,'duration_filter'); (the same line also occurs earlier, around line 57, but doesn’t seem to need the extra line added there to make this default setting work).

Hopefully this is of use to someone! :slight_smile: And again, I’ll start a thread in the asterisknow forums to cover how to get it working, the fix, and the enhancement.

Ziftyati, thank you for the excellent work on this! (God knows it’s over my head…) Hopefully someone on the FreePBX team is still watching the thread. Did you file a bug report?

As for AsteriskNOW, the main thing there is trying to get them to compile the RPM with the UNIQUEID setting enabled. I’ll keep an eye out for your post.

Thanks again, I look forward to having this work!

Tom

I looked over ziftyatl’s last comment, and his code changes are not suitable in the general case. The first change does cause problems in some situations. Also, forcing duration to > 0 prevents the Call Monitor page from showing missed calls. Some people’s main use of Call Monitor is to return missed calls, so such a change would be a real problem for them.

Are there better ways to accomplish the same thing?

Ziftyatl mentioned a cookie to remember what your previous duration choice was. Those who use it for 0 second calls could leave it set to 0, and others could set it to 5 seconds, or whatever, and a cookie would remember that choice. Maybe this already works?

How about the issue with ARI being confused because you are logged in as Admin? Is that not really an issue, or does some mechanism have to be added to allow a user logged in as admin to see all calls, or at least specify an extension number?

Tom

rymes, I cannot reproduce either of the issues ziftyatl mentioned. If you can, please post detailed bug reports in the Trac.

When you’re logged in as admin, it uses the extension “admin” for matching outgoing calls. But in my installation of *Now 1.5 beta1, outgoing calls are saved using the format of OUT[ext#]-[DATE]-[UNIQUEID].wav. So the current code will try matching on OUTadmin-[DATE]-[UNIQUEID].wav – and since there is no extension “admin”, nothing will ever match. If the point of the admin view is to be able to view all recordings regardless of extension, then it should be matching based on the source extension as recorded in the cdr database, not as the “extension” the person is logged into ARI with.

Incoming calls match fine without any changes to the code. It’s only on recorded outgoing calls that this bug appears.I wasn’t able to find an issue for this in the Trac, or I would have posted this there.

ziftyatl, please file a bug report regarding links for outgoing calls not showing up in Call Monitor when logged in as “admin”.

Hi,

I’m facing the same situation about link to play messages recorded.

I followed the same instructions that I found on this post, without sucess (recompile addons cdr).

In my case I’m running on Elastix 1.5.2 64 bits.

First I set on General Settings that recordings should be done on /mnt/usbdrive

And changed the information on main.config.php file to point to same path.

Now I remove that information, move all call monitor files to /var/spool/asterisk/monitor, remove the setting on General Settings, and no success.

Any clue?

thanks in advance

Just to follow up on this link, I have upgraded our nearly 5 year old Trixbox machine to Elastix 2.0, and the links to Queue calls in ARI work out of the box.

1.) Change the admin password in /var/www/html/recordings/includes/main.conf.php
2.) Log in to ARI at http://my.ip.address/recordings as Admin
3.) Type the queue number into the search box, and Voila!

As suspected, my problems were related to the ancient Trixbox underpinnings, not ARI.

Tom

  1. That still wasn’t working, but then I discovered that the permissions on the /var/spool/asterisk/monitor were set incorrectly. Set it as follows (same as the voicemail directory):
    drwxrwxr-x 2 asterisk asterisk 4096 Nov 26 01:06 monitor

Thats all it was!!??

While this thread is a bit dated- I was also not finding play links when logged into voicemail/recordings. It absorbed nearly 2 hrs of hunting for a solution which lead me to this thread… and in my case this info was the solution. Just permissions from perspective of the web server.

Mine is a pretty vanilla install of FreePBX 2.8.8 and it appears the default install doesnt have perms properly set on this location.