I settled for a different option to implement what I needed. Always wanted to reproduce it again, maybe it's something with some module (this Kamailio is running with sipcapture and lua), but apparently I don't have the time. If it really is a problem, somebody will stumble upon it again eventually. I'll close it for now.