[Freeswitch-users] Subscribing to events in managed C# / .NET
Josh Rivers
josh at radianttiger.com
Sun Sep 6 13:50:19 PDT 2009
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?
<quote author="Phillip Jones">
Exactly what I was after - thank you!
On Thu, Sep 3, 2009 at 1:54 PM, Jeff Lenk <jlenk at frontiernet.net> wrote:
>
> try something like this
>
> EventConsumer con = new EventConsumer("all", "");
> Event ev = con.pop(0);
>
> see lua sample -
> http://wiki.freeswitch.org/wiki/Lua#freeswitch.EventConsumer
>
>
> Phillip Jones-2 wrote:
> >
> > Hi there,
> >
> > mod_managed exposes EventReceivedFunction such that:
> >
> > Session.EventReceivedFunction = (e) =>
> > {
> > Log.WriteLine(LogLevel.Alert, "Received Event {0}",
e.ToString());
> > return "";
> > };
> >
> > should trap all events to which i subscribe.
> >
> >
> > But how do I subscribe to events? What is the .NET / managed equivalent
> > of:
> >
> > switch_event_bind(const char *id, switch_event_types_t event, const char
> > *subclass_name, switch_event_callback_t callback, void *user_data);
> >
> >
> >
> > Thank you!
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090906/ee307c76/attachment-0002.html
More information about the FreeSWITCH-users
mailing list