Prevent SIP client connection via Asterisk IP address

Hello everyone!
I’m using Asterisk 22.7, and there are over 500 users on the server.
I’m currently concerned that over 50% of my SIP clients have configured the server address as an IP address, rather than as a DNS record (A record voip.example.com) for the Asterisk server. In the tcpdump output, I see: IP 192.168.0.69.13483 > 192.168.1.10.5060: SIP: REGISTER sip:192.168.1.10 SIP/2.0
If I manually change the IP address in sip-client to DNS, the tcpdump entry changes:
tcpdump IP 192.168.0.69.13483 > 192.168.1.10.5060: SIP: REGISTER sip:voip.example.com SIP/2.0
I understand that I need to solve this problem myself by reconfiguring sip-client for my employees.
Could you please tell me if it’s possible to configure sip-client connections to be blocked by IP address instead of DNS?
Currently, if I need to move a server to a new IP address, less than 50% of users will automatically migrate :slight_smile:

I tried creating an endpoint [6001@voip.example.com]. In this case, connections only work with the DNS name. It works in theory, but I could be wrong.

I’d like to ask the community if anyone has completed this task? Can you share?

I don’t think you can bind asterisk to a url only. The only feasible way would be to have a proxy that denies all the requests for IP and only accepts and forwards url addresses to asterisk.

It looks to me that you are mixing two concepts that are well separated in (and not only in) SIP specifications.

SIP operates at the application layer, while IP operates at the network layer.