How can I edit a FreePBX module without editing the module?

I am wondering how I can remove a field or add a field to an existing freePBX module without editing the module code so that I can upgrade the module and not lose the changes?

You can’t. If you make changes to the module you are going to 1) cause the system to throw errors about the module being altered and not matching its file signature. 2) It will be overridden by the next module update.

You would need to write a module outside of FreePBX or within FreePBX to do what you are looking for. Even if that is dipping into another module to modify/get/set data.

Or… If this is a something you think that more people could benefit from such a feature, then file a feature request:

It’s not a feature we could build. FreePBX is modular. You build a module that can hook into any other module.

1 Like

I was referring to the feature he wants to add to the module, which can perhaps be beneficial to others.

So far the feature that was requested was “add/remove fields” to modules without future module updates impacting those changes. More specifically, changing the existing code to suit their needs. The answer is still no. I gave the reasons why and provided the standard, recommended way to achieve this.

Your response to that basically infers to ignore my initial response and open a feature request. Tony’s response was correct in that the feature request as it would stand (based on the original post) is not something that would happen because in FreePBX world the answer to something like this is “write a module” because that’s how FreePBX was built.

What I’m saying is, the original post is vague and very broad scope. While the question was phrased as “a module” that doesn’t mean it is actually for a module. The OP could just be looking for confirmation of “yes, you can” and then apply that to any module can have this happen. In these vague/broad scope instances the knee jerk reaction is not to say “open a feature request” because it does nothing but fill the issue tracker with junk.

Ask questions, get input, make assessment, offer solution. Not just jump to offer solution.

OP wants to add something custom to a module. You said, not possible, I agree.

I added, if that “something” which he wants to add, is something he wants to see in FreePBX, AND other users can benefit from such a feature as well, then why not file a feature request?

That’s not rocket science.

So far, we have no idea if OP is already a FreePBX user, or someone looking into a possible solution.
So far, we have no idea what OP is really trying to accomplish, other than he wants to “add a field”. but could be, it’s some information that already exists somewhere in that module, or can be enabled somewhere in the settings. Who knows?

Finally, many people are ranting daily that “you can’t do this or that with FreePBX, it’s useless” IMO: if people need to learn to file the features requests they want added on the official platform, rather than bashing FreePBX on other sites and voip communities.