[Freeswitch-users] easy way to crash freeswitch
Steven Ayre
steveayre at gmail.com
Sun Dec 9 13:13:47 MSK 2012
Anything that crashes FS is *always* a bug, and should be fixed.
Please test it on git head of the master branch to confirm if it still
applies there, or whether it is a bug that has already been resolved.
Bugs can be reporterd at http://jira.freeswitch.org/
There is never a 'good' bug for sysadmins... 'fsctl crash' will
intentionally crash FS with much less effort if you ever need to test crash
handling.
On 9 December 2012 08:25, Thomas Hoellriegel <admin at blindi.net> wrote:
> Hi guys, i found a easy way to crash fs.
>
> first, you must record a testsoundfile 5 secs, for example:
> /usr/local/freeswitch/sounds/test.alaw
> Write the following luascript in:
> /usr/local/freeswitch/script/simpy-crash.lua
> with:
>
> -- simply script to crash freeswitch
> session:sleep(100);
> session:answer()
> session:sleep(200);
> session:setInputCallback("onInput", "");
> function onInput(s, type, obj)
> freeswitch.consoleLog("info", "Callback with type " .. type .. "\n");
> -- freeswitch.consoleLog("info", "DTMF Digit: " .. obj.digit .. "\n");
>
> if ( obj['digit'] == '1' ) then
>
> session:streamFile("/usr/local/freeswitch/sounds/test.alaw")
> read_msg_menu()
> return("false");
>
> end
>
> if ( obj['digit'] == '2' ) then
>
> -- if (obj.digit == "2") then
> -- session:streamFile(msg_file_play)
> session:streamFile("/usr/local/freeswitch/sounds/test.alaw")
> read_msg_menu()
> return("false");
>
> end
>
> if ( obj['digit'] == '3' ) then
>
> -- if (obj.digit == "3") then
> -- session:streamFile(msg_file_play)
> session:streamFile("/usr/local/freeswitch/sounds/test.alaw")
> read_msg_menu()
> return("false");
>
> end
>
>
> end
>
> function read_msg_menu( )
> session:setInputCallback("onInput");
> session:streamFile("/usr/local/freeswitch/sounds/test.alaw")
> end
>
>
> read_msg_menu()
>
> -- end script
>
>
> edit:
> /usr/local/freeswitch/dialplan/default/crash.xml
>
> <!-- crash test lua -->
> <!-- -->
>
> <extension name="crashtest" >
> <condition field="destination_number" expression="^104$">
> <action application="lua" data="simply-crash.lua"/>
> <!-- <action application="start_dtmf" /> -->
> </condition>
> </extension>
>
> reload the dialplan:
> fs_cli -x "reloadxml"
>
> Dial extension 104, and heare your voice.
> you must break the voice: press 90 times 1.
> Fs is ready to crash.
> Fs crash with segfault.
> This is a good bug for sysadmins.-).
>
>
>
>
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121209/0cd31782/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list