-
-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Labels
Description
Description
I am trying to send an INVITE request whose size is around 4000 bytes. However, I receive the following error:
{"level":"debug","caller":"transactionLayer","error":"size of packet larger than MTU","req":"INVITE sip:foo@example.com SIP/2.0","time":"2025-03-12T04:47:50Z","message":"Fail to write request on init"}
size of packet larger than MTU. transaction transport error
I am using the following code to forward the SIP request over UDP:
clTx, err := s.client.TransactionRequest(ctx, req, sipgo.ClientRequestAddVia, sipgo.ClientRequestAddRecordRoute)Question
Is there a way in the sipgo library handle large SIP messages by automatically fragmenting them when using UDP? If not could this feature be implemented?
Note
I am aware that the SIP RFC recommends switching to TCP when a message exceeds the MTU. However, some proxies like Kamailio implement UDP fragmentation in such situations, which is useful when there is no reliable way to determine whether the User Agent supports TCP.
Thanks!
Reactions are currently unavailable