<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">According to RFC-3261 p.20.14, the Content-Length header field must be present only if a stream-base transport protocol (such as TCP) is used. Therefore, in the case of the UDP transport protocol, this field is optional.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Unfortunately, the rtpproxy_manage() function in Kamailio v.5.2.5 doesn't recognize the SDP body when the Content-Length header field is not present:</div><font face="monospace" size="1">Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) WARNING: {1 1 INVITE <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a>} sanity [sanity.c:585]: check_cl(): content length header missing in request<br>Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) INFO: {1 1 INVITE <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a>} <script>: rtproxy ei. \(source:81.<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">xxx.xxx.xxx</span>, INVITE sip:098232787@<span class="gmail_default" style="font-family:arial,helvetica,sans-serif">xxx.xxx.xxx.xxx</span>:5060;user=phone \)<br>Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) ERROR: {1 1 INVITE <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a>} rtpproxy [rtpproxy_funcs.c:182]: extract_body(): failed to get the content length in message<br>Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) ERROR: {1 1 INVITE <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a>} rtpproxy [rtpproxy.c:2271]: force_rtp_proxy(): can't extract body from the message<br>Dec 22 08:58:34 pbx rtpproxy[1386]: DBUG:GLOBAL:get_command: received command "13498_4 LSEIc0,101 <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a> 10.70.227.183 13592 d5k0w3ft-CC-1116-OFC-253;1 as0bf73ed7;1"<br>Dec 22 08:58:34 pbx rtpproxy[1386]: INFO:GLOBAL:handle_command: lookup request failed: session <a href="mailto:wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64">wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf@10.18.5.64</a>, tags d5k0w3ft-CC-1116-OFC-253;1/as0bf73ed7;1 not found<br>Dec 22 08:58:34 pbx rtpproxy[1386]: DBUG:GLOBAL:rtpc_doreply: sending reply "0\n"<br></font><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Also, the textops' has_body() function always checks the “Content-Length” presence that is not 100% correct behavior.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Just for your information, the problem was discovered in a system where Huawei SoftX3000 is used. It looks like the softswitch removes the “Content-Length”  field in an attempt to decrease size of SIP message when it is too long. If the user disables some codecs in their SIP phone then SoftX3000 keeps the “Content-Length” untouched.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Should I open a bug regarding this matter?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Leonid Fainshtein<br>Xorcom Ltd</div></div></div>