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()`
<img width="1024" alt="kamailio_nat_issue_1"
src="https://github.com/user-attachments/assets/50e543ac-8d8f-4725-8e6…
<img width="705" alt="kamailio_nat_issue_2"
src="https://github.com/user-attachments/assets/ce3e05bc-01de-4e3b-bec…
<img width="1275" alt="kamailio_nat_issue_3"
src="https://github.com/user-attachments/assets/92fb56b3-2822-4d8e-b31…
👉 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
<img width="1044" alt="kamailio_nat_issue_5_fix"
src="https://github.com/user-attachments/assets/764578cc-359a-440f-afa…
<img width="684" alt="kamailio_nat_issue_4_fix"
src="https://github.com/user-attachments/assets/23934bd4-f2b5-4e2e-91b…
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3583#issuecomment-2480754616
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3583/2480754616(a)github.com>