Hi,
This issue comes form the fact that kamailio is already handling SIP messages before the modules are initialized. I found some other occurrences also.
It would be more efficient if the "normal" runtime code wouldn't have to check all the pointers which should have been initialized by the module init code.
What would it take to guarantee all modules have run their init code before handling SIP messages?