[asterisk-dev] Making an application for asterisk

Moises Silva moises.silva at gmail.com
Thu Jul 20 07:06:18 MST 2006


Kev.
Definitly im not the best guy around here to help you, but is very
"simple". The important functions to define are:

int unload_module(void)
int load_module(void)
char *description()
int usecount()
char *key()

usually i think you can leave the last 3 as in app_skel.c, the first
is called when asterisk is requested to unload your application, so
here your are supposed to do clean up stuff. Whay you see in
app_skel.c is the minimum clean up. the second function is called when
asterisk is requested to start your application (from the console, or
in the module.conf file), usually you only have to call the
ast_register_application function with the following arguments:

char pointer to the name of the application
function pointer to the routine where your application should start.
char pointer to the application synopsis
char pointer to a more descriptive string describing what your application does

please read include/asterisk/pbx.h prototype comments for more info.

So, you can do whatever you want in the function whose pointer you
just passed in ast_register_application. As someone suggested you
before, read other applications and see how they work.

Regards


On 7/20/06, Kevin Khanye <utmostguru at gmail.com> wrote:
>
> I looked into the app_skel.c, did my research, and some guy in this mailing
> list said something about hacking the app, which sounded like it was the
> easy way out, for me. I'm really interested, all I need is just that first
> hope that I'm in the running, maybe a small applet that will just register,
> in my asterisk box.
>
> Regarding the app_skel.c, where do you even start? I'm sorry for being such
> a newbie
>
> Thanks.
>
> Kev
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"



More information about the asterisk-dev mailing list