rtpengine version the issue has been seen with
mr11.5.1.24
Used distribution and its version
Alpine 3.19.1
Linux kernel version used
5.10.218-208.862.amzn2.x86_64
CPU architecture issue was seen on (see uname -m)
x86_64
Expected behaviour you didn't see
SRTP stream as advertised in SDP packets
Unexpected behaviour you saw
The SRTP stream starts from another port and switches the port in the call.
The thing is: I assume that the underlying kubernetes is the reason for that behavior.
I have an incoming call and the remote wants to receive the SRTP packets at port 40110 and rtpengine wants to receive the SRTP packets at port 42046. That is advertised in the SDP packets.
From the rtpengine logs:
RTPEngine sends SRTP from port 42046 to port 40110. Then it receives the first remote SRTP packet coming from port 44701. Therefore, it sends the next SRTP packets from port 42046 to port 44701.
From the pcap (captured with tcpdump):
RTPEngine sends SRTP from port 35957 to port 40110. Then it receives the first remote SRTP packet coming from port 40110 and sent to port 42046. Then RTPEngine send the SRTP now to from port 42046 to port 40110.
I don't know why there are differences in the captured traffic and logged traffic. I investigated this and could replicate that behavior with sipp sending many calls with media to pods on different kubernetes nodes. The pods are running with hostNetwork: true, which means that the network isn't isolated.
I can also replicate that behavior on a local docker installation. As soon as I run calls in a container, I can see that behavior. When I run calls natively, everythin is fine.
Why does the SRTP stream has this behavior and how can that be avoided?