I have used in config file these kind of constructs:
#!ifdef MOD_<module name> ... #!endif
Is the MOD_xxx keyword automatically set when module xxx is loaded?
Perhaps I have invented the whole concept in a dream?
-- Juha
Yes, MOD_xxx is defined automatically when module xxx is loaded.
In addition, for kamailio version x.y.z, the following defines are added automatically:
KAMAILIO_x KAMAILIO_x_y KAMAILIO_x_y_z
For example, with kamailio v5.4.0:
KAMAILIO_5 KAMAILIO_5_4 KAMAILIO_5_4_0
You can list defined tokens via rpc with:
kamctl rpc core.ppdefines
or to see also the values:
kamctl rpc core.ppdefines_full
Cheers, Daniel
On 18.10.19 08:51, Juha Heinanen wrote:
I have used in config file these kind of constructs:
#!ifdef MOD_<module name> ... #!endif
Is the MOD_xxx keyword automatically set when module xxx is loaded?
Perhaps I have invented the whole concept in a dream?
-- Juha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 18.10.19 09:13, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Yes, MOD_xxx is defined automatically when module xxx is loaded.
Good. Would core cookbook define section be a place to document this?
Yes, you can add it there.
Cheers, Daniel