Missing rtcp attribute in sdp

Hello,

I’m trying to setup rtcp for asterisk, but I can’t get it to add the rtcp attribute in the sdp.

I can see Asterisk is trying to just send the rtcp reports using rtp port +1, but because it never added the rtcp option in the sdp, the remote does not accept it.

Is there any way to get asterisk to add the rtcp attribute in the SDP?

Thank you…

What RTCP attribute? Simply negotiating RTP automatically negotiates RTCP.

As understand from the RFC the rtcp port MAY be algorithmically deduced from rtp port +1 (parity rule) or it MAY be specified as an attribute in the sdp.
Apparently the provider i’m using has decided to use last option (they are using Freeswitch) the missing rtcp attribute makes Freeswitch not listining on the rtcp port.

I have never come across a device that specifies RTCP ports in the SDP, so FreeSwitch is badly broken if it requires the peer to do so.

If it wants to receive SDP on a non-standard port, it is up to it to send the SDP attribute, not the peer.

It looks like we are talking about RFC 3605. Note that this says:

The RTCP attribute addresses a very specific problem, the
documentation of port numbers as they appear after address
translation by a port-mapping NAT. The RTCP attribute SHOULD NOT be
used for other applications.

The right solution for the Asterisk end in this case is to ensure that your RTP port number range is not remapped by your router. An ITSP really should not have NAT issues at their end, so should not be using the attribute. Any options that has should not constraints in certain cases certainly should not be a mandatory requirement .

I rather suspect that, although labelled as standards track, this is a dead end RFC, and the world has move to ICE for NAT traversal on SIP, although I don’t know how ICE deals with RTCP port mapping.

Thank you for your answer. I can tell you that Freeswitch does specify the rtcp in the sdp.

Example:

v=0
o=FreeSWITCH 1463796207 1463796208 IN IP4 52.58.xx.xx
s=FreeSWITCH
c=IN IP4 52.58.xx.xx
t=0 0
m=audio 26246 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=rtcp:26247 IN IP4 52.58.xx.xx
a=rtpmap:13 CN/8000
a=ptime:20
a=sendrecv

I’ve dug into the Freeswitch code and from what I can see, if the rtcp attribute is not in the sdp from remote party, rtcp is not enabled. It IS however still using the parity rule (rtp port +1) as you can see when assigning port.

So is there a way to get Asterisk to insert the rtcp attribute? :wink:

Thanks…

PS: No NAT involved, public IPs all over.

You would need to modify the source code and recompile. You would be violating a SHOULD NOT requirement in the RFC. I would guess it is simple code change.

Ok, thanks for your help David…

I think it’s better to take this with the FS guys, if we are dealing with SHOULD NOT do it :slight_smile:

Have a nice day!