[Freeswitch-users] sending of even from external to the lua script (onInput)
Cal Leeming [Simplicity Media Ltd]
cal.leeming at simplicitymedialtd.co.uk
Mon Sep 30 12:06:31 MSD 2013
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!
Cal
On Fri, Sep 27, 2013 at 6:06 PM, Yuriy Nasida <nasida at live.ru> wrote:
> Solved. I used incorrect method here. The correct way is to
> use EventConsumer.
> Thanks a lot for "big" help guys...
>
> ------------------------------
> From: nasida at live.ru
> To: freeswitch-users at lists.freeswitch.org
> Date: Fri, 27 Sep 2013 00:50:10 +0400
> Subject: Re: [Freeswitch-users] sending of even from external to the lua
> script (onInput)
>
>
> Guys, can I get some advice ?
>
> ------------------------------
> From: nasida at live.ru
> To: freeswitch-users at lists.freeswitch.org
> Date: Wed, 25 Sep 2013 23:36:02 +0400
> Subject: [Freeswitch-users] sending of even from external to the lua
> script (onInput)
>
> Hi there!
>
> My lua script has onInput function for listening of external events which
> I sends from other PHP script.
>
>
> 1) Lua
> function onInput(s, type, obj)
> if (type == "event") then
> freeswitch.consoleLog("warning", "get_info_and_play.lua: type = " .. type
> .. "\n");
> ----------------
> ----------------
> end
> end
> -------------------
>
> 2) PHP
> <?php
> require_once('ESL.php');
> $sock = new ESLconnection('MY_IP', '8021', 'Mypass');
> $e = new ESLevent("CUSTOM","");
> $e->addHeader("Result_od_sql_queue","1111111");
> $sock->sendEvent($e);
> ?>
>
> I would like to catch such events but can not.
>
> I set '/event plain all' in fs_cli and see that event received. But...
> Lua can not catch it.
>
> 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?
>
> Please advice.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: consulting at freeswitch.org
> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel
> Communication Server Official FreeSWITCH Sites
> http://www.freeswitch.org http://wiki.freeswitch.org
> http://www.cluecon.com FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: consulting at freeswitch.org
> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel
> Communication Server Official FreeSWITCH Sites
> http://www.freeswitch.org http://wiki.freeswitch.org
> http://www.cluecon.com FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130930/291b6e3c/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list