Commit Graph

7 Commits

Author SHA1 Message Date
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
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
David Vossel 0736871cc6 Merged revisions 291192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291192 | dvossel | 2010-10-11 16:38:39 -0500 (Mon, 11 Oct 2010) | 19 lines
  
  Gtalk enhancements and general code cleanup.
  
  This patch includes several chan_gtalk enhancements.
  Two new gtalk.conf options have been added, externip
  and stunadd.  Setting externip allows us to
  manually specify what the external IP address is
  outside of a NAT environment.  Setting the stunaddr
  option to a valid stun server allows for that external
  ip to be retrieved via a STUN server automatically.  This
  external IP is then advertised during call setup as
  a possible candidate.
  
  I have also attempted to clean up chan_gtalk's code
  so it meets our coding guidelines. During this cleanup
  I noticed several things that need to be done in the
  code and made a TODO section at the top of the file.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-11 21:39:37 +00:00
David Vossel 4be043383c This fix downgrades the ERROR message indicating no res_stun_monitor.conf to a WARNING message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-24 18:45:57 +00:00
Tilghman Lesher 5da7daf1fc Merged revisions 283175 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283175 | tilghman | 2010-08-23 07:06:26 -0500 (Mon, 23 Aug 2010) | 2 lines
  
  Don't fail to start if the config file is missing.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-23 12:09:17 +00:00
David Vossel 0f8eaa6299 Merged revisions 282269 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282269 | dvossel | 2010-08-13 15:03:56 -0500 (Fri, 13 Aug 2010) | 4 lines
  
  res_stun_monitor for monitoring network changes behind a NAT device
  
  Review: https://reviewboard.asterisk.org/r/854
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-13 20:05:44 +00:00