@Adrian Fretwell, thank you for replying.
It means, Freeswitch fetch its configuration data from PostgreSQL, using Lua Scripts and Fusionpbx create/read/update/delete the information of Freeswitch into PostgreSQL?
In addition, if you can help to understand how Fusionpbx generate xml...