Commit Graph

440 Commits

Author SHA1 Message Date
Richard Mudgett 745484e1b3 Fix error paths in action_hangup() for AMI Hangup action.
* Check allocation function return values for failure.  Crashing is bad.

* Tweak ast_regex_string_to_regex_pattern() parameters for proper ast_str 
usage.  


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-08 21:08:17 +00:00
Mark Michelson 14a985560e Merge changes dealing with support for Digium phones.
Presence support has been added. This is accomplished by
allowing for presence hints in addition to device state
hints. A dialplan function called PRESENCE_STATE has been
added to allow for setting and reading presence. Presence
can be transmitted to Digium phones using custom XML
elements in a PIDF presence document.

Voicemail has new APIs that allow for moving, removing,
forwarding, and playing messages. Messages have had a new
unique message ID added to them so that the APIs will work
reliably. The state of a voicemail mailbox can be obtained
using an API that allows one to get a snapshot of the mailbox.
A voicemail Dialplan App called VoiceMailPlayMsg has been
added to be able to play back a specific message.

Configuration hooks have been added. Configuration hooks
allow for a piece of code to be executed when a specific
configuration file is loaded by a specific module. This is
useful for modules that are dependent on the configuration
of other modules.

chan_sip now has a public method that allows for a custom
SIP INFO request to be sent mid-dialog. Digium phones use
this in order to display progress bars when files are played.

Messaging support has been expanded a bit. The main
visible difference is the addition of an AMI action
MessageSend.

Finally, a ParkingLots manager action has been added in order
to get a list of parking lots.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04 20:26:12 +00:00
Richard Mudgett dd2427c141 Coverity Report: Fix issues for error type REVERSE_INULL (core modules)
* Fixes findings: 0-2,5,7-15,24-26,28-31

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-31 18:39:30 +00:00
Kinsey Moore dd81b047db Resolve FORWARD_NULL static analysis warnings
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20,
22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111,
and 115. Finding numbers 26, 33, and 29 were already resolved.  Those skipped
were either extended/deprecated or in areas of code that shouldn't be
disturbed.

(Closes issue ASTERISK-19650)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 20:56:09 +00:00
Jason Parker 885fbf6b04 Prevent a potential crash when using manager hooks.
Found by me while poking at DPMA-127.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 21:49:25 +00:00
Jonathan Rose ceefcf8839 AST-2012-004: Fix an error that allows AMI users to run shell commands sans authorization.
As detailed in the advisory, AMI users without write authorization for SYSTEM class AMI
actions were able to run system commands by going through other AMI commands which did
not require that authorization. Specifically, GetVar and Status allowed users to do this
by setting their variable/s options to the SHELL or EVAL functions.
Also, within 1.8, 10, and trunk there was a similar flaw with the Originate action that
allowed users with originate permission to run MixMonitor and supply a shell command
in the Data argument. That flaw is fixed in those versions of this patch.

(closes issue ASTERISK-17465)
Reported By: David Woolley
Patches:
	162_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
	18_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
	10_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
........

Merged revisions 363117 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 14:48:22 +00:00
Matthew Jordan 3934b0478d Fix places in main where a negative return value could impact execution
This patch addresses a number of modules in main that did not handle the
negative return value from function calls adequately, or were not sufficiently
clear that the conditions leading to improper handling of the return values
could not occur.  This includes:

* asterisk.c: A negative return value from the read function would be used
directly as an index into a buffer.  We now check for success of the read
function prior to using its result as an index.

* manager.c: Check for failures in mkstemp and lseek when handling the
temporary file created for processing data returned from a CLI command in
action_command.  Also check that the result of an lseek is sanitized prior
to using it as the size of a memory map to allocate.

(issue ASTERISK-19655)
Reported by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 21:08:05 +00:00
Michael L. Young abf40d9b28 Add IPv6 address support to security events framework.
The current Security Events Framework API only supports IPv4 when it comes to
generating security events.  This patch does the following:

* Changes the Security Events Framework API to support IPV6 and updates
  the components that use this API.

* Eliminates an error message that was being generated since the current
  implementation was treating an IPv6 socket address as if it was IPv4.

