Bugs: Browse | Submit New | Admin

[#24440] ProxyController creates Content-Length inconsistent with the SDP body

Date:
2009-03-10 14:55
Priority:
3
Submitted By:
Xavier Aragon (xarax)
Assigned To:
Nobody (None)
Category:
bug
State:
Open
Summary:
ProxyController creates Content-Length inconsistent with the SDP body

Detailed description
I've been experimenting with the ProxyController class to implement SIP proxy functionality, and found a problem when
the messages carry SDP payload.

The proxy modifies the incoming SDP by adding a new contact (c=) after each media (m=) line (because SDP parser is called
with addDefault=true from Session._on_common_sip). However, the Content-Length value in the outgoing message is not
modified. This seems to be controlled by the fact that ProxyController.create_proxy_request does r.copy_from(orig_request,
:_sipper_all), which copies header fields from the incoming request to the outgoing request, but the message parser
has earlier called 'freeze' for the Content-Length header which prevents the update_content_length method from updating
the value when the request is forwarded.

There is no such problem when using the B2buaController class. It seems that the B2BUA only copies selected header fields
from the incoming request to the outgoing one, and the Content-Length header is not copied. If the request has an SDP
body, the update_content_length method calculates the length and adds the Content-Length header.

What I say about requests above applies to replies as well.

I have no suggestion how to fix this.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item