<div>I don&#39;t get any irrelevant channel events, it&#39;s my events or my child channel events.<br></div><div>I want to distinguish events from previously launched execute() commands in my event loop, like job id in bgapi. These events can be from my own original channel as well, so uuid filter doesn&#39;t help me.</div>
<div><br></div><br><div class="gmail_quote">2011/3/24 Moe Navid <span dir="ltr">&lt;<a href="mailto:manavid@gmail.com">manavid@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I use outbound socket for bridging, I also do my accounting from there too, As soon as I get the CHANNEL_ANSWER event with the direction:outbound (in content) I defer a new process and create a timer which does 6 seconds billing increments.<div>

<br></div><div>The trick for not receiving events irrelevant to my session was issuing following at the beginning of my session:</div><div><br></div><div>filter unique-id &lt;uuid&gt;\n\n</div><div>filter channel-call-uuid &lt;uuid&gt;\n\n</div>

<div><br></div><div>I wrote my server in Ruby, I&#39;m using EventMachine for TCP handling and Ruby Fibers to write my apps synchronous fashion while talking to FreeSWITCH in async mode. Whenever I need to simulate the blocking mode and pause the execution at some point (with Fibers) I just start listening for the event that has do be received which indicates the job is done, in case of bridge, I enqueue the CHANNEL_HANGUP_COMPLETE and resume my app as soon as I receive it. </div>

<div><br></div><div><font color="#888888">Moe</font><div><div class="h5"><br><div><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 1:41 PM, Dmitry Sytchev <span dir="ltr">&lt;<a href="mailto:kbdfck@gmail.com" target="_blank">kbdfck@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">
I understand this. I use outbound async full ESL mode, launching socket app from dialplan, because in sync mode I have some problems with bridge app and I need to catch parent channel hangup and server disconnection.<br>
<br>

I written wrapper around ESL.pm to implement executeSync which waits for CHANNEL_EXECUTE_COMPLETE while in async mode, works for now.<br>But of course it is not the best way, because of possible error when &#39;execute&#39; is used before my &#39;executeSync&#39; by mistake and without proper event handling so that CHANNEL_EXECUTE_COMPLETE from previous app is catched by my wrapper and it returns prematurely. This is why I want to have some tag I can mark execute call to filter its events later... Maybe there is better way?<br>


<br><div class="gmail_quote"><div><div>2011/3/23 Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;</span><br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div><div>
<br><br><div class="gmail_quote"><div>On Wed, Mar 23, 2011 at 6:48 AM, lakshmanan ganapathy <span dir="ltr">&lt;<a href="mailto:lakindia89@gmail.com" target="_blank">lakindia89@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hi,<br>Eventlock is used to say &quot;Whether to queue the commands or not&quot;.<br><br>Assume I&#39;m giving playback and bridge command via outbound socket to freeswitch.<br><br>If eventlock is &quot;true&quot; then, first &quot;playback will be executed&quot; and then only the bridge will be executed.<br>




<br>If eventlock is &quot;false&quot;, then order of execution is not guaranteed. <br><br>I&#39;m also using Outbound event socket. I&#39;ll run it in async mode. After each execute() statement, if I need the output for that event, I will wait for the event and then only I&#39;ll proceed. If I don&#39;t need event, ( playback ), I just do the other operations.<br>




<br>This works well for me.<br><br></blockquote></div><div>Be sure that you are using the terms &quot;inbound&quot; and &quot;outbound&quot; event socket correctly. It&#39;s inbound or outbound from the perspective of FreeSWITCH, not from the perspective of your script. An easy rule of thumb is this: if you use the &#39;socket&#39; application in your dialplan then you are using &quot;outbound event socket&quot; because FS has to make an outbound connection to your script.</div>



<div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Event_socket" target="_blank">http://wiki.freeswitch.org/wiki/Event_socket</a></div><div><br></div><font color="#888888"><div>-MC</div></font></div>
<br></div></div><div>_______________________________________________<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></div></blockquote></div><div><div><br><br clear="all"><br>-- <br>Best regards,<br><br>Dmitry Sytchev,<br>IT Engineer<br>
</div></div><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></div>
<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><br clear="all"><br>-- <br>Best regards,<br><br>Dmitry Sytchev,<br>IT Engineer<br>