<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">What about playback or streamFile from/to an offset and once this stream is finished, start another stream from where the last finished and then listen for events?</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">session:streamFile(audioFile, 5000, 10000)</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">and then session:streamFile(audioFile, 10001) and later listen for inputcallback. <br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Offset is defined in playback and streamFile but no end point for the audio, so I guess that would not be possible? Or if there is a better logic to do that?</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <div id="bloop_sign_1498675816054210048" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br><br>Sent with Airmail</div>
</div> <div class="airmail_ext_on" style="color:black"><br>From: <span style="color:black">Michael Jerris</span> <a href="mailto:mike@jerris.com"><mike@jerris.com></a><br>Reply: <span style="color:black">FreeSWITCH Users Help</span> <a href="mailto:freeswitch-users@lists.freeswitch.org"><freeswitch-users@lists.freeswitch.org></a><br>Date: <span style="color:black">June 28, 2017 at 11:17:42 PM</span><br>To: <span style="color:black">FreeSWITCH Users Help</span> <a href="mailto:freeswitch-users@lists.freeswitch.org"><freeswitch-users@lists.freeswitch.org></a><br>Subject: <span style="color:black"> Re: [Freeswitch-users] How to delay setInputCallback() while playing audio? <br></span></div><br> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap:break-word" class=""><div></div><div>
<title></title>
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;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" 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">
<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">
<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" 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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div class="">
<div class=""></div>
<div class="">
<div dir="ltr" class=""><span class="">use streamFile
silence_stream://2000</span>
<div class=""><span class=""><br class=""></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 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=""></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_-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>
</blockquote>
</div>
</blockquote>
</div>
</div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com">http://www.cluecon.com</a><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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div></div></span></blockquote></body></html>