Sorry for the delayed response. I&#39;m 99% sure that you want this:<br><a href="http://wiki.freeswitch.org/wiki/Lua#Special_Case:_env_object">http://wiki.freeswitch.org/wiki/Lua#Special_Case:_env_object</a><br><br>-MC<br>
<br><div class="gmail_quote">On Wed, Feb 8, 2012 at 4:08 AM, Gerald Weber <span dir="ltr">&lt;<a href="mailto:gerald.weber@besharp.at">gerald.weber@besharp.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="DE-AT"><div><p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">is there a way to get the HangupCause in a HangupHook in LUA ?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">following commands return nil:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">s:getVariable(&quot;hangup_cause&quot;)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">s:getVariable(&quot;hangup_cause_q850&quot;)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">s:hangupCause() returns “NONE”<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I know I can set api_hangup_hook and use the env object to get the channel vars, but i think that’s a litte overkill to use 2 scripts for 1 Call.<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thx<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal">
<span lang="EN-US">gw<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></font></span></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>