<div dir="ltr">Okay now I see what&#39;s happening, although as far as I&#39;m aware sending break should indeed cause httapi application to exit.<div><br></div><div>Can you please pastebin your freeswitch logs of this happening as well? I&#39;m wondering if actually what is happening is the httapi application is exiting, but then dropping into another httapi application thus causing the loop. The logs will be able to shed more light on this though.</div>
<div><br>Cal</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 30, 2013 at 9:34 AM, Rafal Gwizdala <span dir="ltr">&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@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">Ok, sorry for not being clear.<div>Here&#39;s my example mod_httapi script</div><div><br></div><div><div>
&lt;document type=&quot;text/freeswitch-httapi&quot;&gt;</div><div>    &lt;params&gt;</div><div>        &lt;stage&gt;3&lt;/stage&gt;</div>
<div>    &lt;/params&gt;</div><div>    &lt;work&gt;</div><div>        &lt;playback file=&quot;tone_stream://123456789123456789123456789&quot;&gt;&lt;/playback&gt;</div><div>        &lt;playback file=&quot;<a href="http://wypas2/simver2/audio/test.wav" target="_blank">http://wypas2/simver2/audio/test.wav</a>&quot; name=&quot;digits&quot;&gt;&lt;/playback&gt;</div>

<div>        &lt;playback file=&quot;<a href="http://wypas2/simver2/audio/i_talk_to_the_wind.wav" target="_blank">http://wypas2/simver2/audio/i_talk_to_the_wind.wav</a>&quot; name=&quot;digits&quot;&gt;&lt;/playback&gt;</div>
<div>    &lt;/work&gt;</div>
<div>&lt;/document&gt;</div></div><div><br></div><div>This is what I call a &#39;batch&#39;. It simply plays 3 audio files, and since there&#39;s no hangup instruction, it will execute forever in a loop (on reaching end it will make a http request to get a next batch of instructions).</div>

<div>Now, if I want to interrupt the execution of current batch, I send </div><div>break [uuid] all</div><div>using an inbound socket.</div><div>No matter if I use &#39;break all&#39; or just &#39;break&#39;, it interrupts only the current playback and immediately goes to the next instruction.</div>

<div>So, if I want to interrupt and exit the batch and the first tone_stream playback is currently playing i need to send break command three times. Two times if &#39;test.wav&#39; is playing and only one time if the playback has reached  &#39;i_talk_to_the_wind.wav&#39;. And I think it would be more convenient if i could exit the current batch with a single call of &#39;break all&#39;, no matter which action is currently executing.</div>

<div>Best regards</div><span class="HOEnZb"><font color="#888888"><div>Rafal</div><div><br></div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Sep 30, 2013 at 9:42 AM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr">&lt;<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</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">Sorry for the delayed response, could you clarify a few things;<div><br></div><div>* What do you mean by current batch?</div>

<div>* Does break not exit the httpapi application as expected?</div><div>* Can you paste us some dialplan xml that shows the problem happening?</div>
<div><br></div><div>Thanks</div><span><font color="#888888"><div><br>Cal</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 6:26 PM, Rafal Gwizdala <span dir="ltr">&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@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">Cal, current state of affairs is above - that&#39;s all i was able to find.<div>break command has an addiotional option: break [all], which is expected to break out completely of current dial plan, but it doesn&#39;t seem to work with httapi script (still interrupts only current playback and proceeds with next action). It would be nice if break all worked as expected, by exiting current batch, but I think I can work around this limitation.</div>



<div>Best regards</div><span><font color="#888888"><div>R</div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 26, 2013 at 5:13 PM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr">&lt;<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</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">Rafal,<div><br>Were you able to find a solution to your problem? It would be interesting to hear what you&#39;ve come up with, if not then lets see if we can get you some more help - post what you have done so far.</div>




<div><br></div><div>Hope this helps</div><span><font color="#888888"><div><br>Cal</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 20, 2013 at 3:14 PM, Rafal Gwizdala <span dir="ltr">&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@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">oops, still great but not perfect<div>&#39;break&#39; will only interrupt current playback and skip to next action in the script</div>




<div>so, it will make a http request only if playback action is the last one in the script, otherwise the script will continue</div><span><font color="#888888">
<div>R</div><div><br></div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 20, 2013 at 4:10 PM, Rafal Gwizdala <span dir="ltr">&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@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">Guys, this is incredible<div>the instruction that does what I want exists and is called &#39;break&#39;!</div>





<div>All you need to do is </div><div>break [UUID]</div><div>and current audio playback is interrupted, then mod_httapi makes a new http request to get next script, without dropping the connection</div>
<div>Hope this solves my problem</div><div>FS is a wonderful box of chocolates</div><span><font color="#888888"><div>R</div><div><br></div></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 3:35 PM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr">&lt;<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</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">I understand more about your problem now, but I cannot think of an immediate solution without playing around in FS first.<div>






<br></div><div>Try messing around and see what you can come up with, or wait for others to submit their thoughts/ideas.</div>
<div><br></div><div>Sorry I couldn&#39;t be of much more help</div><span><font color="#888888"><div><br></div><div>Cal</div></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 8:33 AM, Rafal Gwizdala <span dir="ltr">&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@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">Gabe, i&#39;m already using ES for receiving the &#39;beep&#39; event, i&#39;ve described it in another post here.<div>







The problem is that even if my application receives that event, i don&#39;t know any way to tell FS to interrupt current mod_httapi script and return for new instructions to my application. But i think I can live with that, just have to make mod_httapi scripts contact the application more often.</div>








<div>Thanks</div><span><font color="#888888"><div>RG</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 6:36 AM, Gabriel Gunderson <span dir="ltr">&lt;<a href="mailto:gabe@gundy.org" target="_blank">gabe@gundy.org</a>&gt;</span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Wed, Sep 18, 2013 at 12:42 PM, Rafal Gwizdala<br>
&lt;<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@gmail.com</a>&gt; wrote:<br>
&gt; Cal, my main need is to immediately interrupt whatever is currently playing<br>
&gt; when a voicemail beep is detected and play a different message, dedicated<br>
&gt; for voicemail recording.<br>
<br>
</div>You might be looking for an outbound Event Socket connection. I don&#39;t<br>
know what it is off the top of my head, but there is an event the<br>
fires when it detects that tone.<br>
<br>
<br>
Best,<br>
Gabe<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">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>
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>
</div></div></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</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>
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>
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>
<br></blockquote></div><br></div>
</div></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">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>
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>
<br></blockquote></div><br></div>