asterisk/configs/res_stun_monitor.conf.sample
Richard Mudgett 83cd844b82 Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.
The STUN socket must remain open between polls or the external address
seen by the STUN server is likely to change.  However, if the STUN request
poll fails then the STUN server address needs to be re-resolved and the
STUN socket needs to be closed and reopened.

* Re-resolve the STUN server address and create a new socket if the STUN
request poll fails.

* Fix ast_stun_request() return value consistency.

* Fix ast_stun_request() to check the received packet for expected message
type and transaction ID.

* Fix ast_stun_request() to read packets until timeout or an associated
response packet is found.  The stun_purge_socket() hack is no longer
required.

* Reduce ast_stun_request() error messages to debug output.

* No longer pass in the destination address to ast_stun_request() if the
socket is already bound or connected to the destination.

(closes issue ASTERISK-18327)
Reported by: Wolfram Joost
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1595/
........

Merged revisions 346700 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 346701 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01 21:19:41 +00:00

28 lines
1.3 KiB
Text

;
; Configuration file for the res_stun_monitor module
;
; The res_stun_monitor module sends STUN requests to a configured STUN server
; periodically. If the monitor detects a change in the external IP address or port
; provided by the STUN server an event is sent out internally within Asterisk
; to alert all listeners to that event of the change.
; The current default listeners for the network change event include chan_sip
; and chan_iax. Both of these channel drivers by default react to this event
; by renewing all outbound registrations. This allows the endpoints Asterisk
; is registering with to become aware of the address change and know the new
; location.
;
[general]
;
; ---- STUN Server configuration ---
; Setting the 'stunaddr' option to a valid address enables the STUN monitor.
;
;stunaddr = mystunserver.com ; Address of the STUN server to query.
; Valid form:
; [(hostname | IP-address) [':' port]]
; The port defaults to the standard STUN port (3478).
; Set to an empty value to disable STUN monitoring.
; Default is disabled.
;stunrefresh = 30 ; Number of seconds between STUN refreshes.
; Default is 30.