[Freeswitch-users] Establishing a Call from .Net based application

Diego Toro dftoro at yahoo.com
Sat Feb 13 09:05:59 PST 2010


> 1. Per the link http://wiki.freeswitch.org/wiki/Mod_managed
>  , I've enabled the Mod_managed module in the mentioned
> location in FS on CentOS 5.2.

mod_managed is supported on CentOs with Mono.


3. Do we need to include the AppDemo.class in .NET C#
> classes that we have built? If so. how do we initiate the
> call and get the status of that particular call with the
> help of AppDemo.class?. Can I have any specific code for
> this?

AppDemo is only a example about how to use mod_managed like application.

a. You should implement IAppPlugin interface so FreeSwitch brings call control to your C# class through mod_managed.

Simple Example:

using FreeSWITCH;
using FreeSWITCH.Native;

namespace BITS.Ivr.Bp.Server 
{
 public class CIV_BPFSProcess : FreeSWITCH.IAppPlugin
{
  public void Run(AppContext context)
  {
   //answer call
   context.Session.Answer();
   //sleep 2 seconds
   context.Session.sleep(2000, 1);
   //hangup call
   context.Session.Hangup("NORMAL_CLEARING");
  }
 }
}

b. Add next extension to a dialplan

<include>
  <extension name="test">
    <condition field="destination_number" expression="^445(\d+)$" >
    <action application="managed" data="CCU_BPFSProcess"/>
 </condition>	
  </extension>
</include>

c. Call for example to 445100 from a softphone


Diego Toro 
http://lacarretade.blogspot.com/


--- On Sat, 2/13/10, Scott Fernandez <scottferri09 at gmail.com> wrote:

