[sr-dev] #!IFMODULE

Olle E. Johansson oej at edvina.net
Tue Mar 26 18:48:27 CET 2013


Hi!

Something I would like to see in Kamailio is something used heavily in Apache HTTPD, a config parser statement like #IFDEF for modules. WIth this a part of the config only applies if a module is loaded, like

#!IFMODULE SNMPSTATS.SO
modparam()
#!ENDIF

Another way to implement it would be to have modules publish a #!DEFINE, like

#!IFDEF MOD_SNMPSTATS.SO

Now, I don't know how Kamailio parses the configuration files. Is this at all possible? Either the module itself or the config file parser could inject these variables - but at module init it may be too late.

Any ideas, someone who understands the config file parsing?

/O


More information about the sr-dev mailing list