<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Helvetica, Arial, sans-serif">Hi, <br>
<br>
I have the following scenario: When using a script in the
conference caller controls, the hangup hook gets destroyed.<br>
Affected script languages: Lua, Spidermonkey, Python, Perl<br>
<br>
You can easily reproduce this effect using the below Lua scripts
and adding the script application to the caller controls.<br>
This is what happens:<br>
- hangup without pressing a digit: hangup hook is called<br>
- press a digit without script call, then hangup: hangup hook is
called<br>
- press a digit with script call, then hangup: hangup hook is not
called<br>
<br>
Looking into the source code of session_destroy, you can see that
the hangup hook is in fact removed - which shold not happen when
calling a script.<br>
And there is no way to set it again after pressing the "*" digit.<br>
<br>
Any ideas on this?<br>
<br>
<br>
Thanks,<br>
Melanie</font><br>
<br>
<br>
<br>
<font face="Courier New, Courier, monospace">test-conferece.lua:</font><br>
<font face="Courier New, Courier, monospace">--------------</font><br>
<font face="Courier New, Courier, monospace">function
session_hangup_hook(status)</font><br>
<font face="Courier New, Courier, monospace">
freeswitch.consoleLog("NOTICE", "Session hangup: " .. status ..
"\n")</font><br>
<font face="Courier New, Courier, monospace"> error()</font><br>
<font face="Courier New, Courier, monospace">end</font><br>
<font face="Courier New, Courier, monospace"><br>
session:answer();</font><br>
<font face="Courier New, Courier, monospace">session:setHangupHook("session_hangup_hook")</font><br>
<font face="Courier New, Courier, monospace">conf_num = "3000"</font><br>
<font face="Courier New, Courier, monospace">session:execute("conference",
string.format("%s@default", conf_num))</font><br>
<font face="Courier New, Courier, monospace">session:hangup()</font><br>
<font face="Courier New, Courier, monospace"><br>
</font><br>
<font face="Courier New, Courier, monospace">caller_controls.lua:</font><br>
<font face="Courier New, Courier, monospace">--------------------</font><br>
<font face="Courier New, Courier, monospace">freeswitch.consoleLog("NOTICE","----
DTMF detect ----\n");</font><br>
<font face="Courier New, Courier, monospace"><br>
</font><br>
<font face="Courier New, Courier, monospace">conference.conf.xml:</font><br>
<font face="Courier New, Courier, monospace">--------------------</font><br>
<font face="Courier New, Courier, monospace"><caller-controls></font><br>
<font face="Courier New, Courier, monospace"><group
name="default"></font><br>
<font face="Courier New, Courier, monospace"> <control
action="mute" digits="0"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="execute_application" digits="*" data="lua
caller_controls.lua"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="energy up" digits="9"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="energy equ" digits="8"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="energy dn" digits="7"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol talk up" digits="3"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol talk zero" digits="2"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol talk dn" digits="1"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol listen up" digits="6"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol listen zero" digits="5"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="vol listen dn" digits="4"/></font><br>
<font face="Courier New, Courier, monospace"> <control
action="hangup" digits="#"/></font><br>
<font face="Courier New, Courier, monospace"></group> </font>
</body>
</html>