miconda left a comment (kamailio/kamailio#4189)
Very likely there was no function parsing the content-length before the dmq processing.
You can add `is_present_hf("Content-Length");` before calling the dmq function.
In 6.0.x series there is a convenience function `sip_parse_headers()`.
I also added a check in the c code with commit f3b784c3c1cfa38de8e43e05103abf7c9152ee45 (to be backported).