FreeSWITCH Randomly Answer Calls

Posted on 24-12-2020

I needed to answer calls randomly and came across the mod_expr module that used to evaluate math functions. Below script will generate a number between 1 and 4. Later it will check if the generated number greater than 2, if its true it will answer the call and send a random DTMF and if its not true it will hangup the call with NO_ANSWER.