This may look like a very simple question, but I haven't found the answer on the Internet.
Anyone can give me clues how to performs a NAPTR query for a SIP domain? (this is mostly for DNS lookup), or any references also great for me (This one exist on rfc2915).
Maybe using terminal or any tools maybe and further i'd like to do it using java so if any piece of code will very helpful.
The RFC you are looking for is "Session Initiation Protocol (SIP): Locating SIP Servers".
Here's an abbreviated summary of how to select the transport protocol and resolve the SIP server address.
In the real World virtually no SIP providers use NAPTR records, probably half or less use SRV records and the rest rely solely on A records. In my own SIP software I turned off the NAPTR lookup since it just wasted time and it's highly likely that if a SIP provider has bothered to set up NAPTR records they are also going to have set up the standard SRV records.
In hindsight the SIP protocol designers should probably have left the whole SIP server address resolution alone and let implementers use standard IP load balancing and failover mechanisms. Because SIP clients don't all support SRV records, again in my experience less than half, using such records is better than nothing but is not a great solution for failover or load balancing.
If you are looking for a hostname with SIP NAPTR records try columbia.edu and snom.com last time I checked they both had some.