[asterisk-dev] Module 'app_gbox.so' could not be loaded.
ast guy
astguy at gmail.com
Mon Jun 18 04:48:00 CDT 2007
Hi,
I have developed an application app_gbox() on asterisk 1.4, but when
I try to load it it outputs following errors.
[Jun 18 14:37:59] WARNING[16383]: loader.c:375 load_dynamic_module:
Module 'app_gbox.so' did not register itself during load
[Jun 18 14:37:59] WARNING[16383]: loader.c:607 load_resource: Module
'app_gbox.so' could not be loaded.
Another thing I noticed, in /usr/src/asterisk/apps directory I
couldn't grep ast_module_register for my application
IVR-1-4 asterisk # grep ast_module_register * -R | grep dial
Binary file apps/app_dial.o matches
Binary file apps/app_dial.so matches
IVR-1-4 asterisk # grep ast_module_register * -R | grep gbox
IVR-1-4 asterisk #
Code
---------
I'm using following code snippt
in _exec function
struct ast_module_user *u;
u = ast_module_user_add(chan); // To add
ast_module_user_remove(u); // To remove
------------------------------------ ---- ------- - - - - - - - -
static int unload_module(void)
{
ast_log(LOG_VERBOSE, "unLoading GboX application \n");
ast_unregister_application(app);
ast_module_user_hangup_all();
return 0;
}
static int load_module(void)
{
int res = 0;
res = ast_register_application(app, gbox_exec, synopsis, descrip);
if (res) {
ast_log(LOG_ERROR, "Unable to register GboX application \n");
}
return res;
}
When I compile it outputs following errors
app_gbox.c:944: warning: 'unload_module' defined but not used
app_gbox.c:954: warning: 'load_module' defined but not used
Any comments what am I missing for proper application registration.
Regards,
More information about the asterisk-dev
mailing list