SRV for domain name - cannot connect remote devices

Hello all!
I use PJSIP and I have created 2 SRV for my domain name like this: priority = 0; priority = 0; weight = 5; port = 7770 priority = 0; weight = 5; port = 443

However, unfortunately, remote devices doesn’t connect to Asterisk. I also use a non-standard port for PJSIP.

What am I doing wrong?

If you have enabled srvlookup in asterisk, you would normally need your nameserver to actually point the SRV destination to a URL

But what exactly do I need to do?

I have created 2 SRV records but unfortunatelly it doesn’t work :frowning: It looks right.

443 really? That doesnt conflict with anything? Firewalls dont see a problem with that? Does your device support srv? Is it enabled on the devices?

I use 7770 for SIP TLS. I’m not sure that I need to have 2 records.

Then why is the TLS entry using port 443 and the TCP using the 7770? You’ve got that wrong already then. As well is the PBX at or Because if it is the latter, the SRV records are wrong.

The SRV should be more like

1 Like

Thanks but unfortunatelly it doesn’t work… I have edited 2 records, stay just this one. Am I right?

Are your phones actually configured to use tls SIP service using SRV lookups? please show us how they look.

I use Zoiper sip client software to connect. There is no specific SRV setting, just host address, port number and encryption (srtp and zrtp).

When you say host address, do you mean IP address or the base URL that is serving via SRV records the subdomain that is serving SIP

Either way, sngrep should reveal what is going on.

The correct SRV record format for SIP over TLS is not

3 Likes works fine for me.

ok, yesterday I have added follow record:

but unfortunatelly it doesn’t work
Today I have changed the record to:

By the way I have an A record for domain name:

In SIP remote client (in Zoiper) I entered: but I would like to enter just: without port number.

No, I don’t think it does, unless you’re using Skype for Business, which uses that particular SRV record.

I’d say you need to take an hour and read through RFC 3263 which describes how SRV for SIP works.

If you put the port number after a name, then you are bypassing SRV and telling your client to look up the A or AAAA record and connect to the host on that port.

If you just put the name (without port), your client will possibly first look up the NAPTR record for the domain, to see which transport is preferred. Then it will do an SRV lookup to find the hosts and ports corresponding to the preferred transport. Then it will get the IP address and make the connection.

From where your phones are, make sure you can look up the SRV. Use nslookup or dig. Example:

$ dig srv

; <<>> DiG 9.10.6 <<>> srv
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8175
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096

;; ANSWER SECTION:	577	IN	SRV	0 100 5060

You can see I got a record back for telling me for a TCP connection, connect to port 5060 on Check yours (

I only use SRV for Bria Background Push Server Notification Registration for iphone/android. Unless we put an SRV record in they continue to send on 5060. So has been working. I’ve never used SIPS. Maybe Bria uses the same type of wierd record lookup that microsoft does then.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.