chan_ooh323: fix rtptimeout general value checking

correct condition to check rtptimeout in [general] config section

ASTERISK-24393 #close
Reported by:  Dmitry Melekhov
Tested by:  Dmitry Melekhov
Patches:
  ASTERISK-24393.patch
........

Merged revisions 425547 from http://svn.asterisk.org/svn/asterisk/branches/1.8
res_rtp_asterisk: Fix a bug where ICE state would get reset when it shouldn't.

In the case where the ICE negotiation had not yet started current state would
get wiped when it shouldn't.

This also removes channel binding as in practice this does not work well with
other implementations.
Fix loss of voice after second call drops (on a second line) in case using multiple lines on unistim phones. There is regression was introduced in r391379.

Reported by: Rustam Khankishyiev
(closes issue ASTERISK-23846)
channels/chan_sip: Respect outboundproxy setting when sending qualify requests

The outboundproxy setting is currently ignored when sending OPTIONS requests
as a result of the qualify setting. This means that if an Asterisk server is
unable to send the packet directly to a peer, it is unable to qualify any
non-inbound registered peer (e.g. a peer SIP Trunk).

This patch grabs the outboundproxy information for a peer when a qualify
attempt is being constructed and, if it finds the information, uses it
when sending the OPTIONS request.

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

ASTERISK-24063 #close
Reported by: Damian Ivereigh
patches:
  outboundproxy-dai.patch uploaded by Damian Ivereigh (License 6632)
........

Merged revisions 425818 from http://svn.asterisk.org/svn/asterisk/branches/1.8
AST-2014-011: Fix POODLE security issues

There are two aspects to the vulnerability:
(1) res_jabber/res_xmpp use SSLv3 only. This patch updates the module to use
    TLSv1+. At this time, it does not refactor res_jabber/res_xmpp to use the
    TCP/TLS core, which should be done as an improvement at a latter date.
(2) The TCP/TLS core, when tlsclientmethod/sslclientmethod is left unspecified,
    will default to the OpenSSL SSLv23_method. This method allows for all
    encryption methods, including SSLv2/SSLv3. A MITM can exploit this by
    forcing a fallback to SSLv3, which leaves the server vulnerable to POODLE.
    This patch adds WARNINGS if a user uses SSLv2/SSLv3 in their configuration,
    and explicitly disables SSLv2/SSLv3 if using SSLv23_method.

For TLS clients, Asterisk will default to TLSv1+ and WARN if SSLv2 or SSLv3 is
explicitly chosen. For TLS servers, Asterisk will no longer support SSLv2 or
SSLv3.

Much thanks to abelbeck for reporting the vulnerability and providing a patch
for the res_jabber/res_xmpp modules.

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

ASTERISK-24425 #close
Reported by: abelbeck
Tested by: abelbeck, opsmonitor, gtjoseph
patches:
  asterisk-1.8-jabber-tls.patch uploaded by abelbeck (License 5903)
  asterisk-11-jabber-xmpp-tls.patch uploaded by abelbeck (License 5903)
  AST-2014-011-1.8.diff uploaded by mjordan (License 6283)
  AST-2014-011-11.diff uploaded by mjordan (License 6283)
res/res_srtp: Fix include issue for libsrtp 1.5.0

In libsrtp 1.5.0, crypto_get_random is no longer resolved simply by including
srtp.h. Now, one must include crypto_kernel.h as well. As it turns out, this
header file has been provided by the library since 2006, so this is a
relatively benign change.

ASTERISK-24436 #close
Reported by: Patrick Laimbock
........

Merged revisions 426140 from http://svn.asterisk.org/svn/asterisk/branches/1.8
res/res_http_websocket: Fix minor nits found by wdoekes on r409681

When Moises committed the fixes for WSS (which was a great patch), wdoekes had
a few style nits that were on the review that got missed. This patch resolves
what I *think* were all of the ones that were still on the review.

Thanks to both moy for the patch, and wdoekes for the reviews.

Review: https://reviewboard.asterisk.org/r/3248/
app_queue: Cleanup ao2_iterator

Clean ao2_iterator, resolving reference leak to queue members.

ASTERISK-24454 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4111/
ASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample
ASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL
main/manager: Fix typo in AMI event documentation of "OriginateResponse"

The parameter name is "Response", not "Resonse".

ASTERISK-24430 #close
Reported by: Dafi Ni
ASTERISK-23512, correct inaccurate comment in manager.conf.sample
res_fax: Resolve T38 gateway frame leak.

When frames are translated by a fax gateway they need to be freed.  The
existing call to ast_frfree was unreachable.  This change reorganizes
fax_gateway_framehook to ensure that ast_frfree is called when needed.

ASTERISK-24457 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4115/
channels/chan_sip: Support mutltiple Supported and Required headers

A SIP request may contain multiple Supported: and Required: headers. Currently,
chan_sip only parses the first Supported/Required header it finds. This patch
adds support for multiple Supported/Required headers for INVITE requests.

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

ASTERISK-21721 #close
Reported by: Olle Johansson
patches:
  rb2478.patch uploaded by oej (License 5267)
........

Merged revisions 426594 from http://svn.asterisk.org/svn/asterisk/branches/1.8
channels/chan_sip: Add improved support for 4xx error codes

This patch adds support for 414, 493, 479, and a stray 400 response in REGISTER
response handling. This helps interoperability in a number of scenarios.

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

patches:
  rb3437.patch uploaded by oej (License 5267)
........

Merged revisions 426599 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Add additional checks for NULL pointers to fix several crashes reported.

ASTERISK-24304 #close
Reported by: dhanapathy sathya
app_voicemail: Fix unchecked bounds of myArray in IMAP_STORAGE.

In update_messages_by_imapuser(), messages were appended to a finite
array which resulted in a crash when an IMAP mailbox contained more
than 256 entries. This memory is now dynamically increased as needed.

Observe that this patch adds a bunch of XXX's to questionable code. See
the review (url below) for more information.

ASTERISK-24190 #close
Reported by: Nick Adams
Tested by: Nick Adams

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

Merged revisions 426691 from http://svn.asterisk.org/svn/asterisk/branches/1.8
app_queue: fix a couple leaks to struct call_queue in set_member_value

set_member_value has a couple leaks to references in the variable q
found through testsuite tests/queues/set_penalty.  Also remove the
REF_DEBUG_ONLY_QUEUES compiler declaration, this is no longer possible
with the updated REF_DEBUG code.

ASTERISK-24466 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4125/
REF_DEBUG: Install refcounter.py to $(ASTDATADIR)/scripts

This change ensures refcounter.py is installed to a place where it
can be found by the Asterisk testsuite if REF_DEBUG is enabled.

ASTERISK-24432 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4094/
........

Merged revisions 426830 from http://svn.asterisk.org/svn/asterisk/branches/1.8
channels/sip/reqresp_parser: Fix unit tests for r426594

When r426594 was made, it did not take into account a unit test that verified
that the function properly populated the unsupported buffer. The function
would previously memset the buffer if it detected it had any contents; since
this function can now be called iteratively on successive headers, the unit
tests would now fail. This patch updates the unit tests to reset the buffer
themselves between successive calls, and updates the documentation of the
function to note that this is now required.
........

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