<div dir="ltr">Thanks Dave,<div>Regarding the EventConsumer, should I actively poll for incoming events in a loop, using the 'pop' method, or is there a way to set up a callback routine?</div><div><br></div><div>R</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 20, 2013 at 2:54 AM, Dave R. Kompel <span dir="ltr"><<a href="mailto:drk@drkngs.net" target="_blank">drk@drkngs.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<div>In order for mod_managed to actually load your module you have to implment at least one of those classes. The most simple is to implmement IApiPlugin and make a shutdown API so you can unload your module.</div>
<div> </div>
<div>Also implement ILoadPluginNotify, which will add a "Load" method to the class. That will get called as soon as your module is loaded. From there you can start a thread to new up an EventConsumer, and process events. Make sure you return true from the load method, so the module stays loaded.</div>
<div> </div>
<div>--Dave</div><br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px">
<hr>
<b>From:</b> Rafal Gwizdala [mailto:<a href="mailto:rafal.gwizdala@gmail.com" target="_blank">rafal.gwizdala@gmail.com</a>]<br><b>To:</b> FreeSWITCH Users Help [mailto:<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>]<br>
<b>Sent:</b> Thu, 19 Sep 2013 13:10:59 -0700<br><b>Subject:</b> [Freeswitch-users] mod_managed - beginner's question about an event listener module<div class="im"><br><br>
<div>I've looked at mod_managed documentation and can see how to write an API command or a dialplan application, but could you give me a hint how to implement an automatically starting 'background' service that will listen to FS events? The module should start automatically at FS startup and should react to conference-related events. I've looked through Dave Kompel's examples but didn't find such example (or didin't understand the code well enough)
<div>Thanks</div>
<div>RG</div></div></div></blockquote>
<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>