Thanks for checking it Michael. I thought i was trying execute 'speak' when AVMD detects a beep as below, but may be i am missing something. Please review the code and let me know if i am missing anything:from freeswitch import *# WARNING: known bugs with hangup hooks, use with extreme cautiondef hangup_hook(session, what):%s!!\n\n" % what)returndef input_callback(session, what, obj):if (what == "dtmf"):consoleLog("info", what + " from callback " + obj.digit + "\n")returnelif (what == "event" and session.getVariable('avmd_detect') == "TRUE"):consoleLog("info", "Voicemail Detected\n")return "TRUE"def handler(session, args):session.answer()# session.setVariable("hangup_after_bridge", "false")callback = session.setInputCallback("input_callback")session.execute("avmd", "start")consoleLog("info", "AVMD start\n")session.execute("sleep", "18000")consoleLog("info", "AVMD status %s\n" % session.getVariable('avmd_detect'))if session.getVariable('avmd_detect'):consoleLog("info", "Beep Detected\n")session.execute("speak", "flite|kal|'Hi this is '")session.execute("avmd", "stop")session.execute("speak", "flite|kal|'Hi this is '")consoleLog("info","callback returned %s!!\n\n" % callback)session.execute("avmd", "stop")consoleLog("info", "AVMD stop\n")session.setHangupHook(hangup_hook)session.hangup() #hangup the callAppreciate it!
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org