[Freeswitch-users] FreeSWITCH, mod_managed and IApiPlugin

Michael Giagnocavo mgg at giagnocavo.net
Sun May 8 20:40:15 MSD 2011


ILoadNotificationPlugin is probably what you want, as it'll get notified that the assembly is being initialized for FS.

I think you're right about creating new ManagedSession objects, but I don't recall exactly at this moment.

-Michael

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Schenk, Oliver
Sent: Monday, May 02, 2011 10:03 PM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] FreeSWITCH, mod_managed and IApiPlugin

Hi All,

I'm completely new to FreeSWITCH, but in a week I managed to achieve quite a bit. It was quite a learning curve to say the least. This is my current setup:


-          FreeSWITCH 1.0.7 built from tarball.

-          Developing on Windows XP with VS2008 in C#.

-          Configured extension 1024 to connect to a managed dll file, which implements IAppPlugin.

-          Using X-Lite softphone I can connect to FreeSWITCH as user 1001 and dial 1024 and start going through a menu that I built in C#. It successfully retrieves records from an SQL database and so forth. No problems there.

My first step was to create a module that gets called whenever a user dials IN bound. They will hear the menu just described.


My struggle now is relating to OUT bound calls. What I want is a module that is started as soon as FreeSWITCH is started and begins executing on an endless processing loop in the background. This will continuously monitor a database and if certain conditions occur an outbound call should be queued and then made. If multiple calls need to be made I guess they will be queued and processed one by one. I can handle the queuing part.

At this stage I will be testing using extension 1001 as the receiver of the call using my softphone.


Question 1:

I've been trying to use a class that implements IApiPlugin, but how do I get it to start when FreeSWITCH starts? As I said it should simply be a never ending thread as long as FreeSWITCH is running. I can't find any information regarding how to "Execute" a managed module immediately when FreeSWITCH has started.


Question 2:

If IApiPlugin can do this, how do I get the session object? Like this?

ManagedSession session = new ManagedSession();
session.Originate(???);

I can't find any help at all on this.


Thanks very much!



Oliver Schenk


NOTICE - This e-mail and any files transmitted with it are confidential and are only for the use of the person to whom they are addressed.
If you are not the intended recipient then you have received this e-mail in error; please advise us immediately if this is the case.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of WestNet Rail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110508/83da78f6/attachment.html 


More information about the FreeSWITCH-users mailing list