drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
237 stars 92 forks source link

Transport stays TCP for all subsequent requests after udp-mtu is exceeded #296

Open etamme opened 1 year ago

etamme commented 1 year ago

Tested against v0.8.22

When drachtio-server receives a request of size greater than udp-mtu, it correctly switches the transport to TCP, however it continues sending TCP for all subsequent requests, even though it sets Via headers for UDP. To clarify this is all requests, not just requests associated with the dialog whose request that exceeded udp-mtu.

The test case is simple to replicate with sipp, create a simple offer/answer scenario where the INVITE request size is greater than udp-mtu, and then send a second offer/answer where the INVITE request size is less than udp-mtu. Both requests will be forwarded via TCP, the first request will correctly have a Via header with a tcp transport. The second request will be sent over TCP, but will have a Via header with a udp transport.

davehorton commented 1 year ago

thanks can you attach the sipp scenario file you used for testing

etamme commented 1 year ago

I created sipp_test.zip which contains the test script, test.sh, and the associated scenario files.

etamme commented 1 year ago

Here is a pcap captured when the test script is run

lylepratt commented 2 months ago

We seem to also be having this issue. We noticed requests to a particular FS started using TCP for all of its requests (other FS boxes were still using UDP) and just as mentioned in this article, the VIA shows UDP. Invites to this FS that got into this mode started failing every time.