I just installed asterisk on a server in the internet as pure SIP proxy (some upstream SIP trunks and some SIP extensions).
However I have a lot of problems with name resolution and cannot find the cause. Name resolution for the server itself is fine, using dig & nslookup I can lookup all types of records: A, PTR, NAPTR, SRV using all servers that are in /etc/resolve.conf for all names that are in use somewhere.
But asterisk is unable to resolve peers configured with host=somesipprovider.com in sip.conf for whatever reason.
It also doesn’t matter if I have srvlookup enabled or not.
I tried to trace this back and ended up at ast_gethostbyname in main/util.c which seems to be a thread-safe replacement for gethostbyname.
I don’t know if this is intentional but this function always gives a zero output and I really think this shouldn’t be the case.
Thanks and best regards,