QueueMetrics > QueueMetrics installation

Illegal file access: the file is not in the list of allowed files.

(1/3) > >>

dreaken667:
I have been wresting with this error for quite some time now and have gone through this forum already searching for answers. A lot of the suggestions concerning this error suggest the need to search for the files first, so let me explain where I am receiving this error first.

Run quick activity, agent or custom report from main screen, go to Answered details, click the magnifying glass next to call. From here I have tried several ways to reach the recording:
1. Click the call recording link at the bottom of the Call Detail tab
2. Click the QA tab followed by the call recording link in the new window
3. Click the QA tab, then add the call recording to a batch job. Then go to that job, list calls, click the listen to call icon and then the call recording link.

All of the above leads to the same error: "Illegal file access: the file is not in the list of allowed files."

I have tried adjusting default.monitored_calls and audio.server in QueueMetrics and I can get it to display the links as both LocalFiles and LocalFilesByDay, but the same error appears when clicking the link. The call recordings are on the same machine as QueueMetrics. I've even tried creating a bind mount for /var/spool/asterisk/monitor at /usr/local/queuemetrics/webapps/queuemetrics-14.03.1-750/monitor and adjusted QueueMetrics settings accordingly. It still provides a link, but I get this error when clicking it. QueueMetrics is running as root and /var/spool/asterisk/monitor has 777 permissions right now and I still get this error.

We upgraded the system to version 14 to take advantage of some of the new features and everything else is working great, but we can't access call recordings at all now.

Does anyone know how to make this work properly?

QueueMetrics:
Look at the file names - are there any special characters in them? especially spaces and plusses (+).

That error is meant to avoid people hacking the system and accessing to other recordings through QM if they have not seen the page first.

dreaken667:
Yes, the filenames do have a + in them. This is because of the caller ID of the caller coming in as +1NPANXXXXXX, so the filenames turn out to be like this: q-713-+17879425688-20140520-071636-1400588142.39217.wav

What would you suggest to get around this issue?

QueueMetrics:
Easiest - rename the files.

dreaken667:
For the sake of others having this issue, I was able to resolve the problem. This particular system is utilizing FreePBX 2.11.0 & asterisk 10.12.3 in case that is relevant. Here is how I was able to resolve the problem:

Add the following to /etc/asterisk/extensions_custom.conf:


--- Code: ---[from-pstn-custom]
exten => _X!,1,GotoIf($["${CALLERID(num):0:1}" = "+"]?plusstart:noplusstart)
exten => _X.,n(plusstart),NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(num):1})
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X.,n,Set(CALLERID(ANI)=${CALLERID(num)})
exten => _X!,n(noplusstart),NoOp(Caller ID does not need adjustment)
--- End code ---

Then load the new dialplan code with:


--- Code: ---asterisk -rx 'dialplan reload'
--- End code ---

This will fix all calls going forward. To fix all calls retroactively I had to rename the existing call recordings like so:


--- Code: ---for d in `find /var/spool/asterisk/monitor -mindepth 3 -type d`;do
    cd $d;
    for i in *.wav; do
        mv $i ${i/+/}
    done
done
--- End code ---

The last thing I did was not actually necessary, but I did it to maintain consistency. This will strip the + from all existing calls in the database:


--- Code: ---echo "update queue_log set data2 = replace(data2, '+', '') where data2 like '+%'"|mysql -uroot -p queuemetrics
--- End code ---

I hope this saves someone else a headache.

Navigation

[0] Message Index

[#] Next page

Go to full version