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:
The console message:
WARNING: 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
;; 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?