From dc602396861ea2ecc4b5c5a57d594a88f0e63285 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sun, 18 Jul 2004 17:58:05 +0000 Subject: [PATCH] Add Asterisk manpage git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3471 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- Makefile | 12 +- asterisk.8.gz | Bin 0 -> 2340 bytes asterisk.c | 12 +- asterisk.sgml | 295 +++++++++++++++++++++++++++++++++++++++++++ redhat/asterisk.spec | 5 +- 5 files changed, 321 insertions(+), 3 deletions(-) create mode 100755 asterisk.8.gz create mode 100755 asterisk.sgml diff --git a/Makefile b/Makefile index 4139ae75b9..c9b3bf93f0 100755 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ ASTCONFPATH=$(ASTETCDIR)/asterisk.conf ASTBINDIR=$(INSTALL_PREFIX)/usr/bin ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run +ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man MODULES_DIR=$(ASTLIBDIR)/modules AGI_DIR=$(ASTVARLIBDIR)/agi-bin @@ -203,7 +204,7 @@ _all: all @echo " + $(MAKE) install +" @echo " +-------------------------------------------+" -all: depend asterisk subdirs +all: depend asterisk subdirs editline/config.h: cd editline && unset CFLAGS LIBS && ./configure ; \ @@ -240,6 +241,14 @@ cli.o: cli.c build.h asterisk.o: asterisk.c build.h +manpage: asterisk.8.gz + +asterisk.8.gz: asterisk.sgml + rm -f asterisk.8 + docbook2man asterisk.sgml + mv ./*.8 asterisk.8 + gzip asterisk.8 + ifneq ($(strip $(ASTERISKVERSION)),) build.h: .version ./make_build_h @@ -365,6 +374,7 @@ bininstall: all mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax install -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys install -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys + install -m 644 asterisk.8.gz $(DESTDIR)$(ASTMANDIR)/man8 if [ -d contrib/firmware/iax ]; then \ install -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \ else \ diff --git a/asterisk.8.gz b/asterisk.8.gz new file mode 100755 index 0000000000000000000000000000000000000000..916f4d137719abff002b8aa2cbf8360436998564 GIT binary patch literal 2340 zcmV+<3ETD`iwFp%#`-`217UM?WpZhAYc4nd-B?X?8@Um^&#yq~kd;#uWm`FHxm>QL zB$majC9z0a>r|WrI0MdLH3N(R3@PT2-=5cv`JiZR_L!|b*ct-pMx(pm>juVOPsFOw zUR2W5GFPIIUaXZeLN>uxGU!y6o35>WdsefBTgpE)pRji{(K@%e#E~wKZ?IMaLwD- zum6Uh60%PFNAYI-8b42xWW2l)caz&`(ocOo6O*z$s~cBam>*QB>cYZ)uiRF-F^eq! zad$so&X!5?b#vK?e%&m@KLrNPicPkC_*O6SR2v%oS37=%|7ROrD*QMc|4icwHaHsp zNaMM)O?@=+L=)sSX|irAd1j0_bAvtG-E!AfN}`~p-Dh)g`e0}CS0abZ zPVTkIkxW_Qcjj*AB@NgDc*CkLzn-DaxdhM*t634bfU|5=| zEq3=po3v~)=tmBxk1B{QTXnje&2h}hmyx*rc!kg9qc&zgN^Zs%Z!cc;;-_oaAb^$H zY9N7agcF~%@;D&?zXST{Z*VfxWSA_)>iRY*q|0{FsRIL6Z$@H@f3xNFotQ6XBk^%@ zcJcaRBo>#;k@#e7?Spgyb!C6E|{ll3i=Hw@}IYQdks?(>@`VC2Eeo z`UONKTw@FcW2X^U!d(gkjrfa^iGApMf$zlDoM|J`d)YUXfr{`}+nsU%ooF#Dh<`^1 z;cmwhqG9ATG>sw(5kssEwtn(Z-1U)pwxKNIxW23EfT7`XrL&>bthL9#1 znFLTm0__g+H9|erB~pVu@f<4!e28pJ(#8RA0ZuCc91b`vV9)Jw$SU&a$vuvp=N8jElYm8JRvcatb@u6JiE=6x*CuQLUlY#1#*=lDBxrJN6nquQUIS5iar-Mr9Xpy+uEiz^_0({S)hul%x zoVqb)@v2I^rP4Kuxb8xh$spHo>xlcY-aEx1V%DIJ3d{x*xjnhzkgPxmIX9b;LE4-O zYS5)yT~!^3tsEUlvsaKx+&!XpyM0ZSqi#EjN459JCD*1oYDYaNG@RqwGbko^%NYzR ziTaqn$YX6{Q?;mh6^zcbuS?m2nK`OeM?p?z8>VGsU~I7u$`YBtv?flOBcD{-@F>FM ztP1F3WWY3zhm)Z+#Ik@|S_X}*#hEPPw~xWXQK@y#I&MbiL{32a5ql$0vQgf%jut{a zzR)wEoj^>HJ2U~NR@6;(O%8Qtxs#Re3zY2(qyl8pg1YVbZOyEE46kBimQQCXT&3K&VqDg;Bc~kJh^qx(eEagnP73?pUI0 zrUq_jdo=Z)8=0zvyne`fIt<2ffxc}(jzm&@{r>tF;Q9|{vzTOEYgq1q>P@#*OA*f! zCFwQ-9hKwRtNi0 z83xbVz7u_cBYIdRWK0jc&W{f*n-e+HX*r-99pjR?i%-7iZh;Hcz7%;hhToJ`=u|b5G*L7j`G;9l)s4pF|~Hbh}~F*u^Ej zEW{&Re*V~+e>uD-aiH2K2}ZT@q3{0)>-3r>+IK9p#(tdXTsIZHVnwyf=~PTUE$^f1 zzg~TseIUOUs;r}ZH~1o(dhcM#^R;}c!^=<>hC0ncOGeQ$-IN#|7co}15EY<0^hi#; zCq*Rt(_qyHUUp?0+(wyg`K^bumEMuSCL?5+5?71q^=!3_e3TtNGf{b{;(ev3oaDdM K9BR0h6#xL2c#cZ| literal 0 HcmV?d00001 diff --git a/asterisk.c b/asterisk.c index 62018f8e65..e831b652ac 100755 --- a/asterisk.c +++ b/asterisk.c @@ -1410,10 +1410,17 @@ static void ast_remotecontrol(char * data) printf("\nDisconnected from Asterisk server\n"); } +static int show_version(void) +{ + printf("Asterisk " ASTERISK_VERSION "\n"); + return 0; +} + static int show_cli_help(void) { printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 2000-2004, Digium.\n"); printf("Usage: asterisk [OPTIONS]\n"); printf("Valid Options:\n"); + printf(" -V Display version number and exit\n"); printf(" -C Use an alternate configuration file\n"); printf(" -G Run as a group other than the caller\n"); printf(" -U Run as a user other than the caller\n"); @@ -1533,7 +1540,7 @@ int main(int argc, char *argv[]) } */ /* Check for options */ - while((c=getopt(argc, argv, "hfdvqprRgcinx:U:G:C:")) != -1) { + while((c=getopt(argc, argv, "hfdvVqprRgcinx:U:G:C:")) != -1) { switch(c) { case 'd': option_debug++; @@ -1585,6 +1592,9 @@ int main(int argc, char *argv[]) case 'h': show_cli_help(); exit(0); + case 'V': + show_version(); + exit(0); case 'U': runuser = optarg; break; diff --git a/asterisk.sgml b/asterisk.sgml new file mode 100755 index 0000000000..fb569d533e --- /dev/null +++ b/asterisk.sgml @@ -0,0 +1,295 @@ + + + + 2004-07-18 + + + + asterisk + + 8 + asterisk 1.0 + + + + asterisk + + + All-purpose telephony server. + + + + + asterisk + +file +user +group +command + + + + asterisk -r + +command + + + + + 2004-07-01 + + DESCRIPTION + + asterisk is a full-featured telephony server which + provides Private Branch eXchange (PBX), Interactive Voice Response (IVR), + Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying, + Conferencing, and a plethora of other telephony applications to a broad + range of telephony devices including packet voice (SIP, IAX, MGCP, Skinny, + H.323) devices (both endpoints and proxies), as well as traditional TDM + hardware including T1, E1, ISDN PRI, GR-303, RBS, Loopstart, Groundstart, + ISDN BRI, and many more. + + + Asterisk reads most of its configuration files from configuration files + located in /etc/asterisk. Virtually all aspects of the operation of + asterisk's configuration files can be found in the sample configuration + files. The format for those files is generally beyond the scope of this + man page. + + + When running with -c, -r or -R + options, Asterisk supplies a powerful command line, including command + completion, which may be used to monitors its status, perform a variety + of administrative actions and even explore the applications that are + currently loaded into the system. + + + + OPTIONS + + + -C file + + + Use file as master configuration file + instead of the default, /etc/asterisk/asterisk.conf + + + + + -c + + + Provide a control console on the calling terminal. + Specifying this option implies -f and will cause + asterisk to no longer fork or detach from the controlling terminal. + + + + + -d + + + Enable extra debugging statements. + + + + + -f + + + Do not fork or detach from controlling terminal. + + + + + -g + + + Remove resource limit on core size, thus forcing Asterisk to dump + core in the unlikely event of a segmentation fault or abort signal. + NOTE: in some cases this may be incompatible + with the -U or -G flags. + + + + + -G group + + + Run as group group instead of the + calling group. NOTE: this requires substantial work + to be sure that Asterisk's environment has permission to write + the files required for its operation, including logs, its comm + socket, the asterisk database, etc. + + + + + -h + + + Provide brief summary of command line arguments and terminate. + + + + + -i + + + Prompt user to intialize any encrypted private keys during startup. + + + + + -n + + + Disable ANSI colors even on terminals capable of displaying them. + + + + + -p + + + If supported by the operating system (and executing as root), + attempt to run with realtime priority for increased performance and + responsiveness within the Asterisk process, at the expense of other + programs running on the same machine. + + + + + -q + + + Reduce default console output when running in conjunction with + console mode (-c). + + + + + -r + + + Instead of running a new Asterisk process, attempt to connect + to a running Asterisk process and provide a console interface + for controlling it. + + + + + -R + + + Much like -r. 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. + + + + + -U user + + + Run as user user instead of the + calling user. NOTE: this requires substantial work + to be sure that Asterisk's environment has permission to write + the files required for its operation, including logs, its comm + socket, the asterisk database, etc. + + + + + -v + + + Increase the level of verboseness on the console. The more times + -v is specified, the more verbose the output is. + Specifying this option implies -f and will cause + asterisk to no longer fork or detach from the controlling terminal. + This option may also be used in conjunction with -r + and -R + + + + + -V + + + Display version information and exit immediately. + + + + + -x command + + + Connect to a running Asterisk process and execute a command on + a command line, passing any output through to standard out and + then terminating when the command execution completes. Implies + -r when -R is not explicitly + supplied. + + + + + + + EXAMPLES + + asterisk - Begin Asterisk as a daemon + + + asterisk -vvvgc - Run on controlling terminal + + + asterisk -rx "show channels" - Display channels on running server + + + + BUGS + + Bug reports and feature requests may be filed at http://bugs.digium.com + + + + SEE ALSO + + *CLI> help - Help on Asterisk CLI + + + *CLI> show applications - Show loaded applications + + + http://www.asterisk.org - The Asterisk Home Page + + + http://www.asteriskdocs.org - The Asterisk Documentation Project + + + http://www.voip-info.org/wiki-Asterisk - The Asterisk Wiki + + + http://www.digium.com/ - Asterisk sponsor and hardware supplier + + + http://www.markocam.com/ - Asterisk author's web cam + + + + AUTHOR + + + Mark Spencer <markster@digium.com> + + + + + Countless other contributers, see CREDITS with distribution for more information + + + + diff --git a/redhat/asterisk.spec b/redhat/asterisk.spec index d08792e024..a7f3289837 100755 --- a/redhat/asterisk.spec +++ b/redhat/asterisk.spec @@ -80,7 +80,10 @@ ln -sf /var/spool/asterisk/vm /var/lib/asterisk/sounds/vm %attr(0644,root,root) /var/lib/asterisk/keys/* %attr(0755,root,root) %dir /var/lib/asterisk/agi-bin %attr(0755,root,root) %dir /var/lib/asterisk/agi-bin/* - +# +# Man page +# +%attr(0644,root,root) /usr/share/man/man8/asterisk.8.gz # # Firmware #