<div dir="ltr">Hi Marcin,<div><br></div><div>This is due to a race condition. The socket can be closed before all events are send.</div><div><br></div><div>You need to tell FreeSWITCH to &quot;linger&quot;. See: <a href="https://wiki.freeswitch.org/wiki/Event_Socket_Outbound#Events">https://wiki.freeswitch.org/wiki/Event_Socket_Outbound#Events</a>.</div>

<div><br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><div><div><div><div><font color="#000000">Regards,</font></div></div></div></div></div><div><span style="color:rgb(0,0,0)">Kenn</span><br></div>

<div><span style="color:rgb(0,0,0)"><br></span></div></div></div><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 1:18 PM, Marcin S <span dir="ltr">&lt;<a href="mailto:ms4esl@gmail.com" target="_blank">ms4esl@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><div><div>Hello,<br><br></div>I have another issue that is unclear to me. After &quot;hangup&quot; esl returns events ESL_EVENT_CHANNEL_HANGUP (always), ESL_EVENT_CHANNEL_STATE (twice, but I really don&#39;t care for that) and ESL_EVENT_CHANNEL_HANGUP_COMPLETE (sometimes).<br>


<br></div>Why ESL_EVENT_CHANNEL_HANGUP_COMPLETE is not always generated?<br><br></div>In /var/log/freeswitch/freeswitch.log there are some entries which may have something in common with this issue:<br><div><br>2014-02-14 14:27:05.079484 [DEBUG] switch_core_session.c:1492 Session 131 (sofia/vlan25/379) Locked, Waiting on external entities<br>


2014-02-14 14:27:05.079484 [NOTICE] switch_core_session.c:1510 Session 131 (sofia/vlan25/379) Ended<br><br></div><div>Second question - when is ESL_EVENT_CHANNEL_HANGUP generated? After hangup? Before hangup? It is important for me, because sometimes I have to originate another call somewhere, but I can&#39;t do this when previous call (in another session) is not fully released.<br>


</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></div>