<div dir="ltr">If you WANT to crash FreeSWITCH to test your recovery, monitoring, etc you can run "<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">fsctl crash".</span><div>
<font face="arial, sans-serif">This sounds like a bug.</font></div><div><font face="arial, sans-serif"><br clear="all"></font><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi</span></div>
</div>
<br><br><div class="gmail_quote">On Sun, Dec 9, 2012 at 10:25 AM, Thomas Hoellriegel <span dir="ltr"><<a href="mailto:admin@blindi.net" target="_blank">admin@blindi.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi guys, i found a easy way to crash fs.<br>
<br>
first, you must record a testsoundfile 5 secs, for example:<br>
/usr/local/freeswitch/sounds/test.alaw<br>
Write the following luascript in:<br>
/usr/local/freeswitch/script/simpy-crash.lua<br>
with:<br>
<br>
-- simply script to crash freeswitch<br>
session:sleep(100);<br>
session:answer()<br>
session:sleep(200);<br>
session:setInputCallback("onInput", "");<br>
function onInput(s, type, obj)<br>
freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");<br>
-- freeswitch.consoleLog("info", "DTMF Digit: " .. obj.digit .. "\n");<br>
<br>
if ( obj['digit'] == '1' ) then<br>
<br>
session:streamFile("/usr/local/freeswitch/sounds/test.alaw")<br>
read_msg_menu()<br>
return("false");<br>
<br>
end<br>
<br>
if ( obj['digit'] == '2' ) then<br>
<br>
-- if (obj.digit == "2") then<br>
-- session:streamFile(msg_file_play)<br>
session:streamFile("/usr/local/freeswitch/sounds/test.alaw")<br>
read_msg_menu()<br>
return("false");<br>
<br>
end<br>
<br>
if ( obj['digit'] == '3' ) then<br>
<br>
-- if (obj.digit == "3") then<br>
-- session:streamFile(msg_file_play)<br>
session:streamFile("/usr/local/freeswitch/sounds/test.alaw")<br>
read_msg_menu()<br>
return("false");<br>
<br>
end<br>
<br>
<br>
end<br>
<br>
function read_msg_menu( )<br>
session:setInputCallback("onInput");<br>
session:streamFile("/usr/local/freeswitch/sounds/test.alaw")<br>
end<br>
<br>
<br>
read_msg_menu()<br>
<br>
-- end script<br>
<br>
<br>
edit:<br>
/usr/local/freeswitch/dialplan/default/crash.xml<br>
<br>
<!-- crash test lua --><br>
<!-- --><br>
<br>
<extension name="crashtest" ><br>
<condition field="destination_number" expression="^104$"><br>
<action application="lua" data="simply-crash.lua"/><br>
<!-- <action application="start_dtmf" /> --><br>
</condition><br>
</extension><br>
<br>
reload the dialplan:<br>
fs_cli -x "reloadxml"<br>
<br>
Dial extension 104, and heare your voice.<br>
you must break the voice: press 90 times 1.<br>
Fs is ready to crash.<br>
Fs crash with segfault.<br>
This is a good bug for sysadmins.-).<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<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>
</blockquote></div><br></div></div>