Thanks a lot Deigo and Michael.<br><br>Will work on this and let you know if I face any problems.<br><br>Thanks,<br>Scott<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 5:04 AM, Diego Toro <span dir="ltr"><<a href="mailto:dftoro@yahoo.com">dftoro@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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.<br>
<br>
Being more clear, when you use mod_managed including <action application="managed" data="yourclassname"/><br>
in a dialplan already have way to run your C# code.<br>
<br>
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.<br>
<div class="im"><br>
Diego Toro<br>
<a href="http://lacarretade.blogspot.com/" target="_blank">http://lacarretade.blogspot.com/</a><br>
<br>
<br>
</div>--- On Thu, 2/18/10, Michael Giagnocavo <<a href="mailto:mgg@giagnocavo.net">mgg@giagnocavo.net</a>> wrote:<br>
<br>
> From: Michael Giagnocavo <<a href="mailto:mgg@giagnocavo.net">mgg@giagnocavo.net</a>><br>
<div class="im">> Subject: Re: [Freeswitch-users] Establishing a Call from .Net based application<br>
</div>> To: "<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>" <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
> Date: Thursday, February 18, 2010, 6:12 AM<br>
<div><div></div><div class="h5">> I’m not sure what the<br>
> FreeSWITCH APIs are to figure out what IP Sofia SIP has<br>
> bound to. Whatever it is, you’d call the same thing in<br>
> C#. What do you want to do with the API? mod_managed.dll or .so is the<br>
> FreeSWITCH native code module that loads the CLR or Mono<br>
> into the FreeSWITCH process and loads<br>
> FreeSWITCH.Managed.dll. The managed DLL contains the bulk of<br>
> the managed-unmanaged interop code (.NET definitions of all<br>
> the FS C functions). -Michael From:<br>
> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On<br>
> Behalf Of Scott Fernandez<br>
> Sent: Thursday, February 18, 2010 1:12 AM<br>
> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
> Subject: Re: [Freeswitch-users] Establishing a Call<br>
> from .Net based application<br>
> Hi Diego & Michael,<br>
><br>
> Thanks for your reply and support.<br>
><br>
> However, I have some clarifications required from both of<br>
> you.<br>
><br>
> 1. Here is the question for Diego,<br>
><br>
> Simple Example:<br>
><br>
> using FreeSWITCH;<br>
> using FreeSWITCH.Native;<br>
><br>
> namespace BITS.Ivr.Bp.Server<br>
> {<br>
> public class CIV_BPFSProcess : FreeSWITCH.IAppPlugin<br>
> {<br>
> public void Run(AppContext context)<br>
> {<br>
> //answer call<br>
> context.Session.Answer();<br>
> //sleep 2 seconds<br>
> context.Session.sleep(2000, 1);<br>
> //hangup call<br>
> context.Session.Hangup("NORMAL_CLEARING");<br>
> }<br>
> }<br>
> }<br>
> I understand that the concept of your example code.<br>
> However, would like to know as to how would my .NET C# know the<br>
> IP address of Freeswitch to talk to it as there is no<br>
> indication for that?. If not here, where would we need to<br>
> reference the IP address of FS in .NET code?<br>
><br>
> I guess the IP address of FS needs to be mentioned in the<br>
> Target section of the below web.config file in .NET. If I am<br>
> right, how to specify the IP address over here. If I am<br>
> wrong, please let me know where do we need to mention the IP<br>
> address of FS.<br>
><br>
> <configuration><br>
> <br>
> <dllmap dll="mod_managed.dll"<br>
> target="mod_managed.so"/><br>
> </configuration><br>
><br>
><br>
> 2. Here is the question for Michael,<br>
><br>
> You mentioned that "mod_managed.so will<br>
> be in your freeswitch mod directory". This is<br>
> very clear and what is mod_managed.dll in my .NET<br>
> application and the purpose of it?<br>
><br>
> Thanks for all your help.<br>
><br>
> Regards,<br>
> Scott.<br>
><br>
><br>
> On Sun, Feb 14, 2010 at 1:15<br>
> AM, Michael Giagnocavo <<a href="mailto:mgg@giagnocavo.net">mgg@giagnocavo.net</a>><br>
> wrote:<br>
> 2. There is a configuration settings required to Map the<br>
> "DLL" to ".so" object in CentOS.<br>
> Now, the question is which DLL and .so file to be made<br>
> available and where?“If you are<br>
> experiencing NullReferenceExceptions with any plugin run<br>
> through the dialplan, make sure you have included the<br>
> appropriate entry in your dllmap<br>
> configuration: <dllmap dll="mod_managed.dll"<br>
> target="mod_managed.so"<br>
> os="!windows"/>“mod_managed.so will<br>
> be in your freeswitch mod directory.<br>
> All I need is to initiate a call from .NET application and<br>
> then it should talk to mod_managed module and establish a<br>
> call. Secondly, I need to know the status of the call such<br>
> as Ringing, Active, Hangup etc. To initiate a<br>
> call, try ManagedSession.Originate.-Michael<br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a> <br>
</div></div>> -----Inline Attachment Follows-----<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>