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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20031111/869d7328/attachment.htm
Alexandru Coseru wrote:> Hello.. > > Maybe I'm asking something silly but..... How can I register my own app > with * ?Look in modules.conf http://www.voip-info.org/wiki-Asterisk+config+modules.conf (New page, just found out that it wasn't there...) /Olle
the .so does not go in apps/ the source files hang out there and the build process copies them to /var/lib/asterisk/modules To do things the right way(tm) add your application to the very MODS line in the Makefile in the apps directory 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
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
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