<div dir="ltr">problem is that I only want to interrupt users playing a specific file, that&#39;s why I was thinking of an even so that I can include the filename in an event header and in the callback check if the header matches the file currently being played and break, uuid_break would interrupt even users listening to another file, I can probably loop through all calls with uuid_getvar to check if the file is currently being played but would prefer a more elegant solution</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 27, 2015 at 7:43 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">uuid_break &lt;uuid&gt; [all]<div><br></div><div>if all is there it stops them all, otherwise the currently playing file will.</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Oct 27, 2015 at 2:27 PM, Abaci B <span dir="ltr">&lt;<a href="mailto:abaci64@gmail.com" target="_blank">abaci64@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I bumped in to a similar Issue where I have a large number of callers listening to a file and in some cases I would like to interrupt everyone listening to a specific file.</div><div>I tried deleting the file but the file is still being played back, I guess it&#39;s either playing from cache or it&#39;s buffered, is there a way to not buffer or cache the file?</div><div>I tried sending an even but the setInputCallback doesn&#39;t get triggered from non DTMF on the channel, question is if there is a way to create an event that will trigger the callback function (in lua) or if there is a way to have the callback function listen to custom events, I&#39;m ok if it needs some patching of the code if someone can give me a clue.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 6:00 PM, Andrew Keil <span dir="ltr">&lt;<a href="mailto:andrew.keil@visytel.com" target="_blank">andrew.keil@visytel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-AU" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">To FreeSWITCH users,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">After progressing with Lua inside FreeSWITCH I have a question that I cannot source an answer for within the current FreeSWITCH documentation.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have a requirement for an external application to process an event (via the event socket layer) then return the results back to the application while an audio file is played back in a loop to the caller.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">From the current documentation this method allows for the event to be sent then the return event is “consumed” using a polling approach.  However the caller is listening to silence.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">function poll()<u></u><u></u></p>
<p class="MsoNormal">    -- create event and listener<u></u><u></u></p>
<p class="MsoNormal">    local event = freeswitch.Event(&quot;CUSTOM&quot;, &quot;ping::running?&quot;)<u></u><u></u></p>
<p class="MsoNormal">    local con = freeswitch.EventConsumer(&quot;CUSTOM&quot;, &quot;ping::running!&quot;)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">    -- add text ad libitum<u></u><u></u></p>
<p class="MsoNormal">    event:addHeader(&quot;hi&quot;, &quot;there&quot;)<u></u><u></u></p>
<p class="MsoNormal">    -- fire event<u></u><u></u></p>
<p class="MsoNormal">    event:fire()<u></u><u></u></p>
<p class="MsoNormal">    -- and wait for reply but not very long<u></u><u></u></p>
<p class="MsoNormal">                local retevent = con:pop(1, 5000)<u></u><u></u></p>
<p class="MsoNormal">    if retevent then<u></u><u></u></p>
<p class="MsoNormal">        print(&quot;reply received&quot;)<u></u><u></u></p>
<p class="MsoNormal">                                freeswitch.consoleLog(&quot;DEBUG&quot;,  string.format(&quot;reply received: %s\n&quot;,retevent:getHeader(&quot;Result&quot;)))<u></u><u></u></p>
<p class="MsoNormal">        return true<u></u><u></u></p>
<p class="MsoNormal">    end<u></u><u></u></p>
<p class="MsoNormal">    print(&quot;no reply&quot;)<u></u><u></u></p>
<p class="MsoNormal">                freeswitch.consoleLog(&quot;DEBUG&quot;, &quot;no reply\n&quot;)
<u></u><u></u></p>
<p class="MsoNormal">    return false<u></u><u></u></p>
<p class="MsoNormal">end<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u>Some questions:<u></u><u></u></u></p>
<p><u></u><span>1)<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span><u></u>Is there a way to playback audio (eg. session:streamFile(…)) while this takes place, since currently session:streamFile(…) seems to be a blocking function (ie. Finishes when the audio file is played back completely)?<u></u><u></u></p>
<p><u></u><span>2)<span style="font:7.0pt &quot;Times New Roman&quot;">     
</span></span><u></u>Is there a way to use <span lang="EN">session:setInputCallback(…) to handle an external CUSTOM event being returned (since this would then be able to interrupt the session:streamFile(…) just like it does for DTMF or speech recognition)?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN">If you have a preferred approach to solving this then I am open to your suggestions.</span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I appreciate any assistance that you can give.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span>Kind Regards,<span><font color="#888888"><u></u><u></u></font></span></span></p><span><font color="#888888">
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Andrew Keil<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.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://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a>  ☎ <a href="tel:%2B19193869900" target="_blank" value="+19193869900">+19193869900</a> </div><div><br></div></div></div><div><a style="color:rgb(17,85,204);font-size:12.8000001907349px" href="https://www.youtube.com/watch?v=9XXgW34t40s" target="_blank">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</font></span></div>
<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" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">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" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div>