Problem configuring Asterisk with domain name

Hi,

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.

Thanks.

The SRV record is incorrect, it should be:

_sip._tcp.example.com. 86400 IN SRV 0 5 5060 example.com.

Where example.com 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:

_sip._udp.shifteight.org. 14210 IN SRV 0 0 5060 pbx.shifteight.org.

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

same is my dig result showing

;; ANSWER SECTION:
_sip._udp.mydomain.com. 1800 IN SRV 0 0 5060 dialtone.mydomain.com.

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

This is the reference url: http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-ICR-SECT-1.html

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 dialtone.mydomain.com is also pingable and also can ssh it.
What else could be wrong? I have already turned off firewall for testing and tried setting domain=mydomain.om 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?

Thanks.

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