aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/cli.h
AgeCommit message (Collapse)AuthorFilesLines
2010-09-04Merged revisions 285057 via svnmerge from russell1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285057 | russell | 2010-09-04 13:08:19 -0500 (Sat, 04 Sep 2010) | 2 lines Add a C++ compatible version of AST_CLI_DEFINE(). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@285058 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-12Convert to AST_CLI_YESNO and AST_CLI_ONOFFpabelanger1-0/+7
Clean up chan_sip.c to use new AST_CLI functions (closes issue #17287) Reported by: pabelanger Patches: issue17287.patch uploaded by pabelanger (license 224) Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262613 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-05New 'manager show settings' CLI command.pabelanger1-0/+7
See the CHANGES file for more details. (closes issue #16343) Reported by: pabelanger Patches: issue16343.patch.v5 uploaded by pabelanger (license 224) Tested by: pabelanger, tilghman, lmadsen Review: https://reviewboard.asterisk.org/r/630/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261180 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-23Correct example for CLI autocompletion (generation)kpfleming1-2/+2
Reported by Atis on #asterisk-dev git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196488 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-17/+15
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-01Introduce CLI permissions.eliel1-3/+19
Based on cli_permissions.conf configuration file, we are able to permit or deny cli commands based on some patterns and the local user and group running rasterisk. (Sorry if I missed some of the testers). Reviewboard: http://reviewboard.digium.com/r/11/ (closes issue #11123) Reported by: eliel Tested by: eliel, IgorG, Laureano, otherwiseguy, mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160062 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29incorporates r159808 from branches/1.4:kpfleming1-1/+1
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12This commit does two things:mvanbaak1-6/+0
- Add CLI aliases module to asterisk. - Remove all deprecated CLI commands from the code Initial work done by file. Junk-Y and lmadsen did a lot of work and testing to get the list of deprecated commands into the configuration file. Deprecated CLI commands are now handled by this new module, see cli_aliases.conf for more info about that. ok russellb@ via reviewboard (closes issue #13735) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Remove "old"-style CLI handler, since nothing uses it anymore.qwell1-35/+15
Closes issue #11403, patch by eliel. This also completes the janitor project. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90038 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-2/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Doxygen fixes.qwell1-5/+9
Also fix a common typo I kept seeing (arguement) in various files. Closes issue #11222, patch by snuffy (with arguement > argument by me). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89202 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-2/+2
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-21Merged revisions 85532 via svnmerge from russell1-1/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines Properly handle the case where read() may return the text for more than one CLI command at once for a remote console. (closes issue #10888) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-2/+2
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes torussell1-14/+20
use the \retval tag for documenting return values, fixing various warnings when generating the documentation, and various other things. (closes issue #10203, snuffy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-13This introduces a new dialplan function, DEVSTATE, which allows you to do somerussell1-2/+2
pretty cool things. First, you can get the device state of anything in the dialplan: NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)}) NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)}) Most importantly, this allows you to create custom device states so you can control phone lamps directly from the dialplan. Set(DEVSTATE(Custom:mycustomlamp)=BUSY) ... exten => mycustomlamp,hint,Custom:mycustomlamp git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54261 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-13- Constify the format string passed to ast_cli()russell1-1/+1
- Simplify printing out the warranty and license git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54147 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06Make the "usage" member of the ast_cli_entry struct const to resolve a compilerrussell1-1/+1
warning. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48299 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-18Move this macro from cli.c to cli.h so apps can use itrizzo1-0/+7
without duplicating the macro or the code: /*! * In many cases we need to print singular or plural * words depending on a count. This macro helps us e.g. * printf("we have %d object%s", n, ESS(n)); */ #define ESS(x) ((x) == 1 ? "" : "s") git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47827 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-17introduce a bit of regexp support in the internal CLI api.rizzo1-1/+1
Now you can specify a cli command as "console autoanswer [on|off]" which means the on|off argument is optional, or "console {mute|unmute}" which means the mute|unmute argument is mandatory. The blocks in [] or {} do not necessarily need to be at the end of the string. Completions for the variant parts are generated automatically. This should significantly simplify the implementation of the various handlers. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47787 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-15one more step cleaning the internal CLI interface:rizzo1-1/+3
the NEW_CLI macro now supports extra arguments (to deprecate other commands). use this to implement unload and reload, and remove some unused functions. usual completion fixes (as these function accept multiple arguments). The summary is still a bit inconsistent. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47654 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-15update the internal cli api following comments from kevin.rizzo1-51/+37
This change basically simplifies the interface of the new-style handler removing almost all the tricks used in the previous implementation to achieve backward compatibility (which is still present and guaranteed.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47652 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-14need to check quoting in the doxygen docs...oej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47611 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-14Some improvements to doxygen docsoej1-9/+22
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47610 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-14Bring in the improved internal API for the CLI.rizzo1-10/+117
WATCH OUT: this changes the binary interface (ABI) for modules, so e.g. users of g729 codecs need a rebuilt module (but read below). The new way to write CLI handlers is described in detail in cli.h, and there are a few converted handlers in cli.c, look for NEW_CLI. After converting a couple of commands i am convinced that it is reasonably convenient to use, and it makes it easier to fix the pending CLI issues. On passing, note a bug with the current 'complete' architecture: if a command is a prefix of multiple CLI entries, we miss some of the possible options. As an example, "core set debug" can continue with "channel" from one CLI entry, and "off" or "atleast" from another one. We address this problem in a separate commit (when i have figured out a fix, that is). ABI issues: I asked Kevin if it was ok to make this change and he said yes. While it would have been possible to make the change without breaking the module ABI, the code would have been more convoluted. I am happy to restore the old ABI (while still being able to use the "new style" handlers) if there is demand. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47606 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-31removal of trailing whitespace and useless 'extern'rizzo1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16653 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28bring in the code that was discussed on Mantis #6068,rizzo1-0/+19
which is the basis for several simplifications and fixes to the CLI interfaces. The core is in cli.c, some documentation on a new function to help command completion is in cli.h, and one line of glue code in the other two files. Next step is to bring in the patches described in #6066 and other simplifications. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15817 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-16add StopMixMonitor application (issue #6122, with mods)russell1-0/+9
Rename and export ast_complete_channels for use by cli completion functions that want to complete from the list of active channels git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10287 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14more list macro conversion (issue #6361, plus documentation for new macro)kpfleming1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10067 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18constify arguments in more places where strings should not be modified ↵russell1-7/+6
(issue #6286) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18cli.h cleanup and additional documentationmogorman1-15/+43
from patch 6272 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8179 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-13/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.kpfleming1-7/+16
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6454 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-15add functions to register/unregister multiple CLI commands in a single ↵kpfleming1-6/+19
operation (bug #4255, with minor mods) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5662 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15Repair // comments to /* */ comments (bug #3347)markster1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2004-04-06Remove size restiction on remote console command completion (bug 1360)citats1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2634 f38db490-d61c-443f-a65b-d21fe96a405b
2003-09-10Fix small logic errors (bug #242)markster1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1494 f38db490-d61c-443f-a65b-d21fe96a405b
2002-11-27Version 0.3.0 from FTPmarkster1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@555 f38db490-d61c-443f-a65b-d21fe96a405b
2002-04-04Version 0.1.12 from FTPmarkster1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@429 f38db490-d61c-443f-a65b-d21fe96a405b
2001-10-31Version 0.1.10 from FTPmarkster1-12/+28
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@380 f38db490-d61c-443f-a65b-d21fe96a405b
1999-12-19Version 0.1.1 from FTPmarkster1-0/+66
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142 f38db490-d61c-443f-a65b-d21fe96a405b