res_rtp_asterisk: Automatically refresh stunaddr from DNS

This allows the STUN server to change its IP address without having to
reload the res_rtp_asterisk module.

The refresh of the name resolution occurs first when the module is
loaded, then recurringly, slightly after the previous DNS answer TTL
expires.

ASTERISK-29508 #close

Change-Id: I7955a046293f913ba121bbd82153b04439e3465f
This commit is contained in:
Sebastien Duthil
2021-04-05 15:06:38 -04:00
committed by George Joseph
parent f01a0398f8
commit 6fbf55ac11
4 changed files with 137 additions and 9 deletions

View File

@@ -63,7 +63,8 @@ rtpend=20000
; Hostname or address for the STUN server used when determining the external
; IP address and port an RTP session can be reached at. The port number is
; optional. If omitted the default value of 3478 will be used. This option is
; disabled by default.
; disabled by default. Name resolution will occur at load time, and if DNS is
; used, name resolution will occur repeatedly after the TTL expires.
;
; e.g. stundaddr=mystun.server.com:3478
;