[Asterisk-Users] Registering an application
Alexandru Coseru
alex_spam at distinctgroup.net
Tue Nov 11 02:56:07 MST 2003
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
More information about the asterisk-users
mailing list