[Freeswitch-users] fs crashs after more then 100 dtmf events on a call

Thomas Hoellriegel admin at blindi.net
Mon Aug 13 18:53:10 MSD 2012


Hi peter, thanks for you helpful message.

I describe a easy way to crash fs.

  You can reproduce this situation.

step1
recording 3 soundfiles and store in a directory.

step2
the luacode:

-- 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
-- if (obj.digit   == "1")  then 
--  session:streamFile(msg_file_play)
session:streamFile("/usr/local/freeswitch/sounds/nummer1.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/nummer2.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/nummer3.alaw")
read_msg_menu()
  return("false");

end

end

function read_msg_menu( )
  session:setInputCallback("onInput");
session:streamFile("/usr/local/freeswitch/sounds/nummer1.alaw")
end


  read_msg_menu()

step3
put this in your dialplan.
for example:
<!-- crash fs via simply  luascript  -->
<extension name="crashtest" >
<condition field="destination_number" expression="^104$">
<action application="lua" data="simply-crash.lua"/>
</condition>
</extension>

step4 ring the extension.
Heare the testprompt.
Press 60  70  times 1 during the announcement.
fs crashs.

The system is from current git:
FreeSWITCH Version 1.2.0-rc2+git~20120813T041310Z~aad07c6243 (1.2.0-rc2; 
git at
commit aad07c6243 on Mon, 13 Aug 2012 04:13:10 Z)

This is very danger, then to plan a phonecast (newsystem) or public
voiceforums.
thanks.


---------------
Du kannst mich jederzeit kostenlos per Festnetz erreichen unter:
http://www.blindi.net/callback
homepage: http://www.blindi.net
blinde-misc mailingliste für blinde. anmeldung unter:
http://www.blindi.net/mailman/listinfo/blinde-misc


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list