[Asterisk-Users] Registering an application

Jeremy McNamara jj at nufone.net
Tue Nov 11 05:36:28 MST 2003


Check that.   Add your application to the end of the APPS line.

Jeremy


Alexandru Coseru wrote:

> Hello..
>  
> Maybe I'm asking something silly but..... How can I register my own 
> app with * ?
>  
> I've made a simple .so , but I cannot find it in asterisk when i type 
> "show applications"
>  
> Here is the code:
>  
>  
> #include <asterisk/lock.h>
> #include <asterisk/file.h>
> #include <asterisk/logger.h>
> #include <asterisk/channel.h>
> #include <asterisk/pbx.h>
> #include <asterisk/module.h>
> #include <asterisk/translate.h>
> #include <string.h>
> #include <stdlib.h>
> #include <pthread.h>
> static char *tdesc = "Alex's app";
> static char *app = "Alex";
> static char *synopsis = "Alex test";
> static char *descrip ="Test";
>  
>  
> STANDARD_LOCAL_USER;
>  
> LOCAL_USER_DECL;
>  
> static int alex_exec(struct ast_channel *chan, void *data)
> {
>     return 0;
> }
>  
> int unload_module(void)
> {
>         STANDARD_HANGUP_LOCALUSERS;
>         return ast_unregister_application(app);
> }
>  
> int load_module(void)
> {
>         return ast_register_application(app, alex_exec, synopsis, 
> descrip);
> }
>  
> char *description(void)
> {
>         return tdesc;
> }
>  
> int usecount(void)
> {
>         int res;
>         STANDARD_USECOUNT(res);
>         return res;
> }
>  
> char *key()
> {
>         return ASTERISK_GPL_KEY;
> }
>  
>  
> I've put the so in apps/  but no results..
>  
> Thanks a lot for any help..
>  
>     Alex






More information about the asterisk-users mailing list