Re: [Freeswitch-users] Establishing a Call from .Net based application
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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
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@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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
api would not have a call associated with it at all. On Jan 31, 2010, at 8:45 AM, Scott Fernandez 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.
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@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@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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
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@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@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@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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@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@gmail.com> wrote:
From: Scott Fernandez <scottferri09@gmail.com>
Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: freeswitch-users@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
-----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
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? " If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap<http://mono-project.com/Config_DllMap> configuration: <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/> " mod_managed.so will be in your freeswitch mod directory. 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. To initiate a call, try ManagedSession.Originate. -Michael
Hi Diego & Michael, Thanks for your reply and support. However, I have some clarifications required from both of you. 1. Here is the question for Diego, 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"); } } } I understand that the concept of your example code. However, would like to know as to how would my .NET C# know the IP address of Freeswitch to talk to it as there is no indication for that?. If not here, where would we need to reference the IP address of FS in .NET code? I guess the IP address of FS needs to be mentioned in the Target section of the below web.config file in .NET. If I am right, how to specify the IP address over here. If I am wrong, please let me know where do we need to mention the IP address of FS. <configuration> <dllmap dll="mod_managed.dll" target="mod_managed.so"/> </configuration> 2. Here is the question for Michael, You mentioned that "mod_managed.so will be in your freeswitch mod directory". This is very clear and what is mod_managed.dll in my .NET application and the purpose of it? Thanks for all your help. Regards, Scott. On Sun, Feb 14, 2010 at 1:15 AM, Michael Giagnocavo <mgg@giagnocavo.net>wrote:
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?
“
If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap <http://mono-project.com/Config_DllMap> configuration:
<dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/>
“
mod_managed.so will be in your freeswitch mod directory.
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.
To initiate a call, try ManagedSession.Originate.
-Michael
_______________________________________________ FreeSWITCH-users mailing list 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
I'm not sure what the FreeSWITCH APIs are to figure out what IP Sofia SIP has bound to. Whatever it is, you'd call the same thing in C#. What do you want to do with the API? mod_managed.dll or .so is the FreeSWITCH native code module that loads the CLR or Mono into the FreeSWITCH process and loads FreeSWITCH.Managed.dll. The managed DLL contains the bulk of the managed-unmanaged interop code (.NET definitions of all the FS C functions). -Michael From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Scott Fernandez Sent: Thursday, February 18, 2010 1:12 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application Hi Diego & Michael, Thanks for your reply and support. However, I have some clarifications required from both of you. 1. Here is the question for Diego, 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"); } } } I understand that the concept of your example code. However, would like to know as to how would my .NET C# know the IP address of Freeswitch to talk to it as there is no indication for that?. If not here, where would we need to reference the IP address of FS in .NET code? I guess the IP address of FS needs to be mentioned in the Target section of the below web.config file in .NET. If I am right, how to specify the IP address over here. If I am wrong, please let me know where do we need to mention the IP address of FS. <configuration> <dllmap dll="mod_managed.dll" target="mod_managed.so"/> </configuration> 2. Here is the question for Michael, You mentioned that "mod_managed.so will be in your freeswitch mod directory". This is very clear and what is mod_managed.dll in my .NET application and the purpose of it? Thanks for all your help. Regards, Scott. On Sun, Feb 14, 2010 at 1:15 AM, Michael Giagnocavo <mgg@giagnocavo.net<mailto:mgg@giagnocavo.net>> wrote: 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? " If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap<http://mono-project.com/Config_DllMap> configuration: <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/> " mod_managed.so will be in your freeswitch mod directory. 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. To initiate a call, try ManagedSession.Originate. -Michael _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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
parse "sofia xmlstatus" <profile> <name>external</name> <type>profile</type> <data>sip:mod_sofia@192.168.0.9:5080</data> <state>RUNNING (0)</state> </profile> Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca On 18-Feb-10, at 6:12 AM, Michael Giagnocavo wrote:
I’m not sure what the FreeSWITCH APIs are to figure out what IP Sofia SIP has bound to. Whatever it is, you’d call the same thing in C#. What do you want to do with the API?
mod_managed.dll or .so is the FreeSWITCH native code module that loads the CLR or Mono into the FreeSWITCH process and loads FreeSWITCH.Managed.dll. The managed DLL contains the bulk of the managed-unmanaged interop code (.NET definitions of all the FS C functions).
-Michael
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org ] On Behalf Of Scott Fernandez Sent: Thursday, February 18, 2010 1:12 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application
Hi Diego & Michael,
Thanks for your reply and support.
However, I have some clarifications required from both of you.
1. Here is the question for Diego,
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"); } } }
I understand that the concept of your example code. However, would like to know as to how would my .NET C# know the IP address of Freeswitch to talk to it as there is no indication for that?. If not here, where would we need to reference the IP address of FS in .NET code?
I guess the IP address of FS needs to be mentioned in the Target section of the below web.config file in .NET. If I am right, how to specify the IP address over here. If I am wrong, please let me know where do we need to mention the IP address of FS.
<configuration> <dllmap dll="mod_managed.dll" target="mod_managed.so"/> </configuration>
2. Here is the question for Michael,
You mentioned that "mod_managed.so will be in your freeswitch mod directory". This is very clear and what is mod_managed.dll in my .NET application and the purpose of it?
Thanks for all your help.
Regards, Scott.
On Sun, Feb 14, 2010 at 1:15 AM, Michael Giagnocavo <mgg@giagnocavo.net
wrote:
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?
“ If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap configuration: <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/> “
mod_managed.so will be in your freeswitch mod directory.
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.
To initiate a call, try ManagedSession.Originate. -Michael
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
The managed module is loaded as a module during the startup of FreeSWITCH if set in modules.conf.xml or through the command "load mod_managed" must keep in mind that there is a directory "mod/managed. As mod_managed is loaded into FreeSWITCH process to take control of the call must be running FreeSWITCH. So to "talk" with FreeSWITCH is not necessary to know the IP, the IP depends on the profile you've defined in the configuration of the module sofia. If you need the local address of the box running FreeSWITCH try expand variable $${local_ip_v4} which is assigned automatically by FreeSWITCH. Being more clear, when you use mod_managed including <action application="managed" data="yourclassname"/> in a dialplan already have way to run your C# code. Now, if you need is to have control of the call to answer, originate, etc, without the application run inside FreeSWITCH process, you can use managed ESL (see examples in libs/esl/managed) this library allows your code using events "talk" with FreeSWITCH. Diego Toro http://lacarretade.blogspot.com/ --- On Thu, 2/18/10, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
From: Michael Giagnocavo <mgg@giagnocavo.net> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org> Date: Thursday, February 18, 2010, 6:12 AM I’m not sure what the FreeSWITCH APIs are to figure out what IP Sofia SIP has bound to. Whatever it is, you’d call the same thing in C#. What do you want to do with the API? mod_managed.dll or .so is the FreeSWITCH native code module that loads the CLR or Mono into the FreeSWITCH process and loads FreeSWITCH.Managed.dll. The managed DLL contains the bulk of the managed-unmanaged interop code (.NET definitions of all the FS C functions). -Michael From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Scott Fernandez Sent: Thursday, February 18, 2010 1:12 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application Hi Diego & Michael,
Thanks for your reply and support.
However, I have some clarifications required from both of you.
1. Here is the question for Diego,
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"); } } } I understand that the concept of your example code. However, would like to know as to how would my .NET C# know the IP address of Freeswitch to talk to it as there is no indication for that?. If not here, where would we need to reference the IP address of FS in .NET code?
I guess the IP address of FS needs to be mentioned in the Target section of the below web.config file in .NET. If I am right, how to specify the IP address over here. If I am wrong, please let me know where do we need to mention the IP address of FS.
<configuration> <dllmap dll="mod_managed.dll" target="mod_managed.so"/> </configuration>
2. Here is the question for Michael,
You mentioned that "mod_managed.so will be in your freeswitch mod directory". This is very clear and what is mod_managed.dll in my .NET application and the purpose of it?
Thanks for all your help.
Regards, Scott.
On Sun, Feb 14, 2010 at 1:15 AM, Michael Giagnocavo <mgg@giagnocavo.net> wrote: 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?“If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap configuration: <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/>“mod_managed.so will be in your freeswitch mod directory. 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. To initiate a call, try ManagedSession.Originate.-Michael _______________________________________________ FreeSWITCH-users mailing list 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 -----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
Thanks a lot Deigo and Michael. Will work on this and let you know if I face any problems. Thanks, Scott On Fri, Feb 19, 2010 at 5:04 AM, Diego Toro <dftoro@yahoo.com> wrote:
The managed module is loaded as a module during the startup of FreeSWITCH if set in modules.conf.xml or through the command "load mod_managed" must keep in mind that there is a directory "mod/managed. As mod_managed is loaded into FreeSWITCH process to take control of the call must be running FreeSWITCH. So to "talk" with FreeSWITCH is not necessary to know the IP, the IP depends on the profile you've defined in the configuration of the module sofia. If you need the local address of the box running FreeSWITCH try expand variable $${local_ip_v4} which is assigned automatically by FreeSWITCH.
Being more clear, when you use mod_managed including <action application="managed" data="yourclassname"/> in a dialplan already have way to run your C# code.
Now, if you need is to have control of the call to answer, originate, etc, without the application run inside FreeSWITCH process, you can use managed ESL (see examples in libs/esl/managed) this library allows your code using events "talk" with FreeSWITCH.
Diego Toro http://lacarretade.blogspot.com/
--- On Thu, 2/18/10, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
From: Michael Giagnocavo <mgg@giagnocavo.net> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application To: "freeswitch-users@lists.freeswitch.org" < freeswitch-users@lists.freeswitch.org> Date: Thursday, February 18, 2010, 6:12 AM I’m not sure what the FreeSWITCH APIs are to figure out what IP Sofia SIP has bound to. Whatever it is, you’d call the same thing in C#. What do you want to do with the API? mod_managed.dll or .so is the FreeSWITCH native code module that loads the CLR or Mono into the FreeSWITCH process and loads FreeSWITCH.Managed.dll. The managed DLL contains the bulk of the managed-unmanaged interop code (.NET definitions of all the FS C functions). -Michael From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Scott Fernandez Sent: Thursday, February 18, 2010 1:12 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application Hi Diego & Michael,
Thanks for your reply and support.
However, I have some clarifications required from both of you.
1. Here is the question for Diego,
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"); } } } I understand that the concept of your example code. However, would like to know as to how would my .NET C# know the IP address of Freeswitch to talk to it as there is no indication for that?. If not here, where would we need to reference the IP address of FS in .NET code?
I guess the IP address of FS needs to be mentioned in the Target section of the below web.config file in .NET. If I am right, how to specify the IP address over here. If I am wrong, please let me know where do we need to mention the IP address of FS.
<configuration>
<dllmap dll="mod_managed.dll" target="mod_managed.so"/> </configuration>
2. Here is the question for Michael,
You mentioned that "mod_managed.so will be in your freeswitch mod directory". This is very clear and what is mod_managed.dll in my .NET application and the purpose of it?
Thanks for all your help.
Regards, Scott.
On Sun, Feb 14, 2010 at 1:15 AM, Michael Giagnocavo <mgg@giagnocavo.net> wrote: 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?“If you are experiencing NullReferenceExceptions with any plugin run through the dialplan, make sure you have included the appropriate entry in your dllmap configuration: <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/>“mod_managed.so will be in your freeswitch mod directory. 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. To initiate a call, try ManagedSession.Originate.-Michael _______________________________________________ FreeSWITCH-users mailing list 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 -----Inline Attachment Follows-----
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
participants (6)
-
Diego Toro
-
Mathieu Rene
-
Michael Giagnocavo
-
Michael Jerris
-
Phillip Jones
-
Scott Fernandez