Hi
Technically, the SDP does not get truncated. At the SIP/SDP level, there's no truncation. Fragmentation happens at the IP layer. If kamailio sends a large SIP/SDP message and the other side receives only one fragment, then it the receiving SIP application will never see it. There's no danger of the SIP application getting only a partial SIP/SDP message due to fragmentation.
is FreeSWITCH handling the partial SDP
No. It cannot receive only a partial SDP. It's all or nothing.
Should I be concerned about ... missing codec negotiation
No. It can't happen.
Maybe you captured traffic and didn't see all of the fragments. Check it again and see that the whole SDP was definitely sent and received. If the traffic is working, then (as Fred says) you may just be fine to let it go as is. You're possibly simply thinking you have a problem when it may not even exist. On the other hand, if you start getting packet loss, then you may have a problem.
James
On Wed, 12 Mar 2025 at 03:27, Fred Posner via sr-users sr-users@lists.kamailio.org wrote:
On Mar 11, 2025, at 10:24 PM, Pavan Kumar via sr-users sr-users@lists.kamailio.org wrote:
Hello Kamailio Community, • Is this expected behavior? Should Kamailio automatically truncate SDP when relaying from WebSocket to UDP?
Yes. Often referred to as UDP fragmentation.
• Could this be working accidentally? For example, is FreeSWITCH handling the partial SDP gracefully by default?
It could be working non-accidentally. ;) As long as the packets are received well, there may not be a problem.
• Should I be concerned about potential failures in different scenarios? (e.g., ICE candidate loss, missing codec negotiation)
Alex Balashov wrote up a nice piece many years ago… https://blog.evaristesys.com/2016/02/04/sip-udp-fragmentation-and-kamailio-t...
There’s generally 2 ways of approaching it…
A) Switch to TCP for that connection B) Keep as is
Depending on the amount of traffic you are pushing through, TCP is generally a safe method of handling. If you’re running a considerable load (especially considering the system is also running websockets), you may need to tune your system appropriately.
If these two systems were (let’s say) on the same LAN and even lucky enough to be on dedicated VLAN, then if there wasn’t any problem in the fragmentation, you may just be fine to let it go as is.
Regards,
Fred Posner
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!