Question :

If kamailio is behind a double NAT setup

Internet - (Model-router : NAT 1) - (router - NAT2) - kamailio

Could I use this settings ?

- For public softphone :

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060 

Domain :  IPv4_public:5060


As described above,

Question :

I have :

- softphone on public network using IPv4_public to reach Kamailio

Then I need to call with Domain :  IPv4_public:5060

- softphone on private network but not on same vlan and rules are created to let those softphones to reach kamailio vlan

??? Do I need to call with Domain :  IPv4_public:5060 or  Domain : IPv4_private:5066

- softphone on kamailio vlan

??? Do I need to call with Domain :  IPv4_private:5066

Best Regards,

Youssef BOUJRAF
Email: yboujraf@gmail.com

On Sat, Mar 5, 2022 at 2:35 PM Youssef Boujraf <yboujraf@gmail.com> wrote:
Question :

If kamailio is behind a double NAT setup

Internet - (Model-router : NAT 1) - (router - NAT2) - kamailio

Could I use this settings ?

- For public softphone :

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060 

Domain :  IPv4_public:5060

- For private softphone on same vlan as kamailio

listen=udp: IPv4_private:5066

Domain :  IPv4_private:5066

Best Regards,

Youssef BOUJRAF
Email: yboujraf@gmail.com


On Sat, Mar 5, 2022 at 1:23 AM Youssef Boujraf <yboujraf@gmail.com> wrote:
Dear,

Then;

- For public softphone :

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060 

Domain :  IPv4_public:5060

- For private softphone on same vlan as kamailio

listen=udp: IPv4_private:5066

Domain :  IPv4_private:5066



Best Regards,

Youssef BOUJRAF
Email: yboujraf@gmail.com


On Fri, Mar 4, 2022 at 3:00 PM Youssef Boujraf <yboujraf@gmail.com> wrote:
Hi Dear

I am trying to understand how "listen" and "advertise" work for sip signaling purpose ( corebooks : listen and advertise )

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

- kamailio :

Network :

IPv4_private 192.168.1.6 / IPv4_public

kamailio.cfg :

listen=udp: IPv4_private: 5060 advertise  IPv4_public : 5060 

- uac (softphone) :

zoiper, microsip, cisco spa508g

USE CASE :

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,

Youssef BOUJRAF
Email: yboujraf@gmail.com