Can you try with the master branch and use kamailio with `--no-atexit` command line parameter (which I just added)?
@miconda I can confirm the patch does work and Kamailio doesn't crash on exit when using `-no-atexit`.
If that's the case, would it always be the preference to have this enabled (no command line switch). What are the downsides?