[Freeswitch-users] mod_avmd - Does this work for anyone on current builds?

Jason Moran jmoran at secureachsystems.com
Wed Oct 5 23:17:33 MSD 2011


I tried out mod_avmd 6+ months back and had some success.  However, I
cannot seem to get it to trip any longer on newer builds of FS. The
avmd_detect variable is blank and no event fires on multiple carriers
and destination phones. Does anybody else have success on current/recent
builds of FS?

 

Thanks,
Jason

 

Example code:

function onInput(s, type, obj, arg)

{

   try {

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

        {

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

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

              session.execute("sleep", "200");

 
session.streamFile('/usr/local/freeswitch/recordings/playbackfile.wav');

              if(session.ready()) //Only hangup if onDTMF code has
finished.

            {

                session.execute("hangup","ORIGINATOR_CANCEL");
//session.hangup doesn't give the code we want

            }

            return false; // don't allow original playback file to
continue

        }

   }  catch (e) {

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

   }

   return true;

}

 

session = new Session('{
origination_caller_id_number=[deleted]}sofia/gateway/[deleted]/'+argv[0]
);

 

if (session.ready()) {

    session.execute("sleep","500");

    session.execute("avmd", "start");

    console_log("info", "avmd started\n"); 

 

 
session.streamFile('/usr/local/freeswitch/recordings/playbackfile.wav',
onInput);

    console_log("info","avmd_detect value
is:"+session.getVariable("avmd_detect")+"\n");

    if ( session.ready( ) ) {

        session.hangup( );

    }

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111005/731e7b17/attachment.html 


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