RTCP not sent from the SDP port


I’ve recently enable RTCP in sofia profile by setting the parameters:

<param name=“rtcp-audio-interval-msec” value=“1000”/>
<param name=“rtcp-video-interval-msec” value=“1000”/>

Now in the SDP, FS sends the information about the RTCP port:

But the RTCP pkt is sent from the source port RTP PORT + 1, that is wrong.

How can i force FS to respect the port in the SDP?


I suspect this is a 200OK? If thats the case I suspect the invite said send to me on pot 11783.


Hi Brian,

is the initial INVITE from FS:

The 200 OK from remote phone doesn’t have RTCP port:

You can get the full pcap from WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Is there any nat between those devices?

no, connected directly, (fs) ↔ (phone)

i test the opposite direction, calling from the device to FS and the RTCP is respected, traffic is out from FS with the port of the SDP, the issue seams to be only when FS send the first INVITE.

RTCP is always sent RTP Port + 1 unless RTCP Mux is enabled. Those are the rules, set rtcp_mux=true.

Even numbers in the range are used for the calls incoming Real-Time Transport Protocol (RTP) traffic. The same calls Real-Time Transport Control Protocol (RTCP) traffic uses the RTP port number plus 1, that is the odd numbers** .


ok, I did more tests using the variable rtcp_mux and i think that we have some issues:

Call from FS to device:

  • This is the default when you set the variable rtcp_audio_interval_msec, rtcp-mux is enabled in the first invite SDP says RTCP=PORT, but out of FS the RTCP traffic is RTP PORT + 1,

  • set rtcp_mux=true (it is enable by default), on both channels, same result, i see the rtcp-mux in the SDP, RTCP=PORT, but the RTCP traffic from FS is RTP PORT + 1.

  • set rtcp_mux=false, now the SDP no rtcp-mux and RTCP PORT = RTP PORT + 1, but FS doesn’t send any RTCP pkts. The remote RTP port is 11908.

FS log:

2023-07-25 12:32:25.212852 56.03% [DEBUG] switch_core_media.c:8630 AUDIO RTP [sofia/] port 12926 → port 11908 codec: 0 ms: 20
2023-07-25 12:32:25.212852 56.03% [DEBUG] switch_rtp.c:4366 Starting timer [soft] 160 bytes per 20ms
2023-07-25 12:32:25.212852 56.03% [DEBUG] switch_core_media.c:8851 Activating RTCP PORT 0
2023-07-25 12:32:25.212852 56.03% [DEBUG] switch_rtp.c:4698 RTCP send rate is: 200 and packet rate is: 20000 Remote Port: 11909
2023-07-25 12:32:25.212852 56.03% [DEBUG] switch_rtp.c:2533 Setting RTCP remote addr to 2

From the pcap i see only the pkts from the phone:

Call from device to FS:

  • rtcp-mux is not set on the SDP and the traffic is using the RTCP port of the 200 OK, in this case
    RTCP PORT = RTP PORT+1. FS sends the correct RTCP pkts.

  • set rtcp_mux=true, it makes no difference, the 200OK is the same as before, mux is not enabled and in the SDP RTCP PORT = RTP PORT +1.

Looking at switch_core_media.c i found that rtcp_audio_interval_msec can be set to the value “passthru”, this is to copy the RTCP from aleg to bleg and vice-versa?

where did you set the variable?



<action application=“set” data=“rtcp_mux=true”/>

set it in vars.xml.


if i set it on vars.xml is the same behavior.

Not sure you can set the port its sent FROM the far side can pick any port on the from, does it arrive to you on the port outlined in the SDP or am I misreading this?


the far side is sending the traffic to the port in the SDP.
The issue is when FS originates the call, is not respecting the information in the SDP.