I would like to overwrite a field of the cdr used by freepbx in reports, I couldn’t find in the extensions.conf files where to write it. For example, I would like that in the Source field it shows me accountcode.
I’m using asterisknow 1.7 wich cames with freepbx 2.7.
Most CDR fields are automatically populated. I don’t recall off hand if every field is writeable or not, but depending on what you are trying to do, there are often channel variables that you could write to at the appropriate time that would result in the CDR field being changed (CID being one of them).
The best place to change CDR fields is usually the macro-hangupcall context. You will have to override the auto-generated one in the override file though.
if you are just trying to display other fields in the reports that are already in the CDR, there is a hidden but builtin in ability in FreePBX to do this by overriding a section of the reports code with a file in /etc/asterisk that it will use if present.
You’ll have to look through the CDR reports code to find the file it is looking for, and the expected format, as it’s been a long time since I have done this. It’s basically a conditional #include in the PHP code that if present, will skip what is normally used and can be tailored for the different formats of the reporting system.