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@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org