Try removing all logic, and just subscribing to all events and printing them out. I&#39;ve never used esl with php, but I&#39;d be surprised the last event is missing like that.<br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 2, 2016 at 11:05 AM Aqs Younas &lt;<a href="mailto:aqsyounas@gmail.com">aqsyounas@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">In python, I use this. <div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">#!/usr/bin/env python</div><div class="gmail_msg"> &#39;&#39;&#39;</div><div class="gmail_msg">events.py - subscribe to all events and print them to stdout</div><div class="gmail_msg">&#39;&#39;&#39;</div><div class="gmail_msg">import ESL</div><div class="gmail_msg"> </div><div class="gmail_msg">con = ESL.ESLconnection(&#39;localhost&#39;, &#39;8021&#39;, &#39;ClueCon&#39;)</div><div class="gmail_msg"> </div><div class="gmail_msg">if con.connected:</div><div class="gmail_msg">    con.events(&#39;plain&#39;, &#39;all&#39;)</div><div class="gmail_msg">    while 1:</div><div class="gmail_msg">        e = con.recvEvent()</div><div class="gmail_msg">        if e:</div><div class="gmail_msg">            print e.serialize()</div></div></div>
_________________________________________________________________________<br class="gmail_msg">
Professional FreeSWITCH Consulting Services:<br class="gmail_msg">
<a href="mailto:consulting@freeswitch.org" class="gmail_msg" target="_blank">consulting@freeswitch.org</a><br class="gmail_msg">
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" class="gmail_msg" target="_blank">http://www.freeswitchsolutions.com</a><br class="gmail_msg">
<br class="gmail_msg">
Official FreeSWITCH Sites<br class="gmail_msg">
<a href="http://www.freeswitch.org" rel="noreferrer" class="gmail_msg" target="_blank">http://www.freeswitch.org</a><br class="gmail_msg">
<a href="http://confluence.freeswitch.org" rel="noreferrer" class="gmail_msg" target="_blank">http://confluence.freeswitch.org</a><br class="gmail_msg">
<a href="http://www.cluecon.com" rel="noreferrer" class="gmail_msg" target="_blank">http://www.cluecon.com</a><br class="gmail_msg">
<br class="gmail_msg">
FreeSWITCH-users mailing list<br class="gmail_msg">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="gmail_msg" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br class="gmail_msg">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="gmail_msg">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="gmail_msg">
<a href="http://www.freeswitch.org" rel="noreferrer" class="gmail_msg" target="_blank">http://www.freeswitch.org</a></blockquote></div>