CFD - Logging question

Sallamos

Forum User
Joined
Mar 22, 2025
Messages
15
Reaction score
1
Hi, I am completely new when it comes to 3cx but i did manage to make a somewhat working CFD flow. I would now like to receive logs (in 3cx) when our users choose various options in the menu.
Currently I have it set in a way where logger component triggers when the user selects for example option 2 and logs in the "info" level to a constant string "Option 2 chosen".

However, even after looking through verbose logs of the call flow, I could not find any mention of that. I tried altering the level to "trace" which still did not display it. Is there a way that i could access this data readily? Is a constant string as a logger going to work or do i have to figure out another option ?

Thank you for all replies.
 
I assume the goal is to perform some summary calculations to identify how many times a given option is selected? In this case, writing to a CSV file might be a better choice so you do not have to parse through ugly log files. I could envision something like the following would be useful:


Caller ID NumberCaller ID NameIVROptionDate Time UTC Offset
8016424655VoIPTools80022025-05-15 14:25:03
 
Writing to a csv would be wonderful. I am trying to log whenever someone uses specific options in my menu to see whether those are popular, and also whenever a user goes through the flow and chooses to dial an extension to our provider rather than going through the normal forwarding channels.
 
Another thought is the 3CX CDR files have a "CallChain" field that lists all the extensions that touched a call (comma separated list). You can infer what choice they selected by where the call went next?
 
mm that could work. I have managed to get my hands on the logs finally, had to download support info to get it, would love to find a better way to do that. Or at best configure a csv parser that does it so that i could work with the data so much more efficiently
 
could you guide me on how to get the result you had shown me in your csv?
 
Incrementing a value in a text file is not a safe approach. Two different calls might be changing the value at the same time, both read the value (for example 4), both increment it (for example to 5), and then save the updated value (both write 5, instead of 5 and 6). So you might start losing some hits. To do this properly, you should send this information to an external entity (web service, database) which could process these requests atomically.
 
Let's back up farther. Thinking about this only a fraction of a second longer, I realized that while writing to a CSV file is a valid option, what you really want is to write the data to an external database via a web API.

The web API approach is supported natively by the CFD and has the benefit of not needing access to the 3CX server disk. That can be problematic if your 3CX server is hosted in the cloud, and you do not have access to the server disk. The web API approach is slightly more complicated since you would need to create the web API, but that is how I would do it.

Keep in mind that it is not permitted to use the 3CX database for this purpose (or any other purpose), nor are you allowed to install your own alternate DBMS on the 3CX server.
 
The web API idea is great, i think that would work the best long term, problem is I am an absolute newbie when it comes to programming. I will hovewer try to figure it out !
 
If you are looking for a programmer, we can help.
 
Look on REST Call Control API. You can create your own web application (outside of PBX) and interact with callers directly using REST Call Control API. Effectively, your application will implement interactions with caller (menu logic), collect/handle DTMF input and store information as you will define there. PBX call history will always provide additional information about call flows where your application participated.
 
  • Like
Reactions: Evolute IT

Members Online Now

No members online now.

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK