Thanks for the pull request. Just a few notes, other might be able to comment more: - instead of extending the core and adding another command line parameter for it, I think it should be implemented as a extension module, similar e.g. to log_systemd module - the code includes pthread.h and also calls pthread_self(), this should be not necessary as there is no pthread_create() in the core right now (Kamailio uses mainly the multi-process model)