[Asterisk-Users] Registering an application

Eric Wieling eric at fnords.org
Tue Nov 11 10:48:02 MST 2003


look at app_skel.c in the apps directory

On Tue, 2003-11-11 at 03:56, 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
-- 
Go to http://www.digium.com/index.php?menu=documentation and look at
the "Unofficial Links" section.  This section has links to a wide
variety of 3rd party Asterisk related pages.  My page is the
"Asterisk Resource Pages".

BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643




More information about the asterisk-users mailing list