|
Hi all,
I use Kamailio 3.0.0 currently, but I have a problem with the topoh module.
Indeed, I want to create an exported function called « topoh_required »( so, to be used in the config file) for this module, I read and execute the instruction of the devel guide to do this:
in topoh_mod.c, I add or modify:
int th_param_mask = 0;
...
static cmd_export_t cmds[] = { {"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null , REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE}, {0, 0, 0, 0, 0} };
...
struct module_exports exports= { "topoh", DEFAULT_DLFLAGS, /* dlopen flags */ cmds, /*added*/ params, 0, /* exported statistics */ 0, /* exported MI functions */ 0, /* exported pseudo-variables */ 0, /* extra processes */ mod_init, /* module initialization function */ 0, 0, 0 /* per-child init function */ };
...
static int m_topoh(struct sip_msg *msg, char *value) { unsigned int temp = (unsigned int) value; if(temp==1) { th_param_mask=1; return 1; } else if (temp==0) { th_param_mask=0; return 0; } else return -1; }
I do make module and make ... no problem,
but when I start Kamailio with the function topoh_required(« 1 »); in the config file, it says:
Not starting kamailio: invalid configuration file!
0(19524) : <core> [cfg.y:3329]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 328, column 20: unknown command, missing loadmodule?
ERROR: bad config file (1 errors)
So It doesn't know the topoh_required function. But I don't know how to solve this problem.
Can somebody help me please? Thank you very much for your help.
Jérôme |
_______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
