<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">you’d have to handle ignoring for a couple seconds in your callback.. there is no way to delay setting the callback that I can think of.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 28, 2017, at 2:02 PM, Muhammad Naseer Bhatti <<a href="mailto:nbhatti@gmail.com" class="">nbhatti@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class="Apple-interchange-newline">I guess this would only introduce a silence of 2 seconds. I am trying to play the file but delay DTMF detection for a few seconds. So my file is being played but I want to ignore a few seconds of DTMF inputs for callback function. Can’t think of a better way to do that.</div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div id="bloop_sign_1498672830889174016" class="bloop_sign" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="font-family: helvetica, arial; font-size: 13px;" class="">-- <br class=""><br class="">Sent with Airmail</div></div><div class="airmail_ext_on" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="">From: <span style="" class="">Brian West</span><span class="Apple-converted-space"> </span><a href="mailto:brian@freeswitch.org" class=""><brian@freeswitch.org></a><br class="">Reply: <span style="" class="">Brian West</span><span class="Apple-converted-space"> </span><a href="mailto:brian@freeswitch.org" class=""><brian@freeswitch.org></a><br class="">Date: <span style="" class="">June 28, 2017 at 10:12:00 PM</span><br class="">To: <span style="" class="">Muhammad Naseer Bhatti</span><span class="Apple-converted-space"> </span><a href="mailto:nbhatti@gmail.com" class=""><nbhatti@gmail.com></a><br class="">Cc: <span style="" class="">FreeSWITCH Users Help</span><span class="Apple-converted-space"> </span><a href="mailto:freeswitch-users@lists.freeswitch.org" class=""><freeswitch-users@lists.freeswitch.org></a><br class="">Subject: <span style="" class=""><span class="Apple-converted-space"> </span>Re: [Freeswitch-users] How to delay setInputCallback() while playing audio?<span class="Apple-converted-space"> </span><br class=""></span></div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class=""><div class=""><div class=""></div><div class=""><div dir="ltr" class="">use streamFile silence_stream://2000<div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jun 28, 2017 at 11:48 AM, Muhammad Naseer Bhatti<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:nbhatti@gmail.com" target="_blank" class="">nbhatti@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">Or something like sched_api_function() which calls the function to detect events?</div><span class="HOEnZb"><font color="#888888" class=""><br class=""></font></span><div id="m_-5404861608341932797bloop_sign_1498668453272352000" class="m_-5404861608341932797bloop_sign"><div style="font-family: helvetica, arial; font-size: 13px;" class=""><span class="HOEnZb"><font color="#888888" class="">-- <br class=""><br class="">Sent with Airmail</font></span></div></div><div class="m_-5404861608341932797airmail_ext_on" style=""><span class="HOEnZb"><font color="#888888" class=""><br class="">From: <span style="" class="">Muhammad Naseer Bhatti</span><span class="Apple-converted-space"> </span><a href="mailto:nbhatti@gmail.com" target="_blank" class=""><nbhatti@gmail.com></a><br class="">Reply: <span style="" class="">Muhammad Naseer Bhatti</span><span class="Apple-converted-space"> </span><a href="mailto:nbhatti@gmail.com" target="_blank" class=""><nbhatti@gmail.com></a><br class="">Date: <span style="" class="">June 28, 2017 at 12:18:40 AM</span><br class="">To: <span style="" class="">FreeSWITCH Users Help</span><span class="Apple-converted-space"> </span><a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class=""><freeswitch-users@lists.<wbr class="">freeswitch.org></a>,<span class="Apple-converted-space"> </span><span style="" class="">Brian West</span><span class="Apple-converted-space"> </span><a href="mailto:brian@freeswitch.org" target="_blank" class=""><brian@freeswitch.org></a></font></span><div class=""><div class="h5"><br class="">Subject: <span class="Apple-converted-space"> </span><span style="" class="">Re: [Freeswitch-users] How to delay setInputCallback() while playing audio?<br class=""></span></div></div></div><div class=""><div class="h5"><br class=""><blockquote type="cite" class="m_-5404861608341932797clean_bq"><div style="word-wrap: break-word;" class=""><div class=""><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><span class=""><br class=""></span></div><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><span class="">playbackMessage() function is actually doing session:streamFile(<wbr class="">audio_file). Input callback is functioning fine, but I want to delay detection a few seconds somehow.</span></div><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><span class=""><br class=""></span></div><div id="m_-5404861608341932797bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><span class="">On the other hand, is there a way to stop a running session:streamFile() ?</span></div><span class=""><br class=""></span><div id="m_-5404861608341932797bloop_sign_1498590993083267072" class="m_-5404861608341932797bloop_sign"><div style="font-family: helvetica, arial; font-size: 13px;" class=""><span class="">-- <br class=""><br class="">Sent with Airmail</span></div></div><div class="m_-5404861608341932797airmail_ext_on" style=""><span class=""><br class="">From: <span style="" class="">Brian West</span><span class="Apple-converted-space"> </span><a href="mailto:brian@freeswitch.org" target="_blank" class=""><brian@freeswitch.org></a><br class="">Reply: <span style="" class="">FreeSWITCH Users Help</span><span class="Apple-converted-space"> </span><a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class=""><freeswitch-users@lists.<wbr class="">freeswitch.org></a><br class="">Date: <span style="" class="">June 28, 2017 at 12:15:20 AM</span><br class="">To: <span style="" class="">FreeSWITCH Users Help</span><span class="Apple-converted-space"> </span><a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class=""><freeswitch-users@lists.<wbr class="">freeswitch.org></a><br class="">Subject: <span class="Apple-converted-space"> </span><span style="" class="">Re: [Freeswitch-users] How to delay setInputCallback() while playing audio?<br class=""></span></span></div><br class=""><blockquote type="cite" class="m_-5404861608341932797clean_bq"><div class=""><div class=""><div dir="ltr" class=""><span class="">Show us how you're doing the playback, If you're doing session:execute('playback', 'blah.wav'); The input callback won't function you have to use session:streamFile instead.</span><div class=""><span class=""><br class=""></span></div><div class=""><span class="">/b</span></div><div class=""><span class=""><br class=""></span></div></div><div class="gmail_extra"><span class=""><br class=""></span><div class="gmail_quote"><span class="">On Tue, Jun 27, 2017 at 1:10 PM, Muhammad Naseer Bhatti<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:nbhatti@gmail.com" target="_blank" class="">nbhatti@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""></span><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">I am running an IVR which collects DTMF input while the file is being played, written in Lua. I set InputCallback and then listen for DTMF events. If event found, take actions etc. </div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class=""> <span class="Apple-converted-space"> </span>session:setInputCallback("even<wbr class="">tHandler")</div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class=""> <span class="Apple-converted-space"> </span>playbackMessage (playback_delay)</div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class=""><br class=""></div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class="">Facing a strange issues with Verizon where they send a quick RTP Event write after starting the audio, which triggers the DTMF event and bad things happen in my script. This only happens within first 1 to 2 seconds of RTP. How can I have my InputCallback listen for events only after a few seconds while still playing the audio? or do I have to switch to playAndGetDigits() ?</div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class=""><span class="m_-5404861608341932797HOEnZb"><font color="#888888" class=""><br class=""></font></span></div><div id="m_-5404861608341932797m_-3622451393751199084bloop_customfont" style="margin: 0px;" class=""><span class="m_-5404861608341932797HOEnZb"><font color="#888888" class=""><br class=""></font></span></div></div><div id="m_-5404861608341932797m_-3622451393751199084bloop_sign_1498586586627620864" class="m_-5404861608341932797m_-3622451393751199084bloop_sign"><div style="font-family: helvetica, arial; font-size: 13px;" class=""><span class="m_-5404861608341932797HOEnZb"><font color="#888888" class="">-- </font></span></div></div></div></blockquote></div></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></div></div></span></blockquote></div></blockquote></div></div></body></html>