This happens when UA sends REGISTER from a port that doesn't match the one advertised in a CONTACT header (for example there is a port translation (like PAT) on your firewall, or maybe a bug in UA 🤷)

Kamailio will store AoR with a port from CONTACT, and this may be not reachable. As an example see attached pictures with Zoiper and TCP: REGISTER packet received from port 50376 but AoR stored with port 60320. Trying to connect to that port failed and thus error message from tcp_do_connect()

kamailio_nat_issue_1.png (view on web) kamailio_nat_issue_2.png (view on web) kamailio_nat_issue_3.png (view on web)

👉 To fix that define WITH_NAT, use received_avp parameter of the nathelper module and the registrar module, and use fix_nated_register() for the registrar to store it in the received column in the location table

kamailio_nat_issue_5_fix.png (view on web) kamailio_nat_issue_4_fix.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3583/2480754616@github.com>