Where to put qualify?

Hi,

OS: CentOS 7.0 (64 Bit)
Asterisk Version: 11.16.0

My Asterisk server is directly sits on public ip address.

Our phones are behind the NAT as below:
ISP -> Router (Public IP address to private ip address routing)-> LAN Switch -> IP Phones

I understand about “qualify”. I am giving “nat=force_rport,comedia” in both general section of sip.conf and sip users accounts.

My doubt is:

Where I need to give qualify=yes exactly? Do I need to give in the general section of sip.conf file OR in sip users accounts?

Thanks in advance.

Mouli.

Yes. In one of those, depending on whether you want it to apply to a specific peer or all peers.

Why are you setting nat= when there is no hint of nat being used?

Hello David,

Thanks for your reply.

About setting up NAT: Some of my users can behind the NAT, or some may not be. How would I know about this dynamically?

Thank you.
Mouli

nat = auto_force_rport ; Set the force_rport option if Asterisk detects NAT (default)
nat = auto_comedia ; Set the comedia option if Asterisk detects NAT

–Satish Barot

Ideally your remote users should do what a properly configured Asterisk does and resolve the NAT issues locally so that the SIP is done purely in terms of public addresses.