if freeswitch then
function sleep(ms)
freeswitch.msleep(ms)
end
else
local socket = require "socket"
socket.sleep(ms/1000)