Fix setting CDR variables in the hangup extension

A previous CDR fix for setting CDR variables during a bridge via
custom dialplan features broke setting CDR variables in the
hangup extension. This patch fixes the issue.

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

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360724 f38db490-d61c-443f-a65b-d21fe96a405b
Introducing the log message unique call identifiers feature

Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360785 f38db490-d61c-443f-a65b-d21fe96a405b
undoing 360785 due to merging mistake

git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360786 f38db490-d61c-443f-a65b-d21fe96a405b
Introducing the log message unique call identifiers feature

Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360787 f38db490-d61c-443f-a65b-d21fe96a405b
Misc changes to make astobj2 enhancement diffs easier to follow.

* Rename astobj2 API parameter funcname to func.

* Rename astobj2 API iterator parameter to iter.

* Update some documentation for OBJ_MULTIPLE.


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360827 f38db490-d61c-443f-a65b-d21fe96a405b
Improve accuracy of identifying information sent in dialog-info SIP NOTIFY requests.

This change makes use of connected party information in addition to caller ID in order
to populate local and remote XML elements in the dialog-info NOTIFYs.

(closes issue ASTERISK-16735)
Reported by: Maciej Krajewski
Tested by: Maciej Krajewski
Patches:
    local_remote_hint2.diff uploaded by Mark Michelson (license 5049)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360872 f38db490-d61c-443f-a65b-d21fe96a405b
Fix potential race condition during call pickup.

Prior to this patch, a connected line update was queued during
call pickup and then an answer frame was queued. The original
caller would presumably then have his connected line updated
and then the call would be answered.

In actuality, the answer frame was not how the call ended up
being answered. Rather, an odd section in app_dial that checks
if the called channel's state is up.

The result is that the order of the connected line update and
the answer were variable. In most cases, this wasn't actually
a bad thing. However, if the 'I' option was passed to dial, the
connected line update would be inhibited.

The fix is to queued the connected line after the answer frame is
queued. This way the race in app_dial is between two
conditions resulting in an answer. This way the connected line
update occurs after the answer every time.

(closes issue ASTERISK-19183)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
    Mark Michelson
Patches:
    ASTERISK-19183.patch uploaded by Mark Michelson (license 5049)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360886 f38db490-d61c-443f-a65b-d21fe96a405b
Fix logger deadlock on Asterisk shutdown.

The logger_thread() had an exit path that failed to release the logmsgs
list lock.

* Make logger_thread() exit path unlock the logmsgs list lock.

* Made ast_log() not queue any messages to the logmsgs list if the
close_logger_thread flag is set.

(issue ASTERISK-19463)
Reported by: Matt Jordan
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360935 f38db490-d61c-443f-a65b-d21fe96a405b
Stop sending out RTCP if RTP is inactive

This change prevents Asterisk from sending RTCP receiver reports during a
remote bridge since it is no longer receiving media and should not be
reporting anything.

(related to ASTERISK-19366)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@360994 f38db490-d61c-443f-a65b-d21fe96a405b
Allow the Hangup manager action to match channels by regex

* Hangup now can take a regular expression as the Channel option.  If you want
  to hangup multiple channels, use /regex/ as the Channel option.  Existing
  behavior to hanging up a single channel is unchanged, but if you pass a regex,
  the manager will send you a list of channels back that were hung up.

(closes issue ASTERISK-19575)
Reported by: Mark Murawski
Tested by: Mark Murawski



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361038 f38db490-d61c-443f-a65b-d21fe96a405b
Fix dev-mode compiler warning about gnu_printf

(related to ASTERISK-19575)


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361039 f38db490-d61c-443f-a65b-d21fe96a405b
Fix the display of documentation for Transfer

This came up while fixing documentation generation for many other cases where
the argument separator was not being displayed properly.  Now that it is
displayed properly, it shows up in the wrong place for Transfer since the '/'
is only required if Tech is present.

(related to issue ASTERISK-18168)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361042 f38db490-d61c-443f-a65b-d21fe96a405b
Make the MeetMeAdmin N command (mute all nonadmins) not mute admins

(Closes Issue ASTERISK-19335)
Reported by: Johan Wilfer
Review: https://reviewboard.asterisk.org/r/1843/
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361092 f38db490-d61c-443f-a65b-d21fe96a405b
Replace GNU old-style field designator extensions to fix clang warnings

(issue ASTERISK-19540)
Reported by: Makoto Dei
Patches:
	clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)
........
Also add from the patch the portion in res_fax_spandsp that didn't apply to 1.8

Merged revisions 361142 from http://svn.asterisk.org/svn/asterisk/branches/1.8
(closes issue ASTERISK-19540)
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361155 f38db490-d61c-443f-a65b-d21fe96a405b
Make 'help devstate change' display properly (get rid of excess comma)

(closes ISSUE-ASTERISK-19444)
Reported by: Makoto Dei
Patches:
	devstate-change-usage-truncate.patch uploaded by Makoto Dei (license 5027)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361209 f38db490-d61c-443f-a65b-d21fe96a405b
Fix some stuff involving calls to memcpy and memset

The important parts of the patch were already applied through other updates.

(closes issue ASTERISK-19445)
Reported by: Makoto Dei
Patches:
	memset-memcpy-length.patch uploaded by Makoto Dei (license 5027)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361212 f38db490-d61c-443f-a65b-d21fe96a405b
Fix MusicOnHold in MeetMe so that it always uses the class if it's been defined

There were a few instances of restarting music on hold in meetme that would cause
Asterisk to revert to the default class of music on hold for no adequate reason.

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

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361279 f38db490-d61c-443f-a65b-d21fe96a405b
Remove unnecessary error message in app_dial.c

The error message for failure to stop autoservice after a gosub or macro call
during a dial was removed for macro while Asterisk 1.4 was still being actively
developed. The corresponding gosub error message was never removed.

(closes issue ASTERISK-19551)
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361331 f38db490-d61c-443f-a65b-d21fe96a405b
Fix a typo in the warning messages for an ignored media stream

Added a '\n' to the warning messages when we ignore a media stream due to the
port number being '0'.

(closes issue ASTERISK-19646)
Reported by: Badalian Vyacheslav
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361334 f38db490-d61c-443f-a65b-d21fe96a405b
Remove a few more files related to chan_usbradio and app_rpt.
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@361382 f38db490-d61c-443f-a65b-d21fe96a405b