Thanks! It can be merged, but then I suggest to have a follow up commit to use the value of latency_log instead of L_WARN for printing the message:
* https://www.kamailio.org/wiki/cookbooks/devel/core#latency_log
It can be controlled via modparam and it would become coherent with the other latency related stuff.