<div dir="ltr">If you WANT to crash FreeSWITCH to test your recovery, monitoring, etc you can run &quot;<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">fsctl crash&quot;.</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">&lt;<a href="mailto:admin@blindi.net" target="_blank">admin@blindi.net</a>&gt;</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(&quot;onInput&quot;, &quot;&quot;);<br>
function onInput(s, type, obj)<br>
   freeswitch.consoleLog(&quot;info&quot;, &quot;Callback with type &quot; .. type .. &quot;\n&quot;);<br>
--  freeswitch.consoleLog(&quot;info&quot;, &quot;DTMF Digit: &quot; .. obj.digit .. &quot;\n&quot;);<br>
<br>
   if ( obj[&#39;digit&#39;] == &#39;1&#39; ) then<br>
<br>
session:streamFile(&quot;/usr/local/freeswitch/sounds/test.alaw&quot;)<br>
read_msg_menu()<br>
  return(&quot;false&quot;);<br>
<br>
end<br>
<br>
   if ( obj[&#39;digit&#39;] == &#39;2&#39; ) then<br>
<br>
-- if (obj.digit   == &quot;2&quot;)  then<br>
--  session:streamFile(msg_file_play)<br>
session:streamFile(&quot;/usr/local/freeswitch/sounds/test.alaw&quot;)<br>
read_msg_menu()<br>
  return(&quot;false&quot;);<br>
<br>
end<br>
<br>
   if ( obj[&#39;digit&#39;] == &#39;3&#39; ) then<br>
<br>
-- if (obj.digit   == &quot;3&quot;)  then<br>
--  session:streamFile(msg_file_play)<br>
session:streamFile(&quot;/usr/local/freeswitch/sounds/test.alaw&quot;)<br>
read_msg_menu()<br>
  return(&quot;false&quot;);<br>
<br>
end<br>
<br>
<br>
end<br>
<br>
function read_msg_menu( )<br>
  session:setInputCallback(&quot;onInput&quot;);<br>
session:streamFile(&quot;/usr/local/freeswitch/sounds/test.alaw&quot;)<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>
&lt;!-- crash test lua  --&gt;<br>
   &lt;!--    --&gt;<br>
<br>
&lt;extension name=&quot;crashtest&quot; &gt;<br>
&lt;condition field=&quot;destination_number&quot; expression=&quot;^104$&quot;&gt;<br>
&lt;action application=&quot;lua&quot; data=&quot;simply-crash.lua&quot;/&gt;<br>
&lt;!-- &lt;action application=&quot;start_dtmf&quot; /&gt;    --&gt;<br>
&lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
reload the dialplan:<br>
fs_cli -x &quot;reloadxml&quot;<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>