[SR-Users] kamailio.cfg : behind the NAT (listen and advertise) understanding

Youssef Boujraf yboujraf at gmail.com
Fri Mar 4 15:00:32 CET 2022

Hi Dear

I am trying to understand how "listen" and "advertise" work for sip
signaling purpose ( corebooks : listen
<http://www.kamailio.org/wiki/cookbooks/5.4.x/core#listen> and advertise )

Flow : kamailio behind NAT using softphones on private and public networks.

- kamailio :

Network :

IPv4_private / IPv4_public

kamailio.cfg :

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060

- uac (softphone) :

zoiper, microsip, cisco spa508g


I 'd like to force all softphone on the same local network to reach
kamailio through a public ip address.

??? QUESTION : Do I need to REGISTER on IPv4_private address of Kamailio OR
REGISTER on IPv4_public address of kamailio or DEFINE another "listen" with
another PORT WITHOUT "advertise"  for softphone on same kamailio network ?

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060
listen=udp: IPv4_private: 5066

Do I need to use "kamctl ps" to verify which interface is listening on port

Thanks in advance

Best Regards,

Email: yboujraf at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220304/8d9a1431/attachment.htm>

More information about the sr-users mailing list