Sort of silly?,<br><br>I am not sure what you are talking about.<br>I<br>t&#39;s called *event*Consumer right? what do you mean by event based?<br><br>There is no need to create a session?<br><br>con = freeswitch.EventConsumer(&quot;all&quot;);<br>
<br>now you have a consumer obj<br><br>every time you call con:pop() with no arg you will either get an event or nil when there are no events to consume.<br>every time you call con:pop(1) the consumer object will block until there is an event.<br>
<br>So you use the first way in conjunction with some other lock to do async or the 2nd way you do a dedicated blocking loop.<br><br>I don&#39;t know what you said in #lua but, umm duhhhh I think we have an event driven programming under control.....<br>
We have a dedicated eventing engine in the core with scaling backend dispatcher threads that can handle hundereds of thousand<br>of events at a time.<br><br>There is also Event Socket (the word *event* again) that can connect to tcp and listen for *events*<br>
<br>you can also write your code in C with the trivial module API that allows you to bind to an event internally and pretty much do whatever you want.<br><br><br><br><div class="gmail_quote">2009/3/27 Matthew Fong <span dir="ltr">&lt;<a href="mailto:mattdfong@gmail.com">mattdfong@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;ve been playing around with using freeswitch.EventConsumer in a lua process that starts-up when FS boots, and stays in the background. I&#39;ve setup the example on the wiki, but the example uses session:execute(&quot;sleep&quot;,1000), and essentially loops every second until an event is fired. I&#39;m wondering if there is a more event-driven way to accomplish this?<div>

<br></div><div>I tried asking for help in #lua, but they said the project (FS) needed to implement event-driven programming for this to work. To me, it seems sort of silly to implement freeswitch.EventConsumer without a way for it to be executed event-wise</div>

<div><br></div><div>Is using lua ESL the only option? There isn&#39;t any lua example scripts in libs/esl/lua to demonstrate how to handle events.</div><div><br></div><div>if mod_lua can&#39;t handle events, can the mod_javascript utilize it? Thanks.</div>

<div><br></div><div>--matt</div>
<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><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>