VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
josh at radianttiger.com Guest
|
Posted: Tue Sep 08, 2009 12:47 am Post subject: [Freeswitch-users] Using mod_managed to create full FreeSWIT |
|
|
The wiki says:
mod_managed exposes nearly the entire FreeSWITCH C API (courtesy of SWIG). This allows creation of not just API functions and call apps, but any type of module that FreeSWITCH supports (codecs, endpoints, etc.). The types are in the FreeSWITCH.Native namespace. FreeSWITCH.Native. The FreeSWITCH.Native.freeswitch type contains static members to access all the functions.
Does anybody have a starting point they can share for a non-API/APP managed module. I'd like to build something that runs in the SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION lifecycle. How can this be done?
Thanks!
Josh |
|
Back to top |
|
|
raffaele.p.guidi at gm... Guest
|
Posted: Tue Sep 08, 2009 1:05 am Post subject: [Freeswitch-users] Using mod_managed to create full FreeSWIT |
|
|
I suppose you are working in windows with the binary distribution (that doesn't contain the mod_managed binaries, sources and examples. A bit weird, I think). You can get them from here http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_managed. The package contains a Demo.csx file featuring three examples: api, app and load notification plugin - very simple to understand and that will be easy to extend. Once mod_managed is installed you can put that file into the "managed" dir and will be automatically deployed. The csx (wich is csharp script) can also be compiled into an exe file and will work the same way.
Regards,
Raffaele
On Tue, Sep 8, 2009 at 07:41, Josh Rivers <josh@radianttiger.com (josh@radianttiger.com)> wrote:
|
|
Back to top |
|
|
josh at radianttiger.com Guest
|
Posted: Tue Sep 08, 2009 1:33 am Post subject: [Freeswitch-users] Using mod_managed to create full FreeSWIT |
|
|
Thanks for the response Raffaele,
I've successfully gotten the plugins to work. What I'm looking for is a way to write a lower-level FreeSWITCH module, as is implied by the wiki document. Mostly I'm trying to get something that runs stably in it's own thread from switch startup.
Josh
On Mon, Sep 7, 2009 at 11:00 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
|
|
Back to top |
|
|
josh at radianttiger.com Guest
|
Posted: Wed Sep 09, 2009 12:36 am Post subject: [Freeswitch-users] Using mod_managed to create full FreeSWIT |
|
|
Thanks. I can stop trying to figure out how to do that then. -Josh
On Tue, Sep 8, 2009 at 5:12 AM, Michael Giagnocavo <mgg@giagnocavo.net (mgg@giagnocavo.net)> wrote:
Quote: |
Are you looking to run when mod_managed shuts down? Or when your managed plugin reloads, or something else? (mod_managed is not unloadable, so I don’t believe it gets any notification of shutting down.)
As far as interop in general, it’s usually possible. However, a lot of the FreeSWITCH code uses macros, and they aren’t available via SWIG. So in those cases, you’ll either need to manually reconstruct the macro, or write some interop code in C/C++ to do what you want, then expose that via SWIG (or, if you do it nicely, just P/Invoke it directly).
Some of the native code generates some pretty ugly structures; you will probably need to become friends with the Marshal class and pass around a lot of IntPtrs to get things going.
As far as I know, no one has built a non API/App with mod_managed.
-Michael
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Josh Rivers
Sent: Monday, September 07, 2009 11:41 PM
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: [Freeswitch-users] Using mod_managed to create full FreeSWITCH modules
The wiki says:
mod_managed exposes nearly the entire FreeSWITCH C API (courtesy of SWIG). This allows creation of not just API functions and call apps, but any type of module that FreeSWITCH supports (codecs, endpoints, etc.). The types are in the FreeSWITCH.Native namespace. FreeSWITCH.Native. The FreeSWITCH.Native.freeswitch type contains static members to access all the functions.
Does anybody have a starting point they can share for a non-API/APP managed module. I'd like to build something that runs in the SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION/SWITCH_MODULE_SHUTDOWN_FUNCTION lifecycle. How can this be done?
Thanks!
Josh
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|