* Some copyright dates were updated on files touched by this patch.

(closes issue ASTERISK-19447) 
Reported by: Michael L. Young 
Tested by: Michael L. Young 
Patches: 
  security_events_ipv6v3.diff uploaded by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-16 21:20:50 +00:00
Mark Murawki e4252eac10 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: https://origsvn.digium.com/svn/asterisk/trunk@361038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-03 19:31:25 +00:00
Kinsey Moore c5b3db1956 Kill off red blobs in most of main/*
Everything still compiled after making these changes, so I assume these
whitespace-only changes didn't break anything (and shouldn't have).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22 19:51:16 +00:00
Richard Mudgett 334f13d8b8 Allow AMI action callback to be reentrant.
Fix AMI module reload deadlock regression from ASTERISK-18479 when it
tried to fix the race between calling an AMI action callback and
unregistering that action.  Refixes ASTERISK-13784 broken by
ASTERISK-17785 change.

Locking the ao2 object guaranteed that there were no active callbacks that
mattered when ast_manager_unregister() was called.  Unfortunately, this
causes the deadlock situation.  The patch stops locking the ao2 object to
allow multiple threads to invoke the callback re-entrantly.  There is no
way to guarantee a module unload will not crash because of an active
callback.  The code attempts to minimize the chance with the registered
flag and the maximum 5 second delay before ast_manager_unregister()
returns.

The trunk version of the patch changes the API to fix the race condition
correctly to prevent the module code from unloading from memory while an
action callback is active.

* Don't hold the lock while calling the AMI action callback.

(closes issue ASTERISK-19487)
Reported by: Philippe Lindheimer

Review: https://reviewboard.asterisk.org/r/1818/
Review: https://reviewboard.asterisk.org/r/1820/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-20 17:31:28 +00:00
Terry Wilson 786f5898d1 Finalize ast_channel opaquification
Review: https://reviewboard.asterisk.org/r/1786/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 18:20:34 +00:00
Jonathan Rose 11bbc097b7 Eliminate double close of file descriptor in manager.c
The process_output function in manager.c attempted to call fclose and close immediately
afterwards. Since fclose implies close, this resulted in a potential double free on file
descriptors. This patch changes that behavior and also adds error checking to fclose and
close depending on which was deemed necessary. Also error messages. Thanks to Rosen
Iliev for pointing out the location of the problem.

(closes issue ASTERISK-18453)
Reported By: Jaco Kroon
Review: https://reviewboard.asterisk.org/r/1793/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 19:06:46 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Richard Mudgett 8af49f158a Fix AMI Redirect ExtraChannel not redirecting to the same exten and context.
The astman_get_header() never returns NULL so the check by the code for
NULL would never fail.

(closes issue ASTERISK-16974)
Reported by: Nuno Borges
Patches:
      0018325.patch (license #6116) patch uploaded by Nuno Borges (modified)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-10 18:08:19 +00:00
Mark Michelson 0f4489dc0f Fix TLS port binding behavior as well as reload behavior:
* Removes references to tlsbindport from http.conf.sample and manager.conf.sample
* Properly bind to port specified in tlsbindaddr, using the default port if specified.
* On a reload, properly close socket if the service has been disabled.

A note has been added to UPGRADE.txt to indicate how ports must be set for TLS.

(closes issue ASTERISK-16959)
reported by Olaf Holthausen

(closes issue ASTERISK-19201)
reported by Chris Mylonas

(closes issue ASTERISK-19204)
reported by Chris Mylonas

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 18:55:05 +00:00
Richard Mudgett 23bc964e1c Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 19:53:38 +00:00
Richard Mudgett 2d7a40de58 Fix memory leak in error paths for action_originate().
* Fix memory leak of vars in error paths for action_originate().

* Moved struct fast_originate_helper tech and data members to stringfields.

* Simplified ActionID header handling for fast_originate().

* Added doxygen note to ast_request() and ast_call() and the associated
channel callbacks that the data/addr parameters should be treated as const
char *.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-31 17:26:09 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Richard Mudgett 395814c33e Update AMI Getvar and Setvar documentation about supplying a channel name.
(closes issue ASTERISK-18958)
Reported by: Red
Patches:
      jira_asterisk_18958_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07 21:42:29 +00:00
Walter Doekes bac9ff62ef Fix bad quoting of multiline mxml opaque_data that caused invalid xml.
The opaque_data was added and enclosed in single quotes, assuming it
would be only a single line. The rest of the lines were appended after
the closing quote.

(closes issue ASTERISK-18852)
Reported by: peep_ on IRC

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11 21:33:54 +00:00
Richard Mudgett 067250f74c Convert registered AMI actions to ao2 objects.
* Fixed race between calling an AMI action callback and unregistering that
action.  Refixes ASTERISK-13784 broken by ASTERISK-17785 change.

* Fixed potential memory leak if an AMI action failed to get registered
because is already was registered.  Part of the ao2 conversion.

* Fixed AMI ListCommands action not walking the actions list with a lock
held.

* Fix usage of ast_strdupa() and alloca() in loops.  Excess stack usage.

* Fix AMI Originate action Variable header requiring a space after the
header colon.  Reported by Yaroslav Panych on the asterisk-dev list.

* Increased the number of listed variables allowed per AMI Originate
action Variable header to 64.

* Fixed AMI GetConfigJSON action output format.

* Fixed usage of res contents outside of scope in append_channel_vars().

* Fixed inconsistency of config file channelvars option.  The values no
longer accumulate with every channelvars option in the config file.  Only
the last value is kept to be consistent with the CLI "manager show
settings" command.

(closes issue ASTERISK-18479)
Reported by: Jaco Kroon
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11 18:57:47 +00:00
Matthew Nicholson bb07ca66a1 Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines
  
  Merged revisions 340108 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines
    
    Load the proper XML documentation when multiple modules document the same application.
    
    This patch adds an optional "module" attribute to the XML documentation spec
    that allows the documentation processor to match apps with identical names from
    different modules to their documentation. This patch also fixes a number of
    bugs with the documentation processor and should make it a little more
    efficient. Support for multiple languages has also been properly implemented.
    
    ASTERISK-18130
    Review: https://reviewboard.asterisk.org/r/1485/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:16:27 +00:00
Richard Mudgett 5d5db050f8 Merged revisions 339508 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339508 | rmudgett | 2011-10-05 11:35:02 -0500 (Wed, 05 Oct 2011) | 18 lines
  
  Merged revisions 339504,339506 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339504 | rmudgett | 2011-10-05 11:26:45 -0500 (Wed, 05 Oct 2011) | 7 lines
    
    Add missing documentation of required AMI action Challenge AuthType header.
    
    (closes issue ASTERISK-18554)
    Reported by: Vlad Povorozniuc
    Patches:
          __20110919-manager-challenge-docs.patch.txt (license #4999) patch uploaded by Leif Madsen
  ........
    r339506 | rmudgett | 2011-10-05 11:32:03 -0500 (Wed, 05 Oct 2011) | 1 line
    
    Fix XML error in AMI action Challenge.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-05 16:36:49 +00:00
Olle Johansson eeefca7f91 Generate error message when AMI action originate extension doesn't exist
Review: https://reviewboard.asterisk.org/r/1445/

Is this a bug or a new feature? No responses on Asterisk-dev so I'm 
committing to trunk only.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-04 09:43:03 +00:00
Richard Mudgett 55b70ae625 Merged revisions 337974 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r337974 | rmudgett | 2011-09-26 14:35:23 -0500 (Mon, 26 Sep 2011) | 37 lines
  
  Merged revisions 337973 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r337973 | rmudgett | 2011-09-26 14:30:39 -0500 (Mon, 26 Sep 2011) | 30 lines
    
    Fix deadlock when using dummy channels.
    
    Dummy channels created by ast_dummy_channel_alloc() should be destoyed by
    ast_channel_unref().  Using ast_channel_release() needlessly grabs the
    channel container lock and can cause a deadlock as a result.
    
    * Analyzed use of ast_dummy_channel_alloc() and made use
    ast_channel_unref() when done with the dummy channel.  (Primary reason for
    the reported deadlock.)
    
    * Made app_dial.c:dial_exec_full() not call ast_call() holding any channel
    locks.  Chan_local could not perform deadlock avoidance correctly.
    (Potential deadlock exposed by this issue.  Secondary reason for the
    reported deadlock since the held lock was part of the deadlock chain.)
    
    * Fixed some uses of ast_dummy_channel_alloc() not checking the returned
    channel pointer for failure.
    
    * Fixed some potential chan=NULL pointer usage in func_odbc.c.  Protected
    by testing the bogus_chan value.
    
    * Fixed needlessly clearing a 1024 char auto array when setting the first
    char to zero is enough in manager.c:action_getvar().
    
    (closes issue ASTERISK-18613)
    Reported by: Thomas Arimont
    Patches:
          jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett
    Tested by: Thomas Arimont
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26 19:40:12 +00:00
Olle Johansson cab155e437 Merged revisions 336441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336441 | oej | 2011-09-19 14:15:06 +0200 (Mån, 19 Sep 2011) | 9 lines
  
  Merged revisions 336440 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336440 | oej | 2011-09-19 14:06:48 +0200 (Mån, 19 Sep 2011) | 2 lines
    
    Make sure manager_debug option is reset at reload
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 12:20:44 +00:00
Matthew Nicholson ec31b52547 Merged revisions 335791 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335791 | mnicholson | 2011-09-14 08:28:50 -0500 (Wed, 14 Sep 2011) | 11 lines
  
  Merged revisions 335790 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335790 | mnicholson | 2011-09-14 08:28:16 -0500 (Wed, 14 Sep 2011) | 4 lines
    
    The tech and data members of fast_originate_helper are not string fields.
    
    ASTERISK-17709
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-14 13:29:41 +00:00
Matthew Nicholson b292ff3b32 Merged revisions 335653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335653 | mnicholson | 2011-09-13 13:47:57 -0500 (Tue, 13 Sep 2011) | 12 lines
  
  Merged revisions 335618 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335618 | mnicholson | 2011-09-13 13:20:52 -0500 (Tue, 13 Sep 2011) | 5 lines
    
    Don't limit the size of appdata for manager originate actions.
    
    ASTERISK-17709
    Patch by: tilghman (with modifications)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-13 18:49:26 +00:00
Matthew Jordan 3b53a9cdb3 Merged revisions 332817 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r332817 | mjordan | 2011-08-22 13:15:51 -0500 (Mon, 22 Aug 2011) | 4 lines
  
  Review: https://reviewboard.asterisk.org/r/1364/
  
  This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined.  It also adds initial usage of this event to app_voicemail.  The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 19:19:44 +00:00
Kinsey Moore 0208f0ac71 Merged revisions 331316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331316 | kmoore | 2011-08-10 08:48:41 -0500 (Wed, 10 Aug 2011) | 15 lines
  
  Merged revisions 331315 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331315 | kmoore | 2011-08-10 08:47:46 -0500 (Wed, 10 Aug 2011) | 8 lines
    
    AMI action ModuleReload returns Error if Module: missing or empty
    
    An empty string was not being checked for properly causing identification of
    the module to be reloaded to fail and return an Error with message
    "No such module."
    
    (closes issue AST-616)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 13:49:31 +00:00
Richard Mudgett 145c174565 Merged revisions 328329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

........
  r328329 | rmudgett | 2011-07-14 19:19:32 -0500 (Thu, 14 Jul 2011) | 2 lines
  
  Make hint watcher callback take const strings for context and exten parameters.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-15 00:23:14 +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
Kevin P. Fleming d37ac6a8a0 Merged revisions 327950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327950 | kpfleming | 2011-07-12 17:53:53 -0500 (Tue, 12 Jul 2011) | 14 lines
  
  Correct double-free situation in manager output processing.
  
  The process_output() function calls ast_str_append() and xml_translate() on its
  'out' parameter, which is a pointer to an ast_str buffer. If either of these
  functions need to reallocate the ast_str so it will have more space, they will
  free the existing buffer and allocate a new one, returning the address of the
  new one. However, because process_output only receives a pointer to the ast_str,
  not a pointer to its caller's variable holding the pointer, if the original
  ast_str is freed, the caller will not know, and will continue to use it (and
  later attempt to free it).
  
  (reported by jkroon on #asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 23:02:31 +00:00
Mark Murawki 8b20d4ffe8 New feature: AMI Action FilterAdd
This adds a new action, FilterAdd to the manager interface that allows control over event filters for the current session

(closes issue ASTERISK-16795)
Reported by: kobaz
Tested by: kobaz,loloski



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 16:46:17 +00:00
Leif Madsen 3d6c1ccd91 Merged revisions 324178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324178 | lmadsen | 2011-06-17 14:51:16 -0400 (Fri, 17 Jun 2011) | 2 lines
  
  Add Username and Secret fields to manager Login action.
  Pointed out by Vlad Povorozniuc
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-17 18:52:33 +00:00
Sean Bright affae67cd2 Merged revisions 323608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r323608 | seanbright | 2011-06-15 11:31:53 -0400 (Wed, 15 Jun 2011) | 39 lines
  
  Merged revisions 323579 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r323579 | seanbright | 2011-06-15 11:22:50 -0400 (Wed, 15 Jun 2011) | 32 lines
    
    Merged revisions 323559 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r323559 | seanbright | 2011-06-15 11:15:30 -0400 (Wed, 15 Jun 2011) | 25 lines
      
      Resolve a segfault/bus error when we try to map memory that falls on a page
      boundary.
      
      The fix for ASTERISK-15359 was incorrect in that it added 1 to the length of the
      mmap'd region.  The problem with this is that reading/writing to that extra byte
      outside of the bounds of the underlying fd causes a bus error.
      
      The real issue is that we are working with both a FILE * and the raw fd
      underneath it and not synchronizing between them.  The code that was removed in
      ASTERISK-15359 was correct, but we weren't flushing the FILE * before mapping
      the fd.
      
      Looking at the manager code in 1.4 reveals that the FILE * in 'struct
      mansession' is never used except to create a temporary file that we immediately
      fdopen.  This means we just need to write a 0 byte to the fd and everything will
      just work.  The other branches require a call to fflush() which, while not a
      guaranteed fix, should reduce the likelihood of a crash.
      
      This all makes sense in my head.
      
      (closes issue ASTERISK-16460)
      Reported by: Ravelomanantsoa Hoby (hoby)
      Patches:
      		issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license #5060)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 15:33:57 +00:00
Richard Mudgett 0096238b52 Merged revisions 320823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320823 | rmudgett | 2011-05-25 12:06:38 -0500 (Wed, 25 May 2011) | 18 lines
  
  The AMI Newstate event contains different information between v1.4 and v1.8.
  
  The addition of connected line support in v1.8 changes the behavior of the
  channel caller ID somewhat.  The channel caller ID value no longer time
  shares with the connected line ID on outgoing call legs.  The timing of
  some AMI events/responses output the connected line ID as caller ID.
  These party ID's are now separate.
  
  * The ConnectedLineNum and ConnectedLineName headers were added to many
  AMI events/responses if the CallerIDNum/CallerIDName headers were also
  present.
  
  (closes issue #18252)
  Reported by: gje
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1227/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 17:14:11 +00:00
Richard Mudgett 024e4bd0f7 Merged revisions 320650 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320650 | rmudgett | 2011-05-23 12:53:44 -0500 (Mon, 23 May 2011) | 16 lines
  
  Add ConnectedLineNum/Name headers to output of AMI action Status.
  
  * Add ConnectedLineNum and ConnectedLineName headers to the output of the
  AMI action Status.  This makes it easier to find out who the channel is
  connected to without having to lookup BridgedChannel or when they are
  connected to an application (e.g.: VoiceMail) which has no bridged
  channel.
  
  * Bridged channels with no CallerID had "" instead of "<unknown>" output,
  that might be a bug as "<unknown>" was what older versions used.
  
  (closes issue #18158)
  Reported by: gareth
  Patches:
        svn-292308.diff uploaded by gareth (license 208)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23 18:00:02 +00:00
Russell Bryant 19b45ad446 Merged revisions 317425 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317425 | russell | 2011-05-05 16:53:13 -0500 (Thu, 05 May 2011) | 7 lines
  
  Add missing ActioID handling to Events action.
  
  (closes issue #18949)
  Reported by: edersohe
  Patches:
        0018949.patch uploaded by edersohe (license 1228)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 21:54:17 +00:00
Sean Bright fe5938c51e Merged revisions 316917-316919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316917 | seanbright | 2011-05-04 22:23:28 -0400 (Wed, 04 May 2011) | 5 lines
  
  Make sure that tcptls_session is properly initialized.
  
  (issue #18598)
  Reported by: ksn
........
  r316918 | seanbright | 2011-05-04 22:25:20 -0400 (Wed, 04 May 2011) | 5 lines
  
  Look at the correct buffer for our digest info instead of an empty one.
  
  (issue #18598)
  Reported by: ksn
........
  r316919 | seanbright | 2011-05-04 22:30:45 -0400 (Wed, 04 May 2011) | 10 lines
  
  Use the correct HTTP method when generating our digest, otherwise we always fail.
  
  When calculating the 'A2' portion of our digest for verification, we need the
  HTTP method that is currently in use.  Unfortunately our mapping function was
  incorrect, resulting in invalid hashes being generated and, in turn, failures
  in authentication.
  
  (closes issue #18598)
  Reported by: ksn
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 02:34:29 +00:00
Sean Bright 34734f727f Merged revisions 316663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316663 | seanbright | 2011-05-04 10:35:05 -0400 (Wed, 04 May 2011) | 8 lines
  
  Only return a single error via AMI when requesting a forbidden action.
  
  (closes issue #19216)
  Reported by: oej
  Patches:
        issue19216-1.8-r316204.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-04 14:40:08 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Sean Bright a52395aaee Merged revisions 316206 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316206 | seanbright | 2011-05-03 14:17:36 -0400 (Tue, 03 May 2011) | 8 lines
  
  If we aren't interested in events, don't generate the FullyBooted event on AMI login.
  
  (closes issue #19089)
  Reported by: bklang
  Patches:
        issue19089-1.8-r316204.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 18:23:03 +00:00
Matthew Nicholson 079e794b1c Merged revisions 314628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r314628 | mnicholson | 2011-04-21 13:24:05 -0500 (Thu, 21 Apr 2011) | 27 lines
  
  Merged revisions 314620 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r314620 | mnicholson | 2011-04-21 13:22:19 -0500 (Thu, 21 Apr 2011) | 20 lines
    
    Merged revisions 314607 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r314607 | mnicholson | 2011-04-21 13:19:21 -0500 (Thu, 21 Apr 2011) | 14 lines
      
      Added limits to the number of unauthenticated sessions TCP based protocols are allowed to have open simultaneously.  Also added timeouts for unauthenticated sessions where it made sense to do so.
      
      Unrelated, the manager interface now properly checks if the user has the "system" privilege before executing shell commands via the Originate action. 
      
      AST-2011-005
      AST-2011-006
      
      (closes issue #18787)
      Reported by: kobaz
      
      (related to issue #18996)
      Reported by: tzafrir
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:32:50 +00:00
Matthew Nicholson a77fd545ab Merged revisions 312766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r312766 | mnicholson | 2011-04-05 09:14:50 -0500 (Tue, 05 Apr 2011) | 22 lines
  
  Merged revisions 312764 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r312764 | mnicholson | 2011-04-05 09:13:07 -0500 (Tue, 05 Apr 2011) | 15 lines
    
    Merged revisions 312761 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r312761 | mnicholson | 2011-04-05 09:10:34 -0500 (Tue, 05 Apr 2011) | 8 lines
      
      Limit the number of unauthenticated manager sessions and also limit the time they have to authenticate.
      
      AST-2011-005
      
      (closes issue #18996)
      Reported by: tzafrir
      Tested by: mnicholson
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-05 14:16:21 +00:00