[Freeswitch-users] Getting started on dev
James Martelletti
james at nerdc0re.com
Thu Aug 31 06:34:43 PDT 2006
Shawn,
Definitely, I hope to create a community within the community
surrounding the .NET components. I was always holding out doing this
project with asterisk because of the weekly instability and changes
they go through, then Freeswitch came about, it was perfect and I ran
with it.
Many people are excited about this module and I can understand why,
so over this weekend I'll try my best to put aside some time and
write up some tutorials about what's been done, and what needs to be
done. I will definitely be looking for help as this will be a pretty
extensive project, requiring it's own documentation, tutorials and
the like. The good thing though is that it's dead simple to create
modules, below is a working example of a module (a port of the record
function in mod_playback using some older ivr functions). Bear in
mind that this is bytecode compatible, I currently build the stuff
I'm working on using Visual Studio (also compiles with gmcs) and
execute in Mono on Linux.
using System;
using System.Text;
using Freeswitch;
using Freeswitch.Modules;
using Freeswitch.Types;
namespace Record
{
public class Record : Module
{
public Record()
{
AddApplicationInterface(new RecordApplication());
Register();
}
}
public class RecordApplication : Application
{
public RecordApplication()
{
Name = "dotnetrecord";
Syntax = "dotnetrecord /file/name";
ShortDescription = "short description";
LongDescription = "long description, long description,
long description";
ApplicationFunction = new ApplicationFunction
(RecordApplicationFunction);
}
public Status OnDtmf(CoreSession session, string input,
InputType inputType, string buffer, int bufferLength)
{
if (inputType == InputType.INPUT_TYPE_DTMF)
{
string dtmf = input;
Console.WriteLine("Digit {0}", dtmf);
if (dtmf.Contains("*"))
{
return Status.False;
}
}
return Status.Success;
}
public void RecordApplicationFunction(CoreSession
coreSession, string data)
{
if (Ivr.RecordFile(coreSession, null, data, new
InputCallbackFunction(OnDtmf)) != Status.Success)
{
coreSession.Channel.PerformHangup();
}
}
}
}
On 31/08/2006, at 10:56 PM, Shawn Lewis wrote:
> Guys I think this terrific !!!
>
> If in fact .NET functionality/MONO will exist, there is MUCH for us
> to be able to help/provide to this group.
>
>
>
>
> ---------------------------------------------------------------------
>
> Shawn Lewis
> slewis at caerus.net
> Chief Technology Officer
> VoIP, Inc www.voipinc.com
> Phone: (407) 389-3232
> Fax: (407) 215-5410
>
> -----Original Message-----
> From: James Martelletti [mailto:james at nerdc0re.com]
> Sent: Thursday, August 31, 2006 8:33 AM
> To: freeswitch-users at lists.freeswitch.org
> Subject: Re: [Freeswitch-users] Getting started on dev
>
> Van,
>
> Modules that are written in .NET will have full access to the .NET
> framework, and the features therein, so that means ASP.NET, SOAP,
> ADO, or can use other existing libraries like NHibernate, etc and
> also marshals data between the unmanaged Freeswitch process and the
> managed module. What this means is that Freeswitch modules written
> in .NET will have the full capability of their C/C++ counterparts.
>
> My branch has been synced with trunk as of a couple of weeks ago, but
> once checked out you may use the svnmerge tool and run "svnmerge
> merge" to update to trunk. There are Makefiles in both src/dotnet/
> and in the src/mod/dotnet/ projects, you will need to create these
> assemblies manually, as well as adding "languages/mod_mono" to
> modules.conf when you build. You will also need mono installed as the
> build system does not take care of this yet.
>
> Thanks,
>
> James
>
> On 31/08/2006, at 10:08 PM, Van Hui wrote:
>
>>
>> Dear James
>>
>> It is a very encouraging news. I also like to know if
>> SOAP & ASP.NET are/or will be inside the mod_mono as I
>> plan to do some developments. Please advise me. By
>> the way, inside your branches/james, does the sources
>> are up today's if I svn it.
>>
>> Best regards/Van
>>
>> --- James Martelletti <james at nerdc0re.com> wrote:
>>
>>> Martin,
>>>
>>> As for the general programming references, well you
>>> can find them
>>> anywhere through a search engine. As for docs
>>> related specifically to
>>> freeswitch, it's worth checking out
>>> http://www.freeswitch.org/docs/
>>>
>>> You will be happy to know that I have been working
>>> on
>>> "Freeswitch.NET", what this contains is (at the
>>> moment) a mod_mono
>>> module which loads the mono runtime, and a managed
>>> library which
>>> enables Freeswitch modules to be written in any .NET
>>> supported
>>> languages (C#, VB, python, etc) and executed via
>>> mono. I have done a
>>> large amount of work on these modules and it is in a
>>> currently
>>> working state however not everything has been
>>> covered. I have been
>>> busy recently but I am trying to get together some
>>> documents so that
>>> anybody interested in C#/.NET will soon have
>>> direction and be able to
>>> help me complete the task.
>>>
>>> I'm sure you understand just how awesome Freeswitch
>>> will be once this
>>> module is complete ;)
>>>
>>> And for anybody interested, the code is currently in
>>> my svn branch
>>> "james/".
>>>
>>> James
>>>
>>>
>>> On 31/08/2006, at 6:51 PM, Martin R. Sørensen wrote:
>>>
>>>> Hi List...
>>>>
>>>>
>>>>
>>>> I have at question.. maybe off topic :o)
>>>>
>>>>
>>>>
>>>> I'm currently a C# dev. Because of a job change
>>> I'm interested in
>>>> telephony applications and development off a
>>> telephony platform for
>>>> me company(tm).
>>>>
>>>> Now for the question(tm) can some buddy help me get
>>> started on dev in C
>>>> ++, books, articles, tip and sow on(tm) in relations
>>> to Freeswitch
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>> Martin
>>>>
>>>> _______________________________________________
>>>> 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
>
> _______________________________________________
> 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