Not sure, maybe it’s already there, but it would be nice to have an area to define a custom application. It would be an area that you could enter an asterisk configuration script into that could be referenced by IVR or other areas.
For stuff like, having an IVR tree that will enable the caller to enter their account number and lookup information on a external database.
Placing the configuration into freePBX would prevent the custom configuration from being overwritten by a GUI config change.
you would need to elaborate, sounds a bit ambigous. You can put custom stuff in _cutom files and reference them as destinations in multiple ways.
Otherwise, you can write a custom module for the type of purpose you are referring to (I’ve done exactly that for the scenario you define, to query users for SSN #'s and retrieve information from external HR database to bring back into the app, for example).
So … maybe an example of what you have in mind would help to articulate the idea.