[Freeswitch-dev] Create applications in FreeSWITCH

Steven Ayre steveayre at gmail.com
Fri Apr 23 10:15:07 PDT 2010


If you're looking for help on writing new applications then of course
everything under src/mod/applications/*/ provide good examples.

There's also some documentation online of the APIs available to you
within FreeSWITCH:
http://docs.freeswitch.org/

In particular I recommend you look at the following sections
Modules -> Brought To You By APR
Modules -> Core Library

Core Library will tell you the APIs for interacting with
sessions/channels (calls) and provide you with useful interfaces for
doing may useful things like DB access, hash tables, file access etc,
while APR gives you a platform independant way of doing things like
like memory allocation, network access, threading etc. Using them will
save you much of the work and keeps the program style nicely
consistent across FreeSWITCH. Done right your module should also work
on any platform FS runs on without any changes needed (unless you app
depends on something that really is platform-specific such as loading
a DLL file on Windows).

-Steve



On 23 April 2010 15:19, Vitalii Colosov <vetali100 at gmail.com> wrote:
> OK I think I found, need to use: SWITCH_ADD_APP
> Thank you very much!!!
>
> 2010/4/23 Vitalii Colosov <vetali100 at gmail.com>
>>
>> Thanks Mathieu,
>> This really helped!
>> I was able to get Hello World string during the module load :-)
>> Moving to the next step, how can I define an application, let say
>> "skel_app" inside this module?
>> In order to be able to execute it from dialplan.
>> I thought the following does this: SWITCH_ADD_API(api_interface, "skel",
>> "Skel API", skel_function, "syntax");
>> But when I executed "skel" from dialplan, I got error: "Invalid
>> application skel".
>> Could you hint me please?
>> Thank you very much!
>> Vitalie
>>
>>
>> 2010/4/23 Mathieu Rene <mrene_lists at avgs.ca>
>>>
>>> Hi
>>>
>>> Look at mod_skel in src/mod/applications
>>>
>>> Mathieu Rene
>>> Avant-Garde Solutions Inc
>>> Office: + 1 (514) 664-1044 x100
>>> Cell: +1 (514) 664-1044 x200
>>> mrene at avgs.ca
>>>
>>>
>>>
>>>
>>> On 2010-04-23, at 6:43 AM, Vitalii Colosov wrote:
>>>
>>> > Hi dear group,
>>> >
>>> > I would like to start writing plugins (applications) for FreeSWITCH
>>> > that will be called from dialplan:
>>> >
>>> > <action application="my_cool_application"...>
>>> >
>>> > Could you please provide me some steps following which I will be able
>>> > to create "helloworld" C/C++ application that will be called from dialplan?
>>> >
>>> > Or some link if this is already described somewhere... I tried to
>>> > google but did not find that.
>>> >
>>> > Then, if I will create something useful, I will contribute it to the
>>> > community with pleasure... :-)
>>> >
>>> > Thank you very much!
>>> >
>>> > Vitalie
>>> > _______________________________________________
>>> > FreeSWITCH-dev mailing list
>>> > FreeSWITCH-dev at lists.freeswitch.org
>>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>> > http://www.freeswitch.org
>>>
>>>
>>> _______________________________________________
>>> FreeSWITCH-dev mailing list
>>> FreeSWITCH-dev at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>> http://www.freeswitch.org
>>
>
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>



More information about the FreeSWITCH-dev mailing list