The scenario is Kamailio on Debian 11 talking to an external application
server that returns a 302 with a Contact that contains Kamailio's own IP
and a different port. Kamailio is listening on the correct port via at the
given IP address. However, when Kamailio creates the packet to talk to
itself, it it send over the loopback adapter "lo" and gets an ICMP port
reply:
listen=udp:KAMAILIO_INTERNAL_FLOATING_IP:8888
10.z.a.b.5000 > 10.z.x.y.5060: SIP, length: 849
SIP/2.0 302 Moved Temporarily
Contact: <sip:44123456...@10.z.x.y:8888>
15:39:00.548722 lo In IP (tos 0x10, ttl 64, id 5431, offset 0, flags
[none], proto UDP (17), length 949)
10.z.x.y.5060 > 10.z.x.y.8888: SIP, length: 921
15:39:00.548732 lo In IP (tos 0xd0, ttl 64, id 19038, offset 0, flags
[none], proto ICMP (1), length 576)
10.z.x.y > 10.z.x.y: ICMP 10.44.7.136 udp port 8888 unreachable, length
556
Do I need to configure something in the OS or Kamailio to allow the
ethernet IP to work via the loopback adapter? I haven't set up any special
networking to cause this, it appears to be a Linux kernel behavior.