sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
763 stars 360 forks source link

SRTP Stream switches ports #1837

Closed AndreHeber closed 1 week ago

AndreHeber commented 1 week ago

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.

I write that here, because it started with rtpengine. I know, that this is not the perfect forum to present that issue. If you have a suggestion, where to post that, please let me know. I hope that someone ran into the same issue and has some experience with this.

Steps to reproduce the problem

No response

Additional program output to the terminal or logs illustrating the issue

No response

Anything else?

No response

rfuchs commented 1 week ago

I write that here, because it started with rtpengine. I know, that this is not the perfect forum to present that issue. If you have a suggestion, where to post that, please let me know. I hope that someone ran into the same issue and has some experience with this.

There's a mailing list, which is the appropriate place for questions about usage and behaviour: https://rtpengine.com/mailing-list