local xml = require("xml.init") local config = require("xml_util.config") freeswitch.consoleLog("notice", "Section: " .. XML_REQUEST.section .. " Value: " .. XML_REQUEST.key_value .. "\n") if XML_REQUEST.section ~= "configuration" or XML_REQUEST.key_value ~= "sofia.conf" then freeswitch.consoleLog("warning", "Got wrong section or configuration: " .. XML_REQUEST.section .. "/" .. XML_REQUEST.key_value .. ". Do nothing...\n") -- Possible this is mistake but we need to answer with NOT FOUND XML_STRING = config.xml_notfound() else local xml_doc = {xml="document", type="freeswitch/xml", { xml="configuration", name="sofia.conf", config.sofia_global(), { xml="profiles", config.sofia_profile("internal",nil,nil), config.sofia_profile("external",nil,nil), } } } local xml_test = [[ ]] XML_STRING = xml_test .. "\n" --XML_STRING = config.header .. xml.dump(xml_doc) .. "\n" freeswitch.consoleLog("notice", "Reply with: " .. XML_STRING .. "\n") end