### Description Setting the `advertise` parameter of the `listen` option in `kamailio.cfg` has no effect on the `Via` address sent by the UAC module. I expected the `Via` header to contain the public IP. Instead, the REGISTER requests sent by the UAC module continue to use the private ip:
``` listen=<private ip>:5060 advertise <public ip>:5060 ``` ``` Via: SIP/2.0/UDP <private ip>:5060;branch=z9hG4bK6c7b.fc053184000000000000000000000000.0 ```
This is confusing since the core cookbook recommends against using `advertised_address`.
### Possible Solutions With the `advertised_address` option, the IP in the Via header is set to the public IP address as expected:
``` advertised_address=<public ip>:5060 listen=<private ip>:5060 ``` ``` Via: SIP/2.0/UDP <public ip>:5060;branch=z9hG4bK45ba.c2851fa6000000000000000000000000.0 ``` ### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` version: kamailio 5.2.3 (x86_64/linux) c36229 flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: c36229 compiled on 13:25:11 Jun 2 2019 with gcc 8.3.0 ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `uname -a`) -->
``` Linux linux 5.1.5-gentoo #1 SMP PREEMPT Mon May 27 14:42:14 CEST 2019 x86_64 AMD A6-3670 APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux ```