con = freeswitch.EventConsumer("all"); --enabled EventConsumer
service_type= session:getVariable("service_type") or "";
callee_id= string.sub(session:getVariable("caller_id_number"),5,-1) or "";
caller_id= string.sub(session:getVariable("ANI"),5,-1) or "";
uuid= session:getVariable("uuid") or "";
session:setVariable("ObCause", "");
--[[
freeswitch.consoleLog("info","service Name="..service_type.."\n")
freeswitch.consoleLog("info","uuid="..uuid.."\n")
freeswitch.consoleLog("info","caller ID="..caller_id.."\n")
freeswitch.consoleLog("info","callee ID="..callee_id.."\n")
--]]
while (session:ready()) do
session:setAutoHangup(false)
for e in (function() return con:pop(1,500) end) do
event_name = e:getHeader("Event-Name") or ""
if (event_name == "CHANNEL_ANSWER") then
session:sleep(1000);
session:execute("avmd_start");
session:sleep(30000);
--digits = session:read(1, 1, Obprompt, 3000, "#");
session:execute("avmd_stop");
session:hangup();
session:destroy();
end
end
end
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}