summaryrefslogtreecommitdiff
path: root/include/asterisk/cli.h
AgeCommit message (Collapse)Author
2015-05-04CLI: Enable automatic references to modules.Corey Farrell
* Pass module to ast_cli_register and ast_cli_register_multiple. * Add a module reference before executing any CLI callback, remove the reference when complete. ASTERISK-25049 #close Reported by: Corey Farrell Change-Id: I7aafc7c9f2b912918f28fe51d51e9e8a755750e3
2013-04-15DTMF events are now published on a channel's stasis_topic. AMI wasDavid M. Lee
refactored to use these events rather than producing the events directly in channel.c. Finally, the code was added to app_stasis to produce DTMF events on the WebSocket. The AMI events are completely backward compatible, including sending events on transmitted DTMF, and sending DTMF start events. The Stasis-HTTP events are somewhat simplified. Since DTMF start and DTMF send events are generally less useful, Stasis-HTTP will only send events on received DTMF end. (closes issue ASTERISK-21282) (closes issue ASTERISK-21359) Review: https://reviewboard.asterisk.org/r/2439 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-04Merged revisions 285057 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@285058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-12Convert to AST_CLI_YESNO and AST_CLI_ONOFFPaul Belanger
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: https://origsvn.digium.com/svn/asterisk/trunk@262613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-05New 'manager show settings' CLI command.Paul Belanger
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: https://origsvn.digium.com/svn/asterisk/trunk@261180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23Correct example for CLI autocompletion (generation)Kevin P. Fleming
Reported by Atis on #asterisk-dev git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01Introduce CLI permissions.Eliel C. Sardanons
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: https://origsvn.digium.com/svn/asterisk/trunk@160062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ 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: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12This commit does two things:Michiel van Baak
- 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: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28Remove "old"-style CLI handler, since nothing uses it anymore.Jason Parker
Closes issue #11403, patch by eliel. This also completes the janitor project. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12Doxygen fixes.Jason Parker
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: https://origsvn.digium.com/svn/asterisk/trunk@89202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵Jason Parker
didn't make much sense git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-21Merged revisions 85532 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@86585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19Convert NEW_CLI to AST_CLI.Jason Parker
Closes issue #11039, as suggested by seanbright. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes toRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@75164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13This introduces a new dialplan function, DEVSTATE, which allows you to do someRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13- Constify the format string passed to ast_cli()Russell Bryant
- Simplify printing out the warranty and license git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Make the "usage" member of the ast_cli_entry struct const to resolve a compilerRussell Bryant
warning. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-18Move this macro from cli.c to cli.h so apps can use itLuigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@47827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17introduce a bit of regexp support in the internal CLI api.Luigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@47787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15one more step cleaning the internal CLI interface:Luigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@47654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15update the internal cli api following comments from kevin.Luigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@47652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14need to check quoting in the doxygen docs...Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14Some improvements to doxygen docsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14Bring in the improved internal API for the CLI.Luigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@47606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18merge qwell's CLI verbification workKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31removal of trailing whitespace and useless 'extern'Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28bring in the code that was discussed on Mantis #6068,Luigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@15817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16add StopMixMonitor application (issue #6122, with mods)Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@10287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14more list macro conversion (issue #6361, plus documentation for new macro)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18constify arguments in more places where strings should not be modified ↵Russell Bryant
(issue #6286) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18cli.h cleanup and additional documentationMatt O'Gorman
from patch 6272 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24Doxygen documentation update from oej (issue #5505)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.Kevin P. Fleming
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-15add functions to register/unregister multiple CLI commands in a single ↵Kevin P. Fleming
operation (bug #4255, with minor mods) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-15Repair // comments to /* */ comments (bug #3347)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06Remove size restiction on remote console command completion (bug 1360)James Golovich
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-10Fix small logic errors (bug #242)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2002-11-27Version 0.3.0 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2002-04-04Version 0.1.12 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2001-10-31Version 0.1.10 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1999-12-19Version 0.1.1 from FTPMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142 65c4cc65-6c06-0410-ace0-fbb531ad65f3