Command Syntax and Availability
Commands follow a general syntax of <module name> <action type> <parameters>.
- sip show peers - returns a list of chan_sip loaded peers
- voicemail show users - returns a list of app_voicemail loaded users
- core set debug 5 - sets the core debug to level 5 verbosity.
Asterisk does support command aliases. You can find information in the Asterisk CLI Configuration section.
Finding Help at the CLI
The Asterisk CLI supports command-line completion on all commands, including many arguments. To use it, simply press the <Tab> key at any time while entering the beginning of any command. If the command can be completed unambiguously, it will do so, otherwise it will complete as much of the command as possible. Additionally, Asterisk will print a list of all possible matches, if possible.
Listing commands and showing usage
Once on the console, the 'help' alias (for 'core show help') may be used to see a large list of commands available for use.
The 'help' alias may also be used to obtain more detailed information on how to use a particular command and listing sub-commands. For example, if you type 'help core show', Asterisk will respond with a list of all commands that start with that string. If you type 'help core show version', specifying a complete command, Asterisk will respond with a usage message which describes how to use that command. As with other commands on the Asterisk console, the help command also responds to tab command line completion.
Help for functions, applications and more
A big part of working with Asterisk involves making use of Asterisk applications and functions. Often you'll want to know usage details for these, including their overall behavior or allowed arguments and parameters.
core show application <application name> or similarly
core show function <function name> will show you the usage and arguments.
Module Configuration Help
A very useful addition to Asterisk's help and documentation features is the command
config show help. This command provides detailed information about configuration files, option sections in those files, and options within the sections.
For example maybe we see the 'callerid' option in a pjsip.conf file sent to us from a friend. We want to know what that option configures. If we know that pjsip.conf is provided by the res_pjsip module then we can find help on that configuration option.