[Freeswitch-users] Subscribing to events in managed C# / .NET

Michael Giagnocavo mgg at giagnocavo.net
Thu Sep 3 08:05:14 PDT 2009


You can call switch_event_bind directly, but I doubt that'll achieve what you want.

My guess is that it works the same as LUA or any of the other plugins - whatever higher level API is exposed for setting up events should make things just work.

-Michael

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Phillip Jones
Sent: Thursday, September 03, 2009 8:27 AM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Subscribing to events in managed C# / .NET

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!



Phillip Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090903/22ee5a7c/attachment-0002.html 


More information about the FreeSWITCH-users mailing list