> From: Scott Fernandez <scottferri09 at gmail.com>
> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application
> To: freeswitch-users at lists.freeswitch.org
> Date: Saturday, February 13, 2010, 10:52 AM
> Hi,
> 
> I've done the following things in order for my .NET
> application to talk to FS.
> 
> 1. Per the link http://wiki.freeswitch.org/wiki/Mod_managed
>  , I've enabled the Mod_managed module in the mentioned
> location in FS on CentOS 5.2.
> 
> 2. There is a configuration settings required to Map the
> "DLL" to ".so" object in CentOS.
> Now, the question is which DLL and .so file to be made
> available and where?
> 
> 
> 3. Do we need to include the AppDemo.class in .NET C#
> classes that we have built? If so. how do we initiate the
> call and get the status of that particular call with the
> help of AppDemo.class?. Can I have any specific code for
> this?
> 
> 
> All I need is to initiate a call from .NET application and
> then it should talk to mod_managed module and establish a
> call. Secondly, I need to know the status of the call such
> as Ringing, Active, Hangup etc. 
> 
> How do we achieve this with mod_managed?. Any sample coding
> that we can get for this scenario?
> 
> 
> Thanks for your help as always :)
> 
> Regards,
> Scott
> 
> 
> On Mon, Feb 1, 2010 at 9:07 PM,
> Phillip Jones <pjintheusa at gmail.com>
> wrote:
> 
> As mentioned http://wiki.freeswitch.org/wiki/Mod_managed
> should give you every thing you need to get mod_managed set
> up. 
> 
> 
> Then in the source take a look at demo.csx and
> particularity AppDemo class.
> 
> 
> That should get you started.
> 
> 
> On Sun, Jan 31, 2010 at 8:45 AM,
> Scott Fernandez <scottferri09 at gmail.com>
> wrote:
> 
> 
> Hi,
>  
> Thx for the information. Can I have some detailed
> steps to configure mod_managed class call control and how do
> we write the API commands in .Net applications?
>  
> In addition, how do we get the current STATE of the
> call when I use webapi?. Because it is required for me to
> route the call to the user upon it is answered or
> disconnect  it.
>  
> Thanks,
> Scott
> 
> 
> On Wed, Jan 20, 2010 at 8:47 PM,
> Diego Toro <dftoro at yahoo.com>
> wrote:
> 
> Hi, the answer is yes, you can to
> use mod_managed wich offer C# managed class to call control
> http://wiki.freeswitch.org/wiki/Mod_managed.
> Or using managed ESL (libs/esl/managed) which offer C#
> managed class to receive and send events and commands to
> FreeSwitch.
> 
> 
> 
> 
> Diego Toro
> http://lacarretade.blogspot.com/
> 
> 
> --- On Wed, 1/20/10, Scott Fernandez <scottferri09 at gmail.com>
> wrote:
> 
> 
> 
> 
> > From: Scott Fernandez <scottferri09 at gmail.com>
> 
> > Subject: Re: [Freeswitch-users] Establishing a
> Call from .Net based application
> > To: freeswitch-users at lists.freeswitch.org
> 
> 
> > Date: Wednesday, January 20, 2010, 2:17 AM
> 
> 
> 
> 
> > Thanks Dome. Will try it out and get back to
> > you if I come across any issues.
> >
> > Regards,
> > Scott.
> >
> > On Wed, Jan 20, 2010 at 11:02 AM,
> > Dome Charoenyost <dome at tel.co.th>
> 
> 
> 
> > wrote:
> >
> > Please try http://wiki.freeswitch.org/wiki/Webapi
> >
> >
> > you can create class and map to webapi.
> >
> 
> 
> 
> >
> >
> > Dome C.
> >
> >
> >
> > 2010/1/19 Scott Fernandez <scottferri09 at gmail.com>:
> >
> > > Hi,
> >
> > >
> 
> 
> >
> > > Is there any API modules available for me to
> initiate
> 
> > a call from .Net based
> >
> > > application?.
> >
> > >
> >
> > > The idea is to include the API modules if any
> with the
> > .NET base classes so
> >
> > > that the API commands will be made available on
> it. I
> 
> 
> 
> > know it is doable when
> >
> > > I use socket programming in .NET in which Telnet
> > session is created.
> >
> > > However, this would potentially hamper the
> performance
> > of the application
> 
> 
> 
> >
> > > because of multiple sessions that will be created
> for
> > each call.
> >
> > >
> >
> > > Other than that, Is there any Freeswitch API
> modules
> > (like plug-ins)
> >
> 
> 
> 
> > > available in order to include it into the .Net
> classes
> > and start building
> >
> > > the customized application?
> >
> > >
> >
> > > Any help from any one is highly appreciated.
> 
> 
> 
> >
> > >
> >
> > > Thanks,
> >
> > > Scott
> >
> > >
> >
> > >
> > _______________________________________________
> >
> > > FreeSWITCH-users mailing list
> 
> 
> 
> >
> > > FreeSWITCH-users at lists.freeswitch.org
> >
> > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> 
> 
> 
> >
> > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> >
> > > http://www.freeswitch.org
> 
> 
> 
> >
> > >
> >
> > >
> >
> >
> >
> > _______________________________________________
> >
> > FreeSWITCH-users mailing list
> >
> > FreeSWITCH-users at lists.freeswitch.org
> 
> 
> 
> >
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> 
> 
> 
> >
> > http://www.freeswitch.org
> >
> >
> >
> >
> > -----Inline Attachment Follows-----
> 
> 
> 
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> 
> 
> 
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> 
> 
> 
> > http://www.freeswitch.org
> >
> 
> 
> 
> 
> 
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> 
> 
> 
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> 
> 
> 
> http://www.freeswitch.org
> 
> 
> 
> _______________________________________________
> 
> FreeSWITCH-users mailing list
> 
> FreeSWITCH-users at lists.freeswitch.org
> 
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> 
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> 
> http://www.freeswitch.org
> 
> 
> 
> 
> 
> _______________________________________________
> 
> FreeSWITCH-users mailing list
> 
> FreeSWITCH-users at lists.freeswitch.org
> 
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> 
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> 
> http://www.freeswitch.org
> 
> 
> 
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 


      




More information about the FreeSWITCH-users mailing list