<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Michael,<div><br></div><div>Thank you or your response. So it is my responsibility to do whatever needs to be done while mod_avmd attempts to detect a beep and to manually stop it after a beep as been detected or after a certain timeout. Correct?</div><div><br></div><div>Bernard</div><div><br></div><div>&nbsp;&nbsp;</div><div><br></div><div><br><div><div>On Jul 23, 2012, at 11:59 AM, Michael Collins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Bernard,<br><br>Keep in mind that avmd is non-blocking, that is, it won't cause your dialplan or script to pause while it is attempting to detect the beep. Your dialplan will keep doing what it normally does, and if avmd detects a beep then it will throw an event which you catch and handle in your onInput function.<br>
<br>-MC<br><br><div class="gmail_quote">On Mon, Jul 23, 2012 at 6:47 AM, BF <span dir="ltr">&lt;<a href="mailto:bfmtl@hotmail.com" target="_blank">bfmtl@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I'm trying to use it from a Lua script. My understanding is that mod_avmd detects beep from voicemail systems and is CPU intensive, please correct me if I'm wrong.<br>
<br>
The Lua example at FreeSWITCH Wiki is<br>
local human_detected = false;<br>
local voicemail_detected = false;<br>
<br>
function onInput(session, type, obj)<br>
&nbsp; &nbsp; if type == "dtmf" and obj['digit'] == '1' and human_detected == false then<br>
&nbsp; &nbsp; &nbsp; &nbsp; human_detected = true;<br>
&nbsp; &nbsp; &nbsp; &nbsp; return "break";<br>
&nbsp; &nbsp; end<br>
<br>
&nbsp; &nbsp; if type == "event" and voicemail_detected == false then<br>
&nbsp; &nbsp; &nbsp; &nbsp; voicemail_detected = true;<br>
&nbsp; &nbsp; &nbsp; &nbsp; return "break";<br>
&nbsp; &nbsp; end<br>
end<br>
<br>
session:setInputCallback("onInput");<br>
session:execute("avmd","start");<br>
In order to implement this example, the script must wait for the beep to be detected or not to process the case accordingly. What is no beep is detected? How can I prevent called party to hear only silence while potential beep detection is being executed?<br>

<br>
Thank you<br>
<br>
Bernard<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org/" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com/" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org/" target="_blank">http://www.OSTAG.org</a><br><br><br>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>