Right now, modules (eg, parking) just write directly to files they need.. to allow for proper seperation of web interface and configuration writing, we should really have retrive_conf writing all files.
This can be done by creating a table (eg, files) that has 'filename', 'active' and 'data' fields. modules that need to write files can just put stuff into the database, and then retrieve_conf can read it and write the actual files out. It should do path substitution (eg, "%ASTETC%/file.conf" becomes /etc/asterisk/file.conf).
Prior to writing configs, UPDATE files SET active = 0 should be run, and retrieve_conf should delete any files with active == 0 (and only then remove them from the table - this way we have a reliable method to delete previously-created files).
There should be an API for this (eg, the table should not be accessed by modules directly), so modules can do freepbx_file_set_contents($filename, $data) (UPDATES or INSERTS a row, with active=1) or freepbx_file_remove($filename) (set active=0,data=).