If you break this down into its fundamental component parts it is really quite simple. So here follows a VERY BRIEF explanation.
Correctly configured, FreeSwitch will will work perfectly well on it's own without FusionPBX, however FusionPBX adds extra features and the ability to configure FreeSwitch, so you don't have to.
The PHP code is mostly the web front end and you use this to enter your configuration data which gets stored in a database.
When a call or a registration request comes into Freeswitch, Freeswitch calls an .lua script that is known as an XML handler. This handler reads the database and dynamically generates the XML that Freeswitch needs to handle the registration or call.
And that's about it! Other lua scripts provide facilities like directory look ups or failure handlers that send a call to voicemail or forward the call if any kind of forwarding is enabled.
If you look in /etc/freeswitch/autoload_configs/lua.conf.xml you will see the lines:
Code:
<!--
Deliver XML from lua with the XML Handler
-->
<param name="xml-handler-script" value="app.lua xml_handler"/>
<param name="xml-handler-bindings" value="configuration,dialplan,directory,languages"/>
This is how Freeswitch knows to use the lua scripts.
Freeswitch can get it's configuration with many different binding options, not just lua, you can view the Freeswitch lua binding documentation here:
https://developer.signalwire.com/fr...d-lua/Serving-Configuration-with-Lua_3965134/
I hope that helps you a little.
Adrian.