Problem configuring Asterisk with domain name


I have an asterisk server running fine and sip phones connecting fine. Recently we have purchased a domain name from godaddy and configured it to point to our server. I did following things.

  • Configured A record with domain name pointing to our server IP.
  • Created srv service with _sip using protocol _udp and port 5060 pointing to our domain name.

I can register sip phone via IP but still can not register via domain name. Please guide if I am doing anything wrong or missing anything. Image of my settings is attached.


The SRV record is incorrect, it should be: 86400 IN SRV 0 5 5060

Where is the domain.

Otherwise nothing stands out.

Thanks for your answer but “Asterisk definitive guide 4th edition” also mentions udp SRV record in example as: 14210 IN SRV 0 0 5060

When you configure an SRV record, you can test it with the following Linux command:
# dig SRV
The result will contain several components, but the section you are interested in is:
*;; ANSWER SECTION: 14210 IN SRV 0 0 5060

same is my dig result showing

;; ANSWER SECTION: 1800 IN SRV 0 0 5060

Attached is my updated srv record on godaddy…
Please note that although i write full domain name but godaddy automatically changes it to @ here

This is the reference url:

Then there is nothing to explain why it would not work. Does it resolve from your computer? The dig works fine? If so then your DNS appears to be set up fine.

Yes dig works fine as I pasted the answer section of dig in above reply. Also is also pingable and also can ssh it.
What else could be wrong? I have already turned off firewall for testing and tried setting in sip_general_additional.conf

Asterisk doesn’t really care about the domain to that degree. This would end up being something with the phone, I’d say.

hmmmm… but phone seems registering fine with IP and not with domain name…

Anyone have any clue?


Problem solved by removing TCP SRV record and only keeping UDP. Thanks jcolp for your input :slight_smile:

1 Like

please can you show me your sip for example to know how to connect to the domain