Index: doc/asterisk.8
===================================================================
--- doc/asterisk.8 (revision 236433)
+++ doc/asterisk.8 (working copy)
@@ -3,10 +3,12 @@
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
-.TH "ASTERISK" "8" "25 October 2005" "asterisk 1.2" ""
+.TH "ASTERISK" "8" "28 December 2009" "asterisk 1.6.0" ""
.SH NAME
asterisk \- All-purpose telephony server.
+.br
+rasterisk \- Connect to remote Asterisk server
.SH SYNOPSIS
\fBasterisk\fR [ \fB-tThfdvVqpRgciIn\fR ] [ \fB-C \fIfile\fB\fR ] [ \fB-U \fIuser\fB\fR ] [ \fB-G \fIgroup\fB\fR ] [ \fB-x \fIcommand\fB\fR ] [ \fB-M \fIvalue\fB\fR ]
@@ -41,9 +43,13 @@
Asterisk is a trademark of Digium, Inc.
.SH "OPTIONS"
.TP
+\fB-B \fR
+Force white text on a black background. The default is to keep whatever
+background color is default on the terminal. Mutually exclusive to \fB-W\fR.
+.TP
\fB-C \fIfile\fB\fR
Use \fIfile\fR as master configuration file
-instead of the default, /etc/asterisk/asterisk.conf
+instead of the default, \fI/etc/asterisk/asterisk.conf\fR.
.TP
\fB-c\fR
Provide a control console on the calling terminal.
@@ -57,15 +63,16 @@
even if it is running in the background. This will affect the size
of your log files.
.TP
+\fB-e \fIminmemfree\fB\fR
+Refuse to accept new calls if there is not at least \fIminmemfree\fR
+bytes available for allocation to user processes.
+.TP
+\fB-F\fR
+Always fork and detach from controlling terminal.
+.TP
\fB-f\fR
Do not fork or detach from controlling terminal.
.TP
-\fB-g\fR
-Remove resource limit on core size, thus forcing Asterisk to dump
-core in the unlikely event of a segmentation fault or abort signal.
-\fBNOTE:\fR in some cases this may be incompatible
-with the \fB-U\fR or \fB-G\fR flags.
-.TP
\fB-G \fIgroup\fB\fR
Run as group \fIgroup\fR instead of the
calling group. \fBNOTE:\fR this requires substantial work
@@ -73,9 +80,22 @@
the files required for its operation, including logs, its comm
socket, the asterisk database, etc.
.TP
+\fB-g\fR
+Remove resource limit on core size, thus forcing Asterisk to dump
+core in the unlikely event of a segmentation fault or abort signal.
+\fBNOTE:\fR in some cases this may be incompatible
+with the \fB-U\fR or \fB-G\fR flags.
+.TP
\fB-h\fR
Provide brief summary of command line arguments and terminate.
.TP
+.TP
+\fB-I\fR
+Enable internal timing if DAHDI timer is available
+The default behaviour is that outbound packets are phase locked
+to inbound packets. Enabling this switch causes them to be
+locked to the internal DAHDI timer instead.
+.TP
\fB-i\fR
Prompt user to initialize any encrypted private keys for IAX2
secure authentication during startup.
@@ -85,14 +105,14 @@
be useful to prevent a system from being brought down by terminating
too many simultaneous calls.
.TP
-\fB-m\fR
-Disable log and verbose output to remote (-r) consoles.
-.TP
\fB-M \fIvalue\fB\fR
Limits the maximum number of calls to the specified value. This can
be useful to prevent a system from being brought down by terminating
too many simultaneous calls.
.TP
+\fB-m\fR
+Disable log and verbose output to remote (-r) consoles.
+.TP
\fB-n\fR
Disable ANSI colors even on terminals capable of displaying them.
.TP
@@ -106,35 +126,29 @@
Reduce default console output when running in conjunction with
console mode (\fB-c\fR).
.TP
-\fB-r\fR
-Instead of running a new Asterisk process, attempt to connect
-to a running Asterisk process and provide a console interface
-for controlling it.
-.TP
\fB-R\fR
Much like \fB-r\fR\&. Instead of running a new Asterisk process, attempt to connect
to a running Asterisk process and provide a console interface
for controlling it. Additionally, if connection to the Asterisk
process is lost, attempt to reconnect for as long as 30 seconds.
.TP
+\fB-r\fR
+Instead of running a new Asterisk process, attempt to connect
+to a running Asterisk process and provide a console interface
+for controlling it.
+.TP
\fB-s \fIsocket\fB\fR
Allows to specify the socket file to be used to connect to the
Asterisk console. Used in conjunction with \fB-r\fR or \fB-R\fR.
.TP
-\fB-I\fR
-Enable internal timing if DAHDI timer is available
-The default behaviour is that outbound packets are phase locked
-to inbound packets. Enabling this switch causes them to be
-locked to the internal DAHDI timer instead.
+\fB-T\fR
+Add timestamp to all non-command related output going to the console
+when running with verbose and/or logging to the console.
.TP
\fB-t\fR
When recording files, write them first into a temporary holding directory,
then move them into the final location when done.
.TP
-\fB-T\fR
-Add timestamp to all non-command related output going to the console
-when running with verbose and/or logging to the console.
-.TP
\fB-U \fIuser\fB\fR
Run as user \fIuser\fR instead of the
calling user. \fBNOTE:\fR this requires substantial work
@@ -142,6 +156,9 @@
the files required for its operation, including logs, its comm
socket, the asterisk database, etc.
.TP
+\fB-V\fR
+Display version information and exit immediately.
+.TP
\fB-v\fR
Increase the level of verboseness on the console. The more times
\fB-v\fR is specified, the more verbose the output is.
@@ -151,16 +168,20 @@
and \fB-R\fR\&.
Note: This always sets the verbose level in the asterisk process,
-even if it is running in the background. This will affect the size
-of your log files.
+even if it is running in the background. This may affect the size
+of your log files, if you have the \fIverbose\fR level specified in
+\fIlogger.conf\fR.
.TP
-\fB-V\fR
-Display version information and exit immediately.
-.TP
\fB-W\fR
Change the terminal colors to compensate for a light background,
-rather than a dark background, as is the default.
+rather than a dark background, as is the default. This option is
+mutually exclusive to the \fB-B\fR option.
.TP
+\fB-X\fR
+Turn on #execincludes. This will allow the #exec command to be used
+within the configuration file \fI/etc/asterisk/asterisk.conf\fR or
+another file, if the \fB-C\fR option is specified.
+.TP
\fB-x \fIcommand\fB\fR
Connect to a running Asterisk process and execute a command on
a command line, passing any output through to standard out and
@@ -174,6 +195,56 @@
\fBasterisk -vvvgc\fR - Run on controlling terminal
.PP
\fBasterisk -rx "core show channels"\fR - Display channels on running server
+.PP
+\fBasterisk -Rc\fR - Connect to a running Asterisk daemon, as a remote console
+.SH "ENVIRONMENT"
+.TP
+\fBAST_EDITOR\fR
+If
+.RB $ AST_EDITOR
+is set, use that editor's movement keys for the CLI history. The only
+supported editor keys distributed with Asterisk are \fIvi\fR and \fIemacs\fR,
+the latter of which is the default.
+.TP
+\fBASTERISK_PROMPT\fR
+If
+.RB $ ASTERISK_PROMPT
+is set, its value is used to customize the prompt given on the Asterisk CLI. The
+table below specifies all possible substituted values.
+.TS
+tab (@);
+l l.
+%C\fIm\fR;\fIn\fR@T{
+Set the color to \fIm\fR color text on \fIn\fR color background, where color
+is an integer between 0 and 7.
+T}
+%C\fIn\fR@Set the text color, where color is an integer between 0 and 7.
+%d@The date, in ISO-8601 (YYYY-MM-DD) format.
+%g@Group name of the Asterisk daemon (or the connecting user, if remote).
+%h@FQDN hostname of the machine.
+%H@Short hostname of the machine.
+%l\fIn\fR@T{
+Load average of the machine, where \fIn\fR is a number between 1 and 3, specifying
+the 1-minute, 5-minute, or 15-minute load average, respectively.
+T}
+%s@Asterisk system name (from asterisk.conf)
+%t@Time, in 24-hour format, including seconds.
+%u@Username of the Asterisk daemon (or the connecting user, if remote).
+%#@A \fI#\fR character on the system console, or the \fI>\fR character for remote consoles.
+%%@A literal \fI%\fR character.
+.TE
+.TP
+\fBSHELL\fR
+The
+.RB $ SHELL
+variable specifies what shell to invoke when the \fB!\fR CLI command is specified
+with no arguments. If not specified, defaults to \fI/bin/sh\fR.
+.TP
+\fBTERM\fR
+The
+.RB $ TERM
+variable determines whether color is supported on the system console. If unset, all
+terminal output will be uncolored.
.SH "BUGS"
.PP
Bug reports and feature requests may be filed at https://issues.asterisk.org
Index: Makefile
===================================================================
--- Makefile (revision 236433)
+++ Makefile (working copy)
@@ -587,6 +587,7 @@
$(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys
$(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys
$(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
+ $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8/rasterisk.8
$(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8
$(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8
$(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
Index: main/asterisk.c
===================================================================
--- main/asterisk.c (revision 236433)
+++ main/asterisk.c (working copy)
@@ -3146,15 +3146,16 @@
while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWXx:")) != -1) {
/*!\note Please keep the ordering here to alphabetical, capital letters
* first. This will make it easier in the future to select unused
- * option flags for new features. */
+ * option flags for new features.
+ *
+ * You should additionally update doc/asterisk.8 with every option
+ * added or changed here.
+ */
switch (c) {
case 'B': /* Force black background */
ast_set_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
ast_clear_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
break;
- case 'X':
- ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES);
- break;
case 'C':
ast_copy_string(cfg_paths.config_file, optarg, sizeof(cfg_paths.config_file));
ast_set_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG);
@@ -3247,6 +3248,9 @@
ast_set_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
ast_clear_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
break;
+ case 'X':
+ ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES);
+ break;
case 'x':
ast_set_flag(&ast_options, AST_OPT_FLAG_EXEC);
xarg = ast_strdupa(optarg);