summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
2012-07-31Add "setvar" option to manager.conf.Mark Michelson
With this option set, channel variables can be set on every manager originate. The Variable header can still be used to set additional channel variables for individual calls if desired. This work was completed by Olle Johansson on review board. I have applied the review feedback and am committing it in order to get this into trunk before Asterisk 11 is branched. Review: https://reviewboard.asterisk.org/r/1412 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11Named ACLs: Introduces a system for creating and sharing ACLsJonathan Rose
This patch adds Named ACL functionality to Asterisk. This allows system administrators to define an ACL and refer to it by a unique name. Configurable items can then refer to that name when specifying access control lists. It also includes updates to all core supported consumers of ACLs. That includes manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk by Olle E. Johansson and provides a subset of the Named ACL functionality implemented in that branch. For more information on this feature, see acl.conf and/or the Asterisk wiki. Review: https://reviewboard.asterisk.org/r/1978/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-10Add some additional documentation for core AMI eventsMatthew Jordan
This patch adds some basic documentation for a number of modules. This includes core source files in Asterisk (those in main), as well as chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri. The DTD has also been updated to allow referencing of AMI commands. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Update "manager show event" to support tab completionMatthew Jordan
Thank you rmudgett for pointing out that I was missing this in the initial check-in for AMI event documentation (r369346) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Add AMI event documentationMatthew Jordan
This patch adds the core changes necessary to support AMI event documentation in the source files of Asterisk, and adds documentation to those AMI events defined in the core application modules. Event documentation is built from the source by two new python scripts, located in build_tools: get_documentation.py and post_process_documentation.py. The get_documentation.py script mirrors the actions of the existing AWK get_documentation scripts, except that it will scan the entirety of a source file for Asterisk documentation. Upon encountering it, if the documentation happens to be an AMI event, it will attempt to extract information about the event directly from the manager event macro calls that raise the event. The post_process_documentation.py script combines manager event instances that are the same event but documented in multiple source files. It generates the final core-[lang].xml file. As this process can take longer to complete than a typical 'make all', it is only performed if a new make target, 'full', is chosen. Review: https://reviewboard.asterisk.org/r/1967/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-20Add IPv6 Support To ManagerMichael L. Young
This patch adds IPv6 support to AMI. (Closes issue ASTERISK-19965) Reported by: Michael L. Young Tested by: Michael L. Young Patches: ami_ipv6_v3.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/1968/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-08Fix error paths in action_hangup() for AMI Hangup action.Richard Mudgett
* 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-04Merge changes dealing with support for Digium phones.Mark Michelson
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-05-31Coverity Report: Fix issues for error type REVERSE_INULL (core modules)Richard Mudgett
* 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-10Resolve FORWARD_NULL static analysis warningsKinsey Moore
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-01Prevent a potential crash when using manager hooks.Jason Parker
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-04-23AST-2012-004: Fix an error that allows AMI users to run shell commands sans ↵Jonathan Rose
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-17Fix places in main where a negative return value could impact executionMatthew Jordan
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-16Add IPv6 address support to security events framework.Michael L. Young
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-03Allow the Hangup manager action to match channels by regexMark Murawki
* 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-03-22Kill off red blobs in most of main/*Kinsey Moore
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-20Allow AMI action callback to be reentrant.Richard Mudgett
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-13Finalize ast_channel opaquificationTerry Wilson
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-05Eliminate double close of file descriptor in manager.cJonathan Rose
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-02-29Opaquify ast_channel structs and listsTerry Wilson
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-20ast_channel opaquification of pointers and integral typesTerry Wilson
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-14Re-commit the verbose branch.Tilghman Lesher
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-13Opaquify char * and char[] in ast_channelTerry Wilson
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-10Fix AMI Redirect ExtraChannel not redirecting to the same exten and context.Richard Mudgett
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-02Fix TLS port binding behavior as well as reload behavior:Mark Michelson
* 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-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-31Fix memory leak in error paths for action_originate().Richard Mudgett
* 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-24Opaquify channel stringfieldsTerry Wilson
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-09Replace direct access to channel name with accessor functionsTerry Wilson
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
2011-12-07Update AMI Getvar and Setvar documentation about supplying a channel name.Richard Mudgett
(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-11-11Fix bad quoting of multiline mxml opaque_data that caused invalid xml.Walter Doekes
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-10-11Convert registered AMI actions to ao2 objects.Richard Mudgett
* 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-10Merged revisions 340109 via svnmerge from Matthew Nicholson
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-05Merged revisions 339508 via svnmerge from Richard Mudgett
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-04Generate error message when AMI action originate extension doesn't existOlle Johansson
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-09-26Merged revisions 337974 via svnmerge from Richard Mudgett
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-19Merged revisions 336441 via svnmerge from Olle Johansson
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-14Merged revisions 335791 via svnmerge from Matthew Nicholson
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-13Merged revisions 335653 via svnmerge from Matthew Nicholson
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-08-22Merged revisions 332817 via svnmerge from Matthew Jordan
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-10Merged revisions 331316 via svnmerge from Kinsey Moore
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-07-15Merged revisions 328329 via svnmerge from Richard Mudgett
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-14Merged revisions 328247 via svnmerge from Leif Madsen
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-12Merged revisions 327950 via svnmerge from Kevin P. Fleming
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-05New feature: AMI Action FilterAddMark Murawki
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-06-17Merged revisions 324178 via svnmerge from Leif Madsen
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-15Merged revisions 323608 via svnmerge from Sean Bright
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-05-25Merged revisions 320823 via svnmerge from Richard Mudgett
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-23Merged revisions 320650 via svnmerge from Richard Mudgett
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