stream:write("Content-Type: text/html\n\n"); stream:write("FreeSWITCH Command Portal"); stream:write("

FreeSWITCH Command Portal

"); stream:write("
"); stream:write(""); stream:write("


"); command = env:getHeader("command"); if (command) then api = freeswitch.API(); reply = api:executeString(command); if (reply) then stream:write("
Command Result
" .. reply .. "\n
"); end end env:addHeader("cool", "true"); stream:write("
" .. env:serialize() .. "
");