Hi,
I have the following scenario: When using a script in the conference caller controls, the hangup hook gets destroyed.
Affected script languages: Lua, Spidermonkey, Python, Perl
You can easily reproduce this effect using the below Lua scripts and adding the script application to the caller controls.
This is what happens:
- hangup without pressing a digit: hangup hook is called
- press a digit without script call, then hangup: hangup hook is called
- press a digit with script call, then hangup: hangup hook is not called
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.
And there is no way to set it again after pressing the "*" digit.
Any ideas on this?
Thanks,
Melanie
test-conferece.lua:
--------------
function session_hangup_hook(status)
freeswitch.consoleLog("NOTICE", "Session hangup: " .. status .. "\n")
error()
end
session:answer();
session:setHangupHook("session_hangup_hook")
conf_num = "3000"
session:execute("conference", string.format("%s@default", conf_num))
session:hangup()
caller_controls.lua:
--------------------
freeswitch.consoleLog("NOTICE","---- DTMF detect ----\n");
conference.conf.xml:
--------------------
<caller-controls>
<group name="default">
<control action="mute" digits="0"/>
<control action="execute_application" digits="*" data="lua caller_controls.lua"/>
<control action="energy up" digits="9"/>
<control action="energy equ" digits="8"/>
<control action="energy dn" digits="7"/>
<control action="vol talk up" digits="3"/>
<control action="vol talk zero" digits="2"/>
<control action="vol talk dn" digits="1"/>
<control action="vol listen up" digits="6"/>
<control action="vol listen zero" digits="5"/>
<control action="vol listen dn" digits="4"/>
<control action="hangup" digits="#"/>
</group>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org