[Freeswitch-users] mod_avmd beep detected event or session variable

Jason Moran jmoran at secureachsystems.com
Tue Aug 23 01:12:52 MSD 2016

Prior to mod_avmd getting updated, I would call avmd with the "start"
command and find the detection in javascript via:
function onDTMFOrEvent(s, type, obj, arg)


   try {

        if(type == "event" && session.getVariable("avmd_detect") == "TRUE")


            console_log("info", "Voicemail Detected\n");

            //session.execute("avmd", "stop"); //Deprecated


            return false; 


   }  catch (e) {

      console_log("err", e + "\n");


   return true;



The key line was if(type == "event" && session.getVariable("avmd_detect") ==
"TRUE"), but the new documentation mentions the "beep detected" event name
which can be subscribed with "event plain CUSTOM avmd::beep" which will have
the Beep-Status custom field which should have "DETECTED" .


Finding that particular event and status is not straightforward. I cannot
use obj.Beep-Status as that is invalid JS. Does the "avmd_detect" session
variable continue to get populated as before?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160822/000a8b59/attachment.html 

Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list