<div dir="ltr">Glad you were able to get this resolved, and thank you for posting the fix in the thread, this will help others in the future!<div><br></div><div>Cal</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Sep 27, 2013 at 6:06 PM, Yuriy Nasida <span dir="ltr">&lt;<a href="mailto:nasida@live.ru" target="_blank">nasida@live.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Solved.  I used incorrect method here. The correct way is to use EventConsumer.<div>Thanks a lot for &quot;big&quot; help guys...<br><div><br><div><div class="im"><hr>From: <a href="mailto:nasida@live.ru" target="_blank">nasida@live.ru</a><br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br></div>Date: Fri, 27 Sep 2013 00:50:10 +0400<br>Subject: Re: [Freeswitch-users] sending of even from external to the lua script (onInput)<div>
<div class="h5"><br><br>


<div dir="ltr">Guys, can I get some advice ?<br><br><div><hr>From: <a href="mailto:nasida@live.ru" target="_blank">nasida@live.ru</a><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
Date: Wed, 25 Sep 2013 23:36:02 +0400<br>Subject: [Freeswitch-users] sending of even from external to the lua script        (onInput)<br><br>


<div dir="ltr"><div>Hi there!</div><div><br></div><div>My lua script  has onInput function for listening of external events which I sends from other PHP script.</div><div><br></div><div><br></div><div>1) Lua </div><div>function onInput(s, type, obj)</div>
<div><span style="white-space:pre-wrap">        </span>if (type == &quot;event&quot;) then</div><div><span style="white-space:pre-wrap">        </span>freeswitch.consoleLog(&quot;warning&quot;, &quot;get_info_and_play.lua: type = &quot; .. type .. &quot;\n&quot;);</div>
<div>        ----------------</div><div>        ----------------</div><div><span style="white-space:pre-wrap">        </span>end</div><div>end</div><div>-------------------</div><div><br></div><div>2) PHP</div><div>&lt;?php</div>
<div>        require_once(&#39;ESL.php&#39;);</div><div>        $sock = new ESLconnection(&#39;MY_IP&#39;, &#39;8021&#39;, &#39;Mypass&#39;);</div><div>        $e = new ESLevent(&quot;CUSTOM&quot;,&quot;&quot;);</div><div>
        $e-&gt;addHeader(&quot;Result_od_sql_queue&quot;,&quot;1111111&quot;);</div><div>        $sock-&gt;sendEvent($e);</div><div>?&gt;</div><div><br></div><div>I would like to catch such events but can not. </div><div>
<br></div><div>I set &#39;/event plain all&#39; in fs_cli and see that event  received. But... Lua can not catch it.</div><div><br></div><div>May be I should add channel uuid of FS session to event I sent from PHP and this way lua script will able to get event?</div>
<div><br></div><div>Please advice.</div>                                               </div>
<br>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div>                                               </div>
<br>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></div></div></div></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>