<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The wiki (<a href="http://wiki.freeswitch.org/wiki/Mod_lua#Special_Case:_env_object">http://wiki.freeswitch.org/wiki/Mod_lua#Special_Case:_env_object</a>) refers to the env global in mod_lua when executing a lua script set by api_hangup_hook, however, in practice, I don't see env set. Has this been changed or have I messed up somehow? I'm using the following from within the dial plan to get it going.<div><br></div><div><span class="Apple-style-span" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(128, 0, 64); font-size: 14px; white-space: pre; "><<span class="keyword" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(92, 162, 0); font-weight: bold; ">action</span> <span class="keyword type" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(137, 109, 0); font-weight: bold; ">application</span>=<span class="string" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(0, 64, 128); font-weight: bold; ">"set"</span> <span class="keyword type" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(137, 109, 0); font-weight: bold; ">data</span>=<span class="string" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(0, 64, 128); font-weight: bold; ">"api_hangup_hook=luarun recording.lua"<span class="Apple-style-span" style="color: rgb(128, 0, 64); font-weight: normal; ">/></span></span></span></div><div><font class="Apple-style-span" color="#800040" face="Arial, Lucida, 'Lucida Grande', Verdana, sans-serif" size="4"><span class="Apple-style-span" style="font-size: 14px; white-space: pre;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New'; "><span class="tag" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(128, 0, 64); "><<span class="keyword" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(92, 162, 0); font-weight: bold; ">action</span> <span class="keyword type" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(137, 109, 0); font-weight: bold; ">application</span>=<span class="string" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(0, 64, 128); font-weight: bold; ">"bridge"</span> <span class="keyword type" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(137, 109, 0); font-weight: bold; ">data</span>=<span class="string" style="font-family: Arial, Lucida, 'Lucida Grande', Verdana, sans-serif; color: rgb(0, 64, 128); font-weight: bold; ">"user/107@${domain_name}"</span> /></span>
</span></span></font><div><br></div><div><b>Here are the global variables lua does have set:</b></div><div><br></div><div><div>2010-04-20 14:19:14.698522 [NOTICE] switch_cpp.cpp:1142 recording.lua: string</div><div>2010-04-20 14:19:14.698522 [NOTICE] switch_cpp.cpp:1142 recording.lua: xpcall</div><div>2010-04-20 14:19:14.698522 [NOTICE] switch_cpp.cpp:1142 recording.lua: package</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: tostring</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: print</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: os</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: unpack</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: swig_type</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: require</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: getfenv</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: setmetatable</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: next</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: freeswitch</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: assert</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: argv</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: tonumber</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: io</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: rawequal</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: collectgarbage</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: getmetatable</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: module</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: rawset</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: ipairs</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: script_name</div><div>2010-04-20 14:19:14.699536 [NOTICE] switch_cpp.cpp:1142 recording.lua: swig_equals</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: math</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: debug</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: pcall</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: table</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: newproxy</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: type</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: coroutine</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: _G</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: select</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: gcinfo</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: pairs</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: rawget</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: loadstring</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: tellme</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: _VERSION</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: dofile</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: setfenv</div><div>2010-04-20 14:19:14.700538 [NOTICE] switch_cpp.cpp:1142 recording.lua: load</div><div>2010-04-20 14:19:14.701584 [NOTICE] switch_cpp.cpp:1142 recording.lua: error</div><div>2010-04-20 14:19:14.701584 [NOTICE] switch_cpp.cpp:1142 recording.lua: loadfile</div><div><br></div>
Thanks!</div><div>Troy</div></div></body></html>