0
votes

We are working on a project that's using a Twilio SIP trunk that diverts calls from the PSTN to our cluster that is hosting two active-active Kamailio 5.1 instances that redirect traffic to several Asterisk 15.4 instances.

Since Twilio uses long URIs to define its resources, the SIP messages being handled by Kamailio are sometimes too big and generate a "Message Too Long error". I have been able to temporarily patch this removing unused headers using remove_hf_re and remove_hf but it still fails from time to time. Is there a way to split the UDP packet to mitigate this issue? or what other options could be considered?

1
The correct way would be to use TCP instead of UDP. See RFC3261 chapter 8.1.1. Splitting the UDP packet is not an option.Bucq

1 Answers

0
votes

UDP packet can't be logner then MTU size, which is usually 1450 to 1500.

You have two options here

1) Use tcp sip. TCP can send invite in two or more packets

2) On first kamailio use topoh module, which can decrease size of some headers. This will work only if on first size is enought.