summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵Tilghman Lesher
microsecond, instead of only to the second git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09Make sure the idText variable is empty, and put it in the right place for ↵Joshua Colp
the manager ack packet. (issue #10152 reported by srt) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02After some discussion on the asterisk-dev list, we determined that this approachRussell Bryant
for extracting application, function, manager, and agi documentation is the wrong one to take. The most severe problem is that the output depends on which modules are loaded as well as compile time options, which both determine which parts are available. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Add a CLI command to dump the built-in manager action documentationRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Merged revisions 72926 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72926 | russell | 2007-07-02 13:18:46 -0500 (Mon, 02 Jul 2007) | 3 lines Remove a bogus comment and add proper locking to the handler function for the CLI command to show information on manager actions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29Merge changes from team/russell/http_filetxferRussell Bryant
Handle transferring large files from the built-in http server. Previously, the code attempted to malloc a block as large as the file itself. Now it uses the sendfile() system call so that the file isn't copied into userspace at all if it is available. Otherwise, it just uses a read/write of small chunks at a time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29Merged revisions 72556 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72556 | tilghman | 2007-06-28 23:47:11 -0500 (Thu, 28 Jun 2007) | 2 lines Issue 10055 - Change memory allocation to use the heap for a command, since the output has the potential to overflow the stack (as it did here) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Conversions to ast_debug()Russell Bryant
(issue #9984, patches from eliel and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Merged revisions 71289 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71289 | tilghman | 2007-06-24 12:39:34 -0500 (Sun, 24 Jun 2007) | 10 lines Merged revisions 71288 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71288 | tilghman | 2007-06-24 12:32:21 -0500 (Sun, 24 Jun 2007) | 2 lines Issue 10043 - There is a legitimate need to be able to set variables to the empty string. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21Add manager events for RTCP statistics.Jason Parker
Also adds a new "reporting" permission for manager, since it can be incredibly spammy. This permission was discussed on the -dev mailing list some months back. Issue 8613, patch by johann8384, with some minor changes by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Merged revisions 69392 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines use ast_localtime() in every place localtime_r() was being used ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Couple of manager ssl options weren't loading because of a typo.Brett Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11Change displayconnects option in manager.conf to be per-user.Jason Parker
Issue 9932, patch by eliel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11Add username completion for manager show user CLI command. (issue #9929 ↵Joshua Colp
reported by eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07Fix a bunch of doxygen errors and document more thingsRussell Bryant
(issue #9842, snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Minor formatting change to test closing mantis issues through commit tagsRussell Bryant
(closes issue #9828) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Minor formatting change to test closing mantis issues through commit tagsRussell Bryant
(closes issue #9828) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Make sure we default allowmultiplelogin to on/yes, per the default stated in ↵Jason Parker
the config. Issue 9885, patch by eliel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24Add a new API call for creating detached threads. Then, go replace all of theRussell Bryant
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24Merged revisions 65902 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r65902 | file | 2007-05-24 11:27:23 -0400 (Thu, 24 May 2007) | 2 lines Add the ability to blacklist certain commands from being executed using the Command AMI action. (issue #9240 reported by junky) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17Add an option that lets you only allow one connection at a time for eachRussell Bryant
manager user. (issue #8664, reported and original patch by ssokol, patch updated by bkruse, and further updated by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Merged revisions 63982 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63982 | qwell | 2007-05-11 15:16:17 -0500 (Fri, 11 May 2007) | 7 lines Hide manager password from "manager show user foo". I realize that there are other ways to get this, but we really don't need to just show it in plain text so easily. Issue 9273, patch by junky ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Merged revisions 63886 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63886 | russell | 2007-05-11 11:05:43 -0500 (Fri, 11 May 2007) | 6 lines When MD5 authentication is not possible because there is no challenge present, either because the Challenge action was never issued, or some other reason, give a proper error message and return an error instead of claiming that the user wasn't found. (reported by jsmith on IRC) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10Merged revisions 63804 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63804 | russell | 2007-05-10 17:23:42 -0500 (Thu, 10 May 2007) | 4 lines Strip terminal escape sequences from CLI command output that is going to be sent out over the manager interface. (issue #9659, reported by pari, fixed by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04Convert spaces to tabs for indentation.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04Add "CoreStatus" - from the moremanager branch.Olle Johansson
This can be extended with more information, ideas and patches are welcome, as usual :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-04- Add manager command CoreSettingsOlle Johansson
- Add missing option to options.h - Add missing variables to asterisk.h - Move manager version to manager.h include file git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24Merged revisions 61787 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r61787 | russell | 2007-04-24 16:34:53 -0500 (Tue, 24 Apr 2007) | 12 lines Merged revisions 61786 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61786 | russell | 2007-04-24 16:33:59 -0500 (Tue, 24 Apr 2007) | 4 lines Don't crash if a manager connection provides a username that exists in manager.conf but does not have a password, and also requests MD5 authentication. (ASA-2007-012) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-23When building a JSON encoded string in the GetConfigJSON manager action, escapeRussell Bryant
the '\' and '"' characters. (issue #9475, reported by pari, patch by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20Merged revisions 61690 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61690 | russell | 2007-04-20 13:19:18 -0500 (Fri, 20 Apr 2007) | 4 lines Fix the UpdateConfig manager action to properly treat "variables" and "objects" differently (a=b versus a=>b). (issue #9568, reported by pari, patch by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19Merged revisions 61683 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61683 | tilghman | 2007-04-18 23:36:20 -0500 (Wed, 18 Apr 2007) | 2 lines Bug 9557 - simple reason why reading a function always returned NULL ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10Issue 6082 - New DTMF event for managerTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09Add hint to ExtensionStatus AMI event in managerOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06Merged revisions 60603 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines To be able to achieve the things that we would like to achieve with the Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04Merged revisions 60137 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r60137 | russell | 2007-04-04 12:40:10 -0500 (Wed, 04 Apr 2007) | 14 lines Merged revisions 60134 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60134 | russell | 2007-04-04 12:38:47 -0500 (Wed, 04 Apr 2007) | 6 lines It is valid to redirect channels via the manager interface that are not in the UP state. Instead of checking for that to prevent to ensure a dead channel doesn't get redirected, just use the ast_check_hangup() API call. (issue #9457, reported by Callmewind, patch by me) (related to issue #8977) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07Merged revisions 58165 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r58165 | russell | 2007-03-06 18:25:19 -0600 (Tue, 06 Mar 2007) | 12 lines Merged revisions 58164 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r58164 | russell | 2007-03-06 18:20:13 -0600 (Tue, 06 Mar 2007) | 4 lines If the channels acquired using the manager Redirect action are not up, then don't attempt to do anything with them. It could lead to weird behavior, including crashes. (issue #8977) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24Doxygen updates and correctionsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23Introduce a new manager action, GetConfigJSON, which is intended to improveRussell Bryant
performance of the GUI. This encodes the configuration into the JSON format in a manager header, "JSON: ". The encoded information can be directly used as a javascript object, so no parsing is needed. For large configuration files, this can greatly improve loading times in the GUI. Furthermore, the encoding takes up a lot less space when being transmitted than the other alternatives. (Inspired by discussion with Pari) Here is an example of what you get: http://localhost:8088/asterisk/rawman?action=getconfigjson&filename=users.conf Response: Success JSON: {"general":["hasvoicemail=yes"],"6000":["fullname=russell","secret=1234"]} git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16Properly handle an error result from a manager action. This could have left ↵Joshua Colp
the action list permanently locked for reading. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14New CLI command "Core show settings" to list some core settingsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-08It is with pleasure that I announce the return of rawman support through the ↵Joshua Colp
HTTP server. (issue #9013 reported by Jynger) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-06Merged revisions 53246 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53246 | tilghman | 2007-02-06 01:00:52 -0600 (Tue, 06 Feb 2007) | 10 lines Merged revisions 53245 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53245 | tilghman | 2007-02-06 00:58:28 -0600 (Tue, 06 Feb 2007) | 2 lines Issue 8987 - Status could return two responses (mnicholson) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31Merged revisions 53046 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines Merged revisions 53045 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29Merged revisions 52688 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r52688 | russell | 2007-01-29 16:55:41 -0600 (Mon, 29 Jan 2007) | 3 lines Remove a recursive lock of the manager session. This was pointed out by zandbelt in issue #8711. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29The changes for trunk are less extensive, but includeRussell Bryant
- changing the actionlock to a rwlock - not locking the session before doing the action callback The crash issue in 8711 should not be an issue here. Merged revisions 52611 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r52611 | russell | 2007-01-29 14:39:20 -0600 (Mon, 29 Jan 2007) | 10 lines The session lock can not be held while calling action callbacks. If so, then when the WaitEvent callback gets called, then no event can happen because the session can't be locked by another thread. Also, the session needs to be locked in the HTTP callback when it reads out the output string. This fixes the deadlock reported in both 8711 and 8934. Regarding issue 8711, there still may be an issue. If there is a second action requested before the processing of the first action is finished, there could still be some corruption of the output string buffer used to build the result. (issue #8711, #8934) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24Close file after we do the translation, and map memory for both ↵Joshua Colp
reading/writing. (issue #8886 reported by cwegener) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23Merged revisions 51781 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51781 | russell | 2007-01-23 16:04:01 -0600 (Tue, 23 Jan 2007) | 6 lines Fix some bugs in process_message(). The manager session lock needs to be held when sending some sort of response, or calling one of the manager action callbacks. This resolves an issue where people using the GUI would get random crashes when they start clicking around a lot. (issue #8711, reported and debugged by zandbelt) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23Merged revisions 51750 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51750 | russell | 2007-01-23 15:33:15 -0600 (Tue, 23 Jan 2007) | 4 lines When traversing the list of manager actions, the iterator needs to be initialized to the list head *after* locking the list. Also, lock the actions list in one place it is being accessed where it was not being done. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19Break out of the config processing loop for manager.conf once the correct userRussell Bryant
has been found so that 'cat' is non-NULL. This way, users.conf is only checked when necessary. (issue #8852, akohlsmith, committed patch a bit different) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51296 65c4cc65-6c06-0410-ace0-fbb531ad65f3