Lua XML handler

Exactly in the same vein as mod_xml_curl, you can have FreeSWITCH retrieve its XML configuration snippets by executing a script in one of the supported scripting languages.

You must first configure the scripting language module, in this case mod_lua, to handle XML lookup requests for a class of XML snippets.

Then you create a script that sets a variable named XML_STRING, containing the XML snippet.

That's it. Because lua is embedded in FreeSWITCH (as python and perl) there is no need for anything else.

You would connect to databases, webservers, do your data massaging, and so on from the script itself. The script is just supposed to return a string containing the XML snippet. With any means necessary.

This example Lua script can be configured as xml-handler-script, it sets the variable XML_STRING to the XML document FreeSWITCH is looking for:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.46.229