STUN DNS Service Records

Hi

I am trying to use DNS service records for STUN but I get a message on the console when I add the stunaddr line in rtp.conf.

This is what I have in rtp.conf:

icesupport=yes
stunaddr=_stun._udp.xxxxxxxxx.com

The console message:
WARNING[28677]: res_rtp_asterisk.c:5237 rtp_reload: Invalid STUN server address: _stun._udp.xxxxxxxxx.com

In sip.conf I have srvlookup=yes

Setting stunaddr to an A record works fine - I see the STUN traffic in a packet capture but using an SRV record results in no STUN traffic at all.

I think my DNS service records are all OK, resolution is working:

dig SRV _stun._udp.xxxxxxxxx.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> SRV _stun._udp.xxxxxxxxx.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 428
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2

;; QUESTION SECTION:
;_stun._udp.xxxxxxxxx.com. IN SRV

;; ANSWER SECTION:
_stun._udp.xxxxxxxxx.com. 3599 IN SRV 10 2 3478 1.stun.uk.xxxxxxxxx.com.
_stun._udp.xxxxxxxxx.com. 3599 IN SRV 10 1 3478 1.stun.us.xxxxxxxxx.com.

;; ADDITIONAL SECTION:
1.stun.uk.xxxxxxxxx.com. 3224 IN A XXX.XXX.XXX.XXX
1.stun.us.xxxxxxxxx.com. 28995 IN A XXX.XXX.XXX.XXX

;; Query time: 35 msec
;; SERVER: XXX.XXX.XXX.XXX#53(XXX.XXX.XXX.XXX)
;; WHEN: Thu Nov 17 11:46:16 2016
;; MSG SIZE rcvd: 175

Asterisk version is 11.21.2

Please can anyone help with this?
TIA

I think you will find that Asterisk only has code to handle SVR records for SIP, not general purpose SVR support.

This is correct. No SRV lookup is done for STUN.