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

Mathieu Rene mrene_lists at avgs.ca
Thu Feb 18 13:10:53 PST 2010


parse "sofia xmlstatus"

<profile>
<name>external</name>
<type>profile</type>
<data>sip:mod_sofia at 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 at 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 at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org 
> ] On Behalf Of Scott Fernandez
> Sent: Thursday, February 18, 2010 1:12 AM
> To: freeswitch-users at 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 at 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 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100218/43223e9c/attachment-0002.html 


More information about the FreeSWITCH-users mailing list