uuid = session:get_uuid()
api = freeswitch.API()
session:answer()
session:streamFile("silence_stream://3000")
api:execute("uuid_displace", uuid .. " start /wav/vacation.wav mux")
freeswitch.consoleLog("INFO", "checking ...\n")
i = 10
while (session:ready() and i > 0) do
freeswitch.consoleLog("INFO", "checking ... " .. i .. "\n")
session:streamFile("silence_stream://1000")
i = i - 1
end
freeswitch.consoleLog("INFO", "Done\n")
api:execute("uuid_displace", uuid .. " stop /wav/vacation.wav mux")
freeswitch.consoleLog("INFO", "Bye, have a nice day.\n")