Discussion:
[SR-Users] rtpproxy_offer and fix_nated_sdp in one route
Sebastian Damm
2014-09-24 13:16:35 UTC
Permalink
Hi,

I switched from rtpproxy module to the rtpproxy-ng module lately, and
noticed a strange behavior. In my branch route to the device, I have two
statements:

fix_nated_sdp("1");
rtpproxy_offer();

The first command appends a line with "direction:active" to the SDP. The
second one puts the RTP proxy in the stream. This worked all well with the
old rtpproxy module. But with the new rtpproxy-ng module, I get an empty
line after the SDP body, just before the "direction:active" line in the
SDP, which makes the packet invalid.

I tried changing the order of both statements, but without any difference.
What I saw is, that the old module just sent some basic parameters to the
rtpproxy and got only IP and port back. The new module sends the complete
SDP to the rtpengine and gets back the "fixed" SDP.

Has anyone ever seen this? Is there a way to fix it?

Best Regards,
Sebastian
Juha Heinanen
2014-09-24 13:26:25 UTC
Permalink
Post by Sebastian Damm
I switched from rtpproxy module to the rtpproxy-ng module lately, and
noticed a strange behavior. In my branch route to the device, I have two
fix_nated_sdp("1");
rtpproxy_offer();
i would make only one of the above calls depending on if the destination
supports direction:active or not.

-- juha
Sebastian Damm
2014-09-24 13:30:29 UTC
Permalink
Post by Juha Heinanen
Post by Sebastian Damm
fix_nated_sdp("1");
rtpproxy_offer();
i would make only one of the above calls depending on if the destination
supports direction:active or not.
But what if I don't know what NAT situation is present for this call? I
just know, that it's some kind of NAT. I disabled the fix_nated_sdp part
for now, but I would enable it again if possible.

Sebastian
Juha Heinanen
2014-09-24 13:43:25 UTC
Permalink
Post by Sebastian Damm
But what if I don't know what NAT situation is present for this call? I
just know, that it's some kind of NAT. I disabled the fix_nated_sdp part
for now, but I would enable it again if possible.
if you don't know about the capabilities of the destination, then just
use media proxy.

-- juha
Richard Fuchs
2014-09-29 16:58:32 UTC
Permalink
Post by Sebastian Damm
Hi,
I switched from rtpproxy module to the rtpproxy-ng module lately, and
noticed a strange behavior. In my branch route to the device, I have two
fix_nated_sdp("1");
rtpproxy_offer();
The first command appends a line with "direction:active" to the SDP. The
second one puts the RTP proxy in the stream. This worked all well with
the old rtpproxy module. But with the new rtpproxy-ng module, I get an
empty line after the SDP body, just before the "direction:active" line
in the SDP, which makes the packet invalid.
I tried changing the order of both statements, but without any
difference. What I saw is, that the old module just sent some basic
parameters to the rtpproxy and got only IP and port back. The new module
sends the complete SDP to the rtpengine and gets back the "fixed" SDP.
Has anyone ever seen this? Is there a way to fix it?
This is caused by rewriting the SDP body twice. The rtpproxy module only
rewrites small parts of the SDP, while rtpproxy-ng substitutes the
entire SDP body, which is why you run into conflicts when there's
another function touching the SDP body. Calling msg_apply_changes()
between the two calls fixes that, but may have side effects. I would
suggest the same as Juha did.

cheers

Loading...