[SR-Users] rtpproxy_manage() doesn't recognize SDP when Content-Length is not present

Leonid Fainshtein leonid.fainshtein at xorcom.com
Sun Dec 22 12:29:02 CET 2019


Hi,
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.
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:
Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) WARNING: {1 1 INVITE
wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64} sanity [sanity.c:585]:
check_cl(): content length header missing in request
Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) INFO: {1 1 INVITE
wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64} <script>: rtproxy ei.
\(source:81.xxx.xxx.xxx, INVITE sip:098232787 at xxx.xxx.xxx.xxx:5060;user=phone
\)
Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) ERROR: {1 1 INVITE
wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64} rtpproxy
[rtpproxy_funcs.c:182]: extract_body(): failed to get the content length in
message
Dec 22 08:58:34 pbx kamailio[13456]:  4(13488) ERROR: {1 1 INVITE
wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64} rtpproxy [rtpproxy.c:2271]:
force_rtp_proxy(): can't extract body from the message
Dec 22 08:58:34 pbx rtpproxy[1386]: DBUG:GLOBAL:get_command: received
command "13498_4 LSEIc0,101 wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64
10.70.227.183 13592 d5k0w3ft-CC-1116-OFC-253;1 as0bf73ed7;1"
Dec 22 08:58:34 pbx rtpproxy[1386]: INFO:GLOBAL:handle_command: lookup
request failed: session wrjxwyuke5ukvvwwxd00zwtu0ktfuzuf at 10.18.5.64, tags
d5k0w3ft-CC-1116-OFC-253;1/as0bf73ed7;1 not found
Dec 22 08:58:34 pbx rtpproxy[1386]: DBUG:GLOBAL:rtpc_doreply: sending reply
"0\n"

Also, the textops' has_body() function always checks the “Content-Length”
presence that is not 100% correct behavior.

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.

Should I open a bug regarding this matter?

Best regards,
Leonid Fainshtein
Xorcom Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191222/5929b4db/attachment.html>


More information about the sr-users mailing list