<div>Is there a way to start this when FreeSWITCH starts? The lua and perl modules have a 'startup-script' configuration preference. Is there something similar in mod_managed? Or is there a way to have an api command executed at a startup?</div>
<div><br></div><div><quote author="Phillip Jones"></div><div>Exactly what I was after - thank you!</div><div><br></div><div>On Thu, Sep 3, 2009 at 1:54 PM, Jeff Lenk <<a href="mailto:jlenk@frontiernet.net">jlenk@frontiernet.net</a>> wrote:</div>
<div><br></div><div>></div><div>> try something like this</div><div>></div><div>> EventConsumer con = new EventConsumer("all", "");</div><div>> Event ev = con.pop(0);</div><div>></div>
<div>> see lua sample -</div><div>> <a href="http://wiki.freeswitch.org/wiki/Lua#freeswitch.EventConsumer">http://wiki.freeswitch.org/wiki/Lua#freeswitch.EventConsumer</a></div><div>></div><div>></div><div>> Phillip Jones-2 wrote:</div>
<div>> ></div><div>> > Hi there,</div><div>> ></div><div>> > mod_managed exposes EventReceivedFunction such that:</div><div>> ></div><div>> > Session.EventReceivedFunction = (e) =></div>
<div>> > {</div><div>> > Log.WriteLine(LogLevel.Alert, "Received Event {0}", e.ToString());</div><div>> > return "";</div><div>> > };</div><div>> ></div><div>
> > should trap all events to which i subscribe.</div><div>> ></div><div>> ></div><div>> > But how do I subscribe to events? What is the .NET / managed equivalent</div><div>> > of:</div><div>
> ></div><div>> > switch_event_bind(const char *id, switch_event_types_t event, const char</div><div>> > *subclass_name, switch_event_callback_t callback, void *user_data);</div><div>> ></div><div>
> ></div><div>> ></div><div>> > Thank you!</div><div>> ></div><div>> ></div><div>> ></div>