Survey CFD - System.UnauthorizedAccessException

Status
Not open for further replies.

erpardeiro

Free User
Advanced Certified
Joined
Aug 2, 2019
Messages
67
Reaction score
9
Hi guys!

I'm developing a customer satisfaction survey. I already did this before the existence of the Survey component of CallFlow Designer. Now I'm trying with him.

I did all the configuration and recording of the audios, created a MySQL database to store the surveys, etc.

I can compile and upload to 3CX, I can test by listening to the audios and selecting options during the call, however, nothing is recorded in the database.

I suspected that the problem could be in the fields highlighted below and when I looked in the logs, I saw that this was it. See:

1680046177898.png

Now look at the log. It is giving error exactly in the directory above:

1680046255374.png

My question is: Where should this directory be? so I can create and give permissions? What is this CSV file for if I'm recording it in the database?

EDIT:
I discovered that this directory is in /var/lib/3cxpbx/Instance1/Data/Ivr/Prompts/Callflows/surveydemo, it didn't have the "results" directory so I created it and gave write permission, but even so it keeps giving error of permission denied :(
 
PROBLEM SOLVED!

At first I had tried to create and give permissions to this directory, but it still had problems.

I managed to solve it by removing the path and leaving only the file name. By doing this, he finished and managed to record the information in the database without showing any errors in the logs.

In short, just to be documented for future research. When the error "System.UnauthorizedAccessException" related to the path: "/surveydemo/results/results.csv" appears, just remove the directories in the file path and leave only "results.csv", as shown in the print below.

1680108662908.png
 
You were looking in the wrong location. Your path is an absolute path, so you need to create the folder in "/surveydemo/results", and not in "/var/lib/3cxpbx/Instance1/Data/Ivr/Prompts/Callflows/surveydemo/results".
 
Strange. I had created the directory exactly as you said there. I actually found this answer of yours, given by yourself elsewhere. Even creating the directory and setting write permissions on it, the problem continued. It only worked correctly when I removed the path and left only the results.csv file in the field
The important thing is that it worked. It is recording the information in the bank. I won't even try to change anything else
 
  • Like
Reactions: edossantos
Probably you were giving permissions to the wrong user. CFD apps are executed by the "phonesystem" user. When you remove the path, the results file is written to a default folder, which falls into the 3CX data structure, where the "phonesystem" user has permissions by default.
 
Thank you very much!!!
 
For those people who do not have the time or skill to build a survey CFD, I encourage you to take a look at our 3CX Survey Creator tool. Our tool makes it simple to create an unlimited number of surveys. Valid question responses include true/false, yes/no, any scale between 0-9, or ask the caller to record their audio answer. Setting up a new survey is accomplished using a simple web interface. Survey responses are automatically tabulated in web-based reports.
 
Status
Not open for further replies.

Forum statistics

Threads
111,973
Messages
590,078
Members
164,896
Latest member
sameage