SOLVED sip calling with udp working intermittently, but tcp always working good ?

vuthy09

Member
Jun 12, 2023
95
2
8
40
Hi Everyone! any idea?

When I make a call out or in with udp protocol working intermittently, but tcp always working constantly good. anyone know the problem of this?
my fusionPBX is running on cloud.
thank you.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,461
393
83
Maybe start by looking at your UDP packet sizes. If the packet size is exceeding the MTU, then it will be fragmented, TCP is unaffected by this.

I have seen it many times when an initial INVITE message is OK, but then the proxy responds with w WWW-Authenticate, the client sends the INVITE again with the auth info, but gets no response, this is because the extra data in the auth pushed the packet over the MTU and the proxy could not parse it correctly.
 
  • Like
Reactions: vuthy09

vuthy09

Member
Jun 12, 2023
95
2
8
40
Maybe start by looking at your UDP packet sizes. If the packet size is exceeding the MTU, then it will be fragmented, TCP is unaffected by this.

I have seen it many times when an initial INVITE message is OK, but then the proxy responds with w WWW-Authenticate, the client sends the INVITE again with the auth info, but gets no response, this is because the extra data in the auth pushed the packet over the MTU and the proxy could not parse it correctly.
I saw something like this.1719300189515.png

1719301434480.png
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,461
393
83
Yes, so the lower capture confirms it, there is fragmentation going on. The choices are 1. Switch to TCP (bigger system overhead) or 2. Reduce your UDP packet size.
One of the easiest way of reducing the UDP packet size is to limit the number of codecs you offer, thus reducing the size of the SDP body. Some of the wide band codecs like AMR put a lot of data into the SDP body.
 
  • Like
Reactions: vuthy09

vuthy09

Member
Jun 12, 2023
95
2
8
40
Yes, so the lower capture confirms it, there is fragmentation going on. The choices are 1. Switch to TCP (bigger system overhead) or 2. Reduce your UDP packet size.
One of the easiest way of reducing the UDP packet size is to limit the number of codecs you offer, thus reducing the size of the SDP body. Some of the wide band codecs like AMR put a lot of data into the SDP body.
Thank you for your help @Adrian Fretwell
 

vuthy09

Member
Jun 12, 2023
95
2
8
40
now I know how to fix it because my cloud mtu is 9001 and I changed it to 1500 as the standard one, it works fine now.

ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
changed to
ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
 
Last edited:
  • Like
Reactions: johnnyorange