[Asterisk-doc] docs installation.xml,1.21,1.22

blitzrage asterisk-doc@lists.digium.com
Fri, 23 Jul 2004 18:01:15 +0000


Comments:
Update of /cvsroot/asterisk/docs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22003/docs

Modified Files:
	installation.xml 
Log Message:
blitzrage
- remove a couple of sections which didn't seem to be needed
- reword some things
- s/arguments/parameters
- update list of parameters we can start asterisk with
- information on using safe_asterisk
- Starting Asterisk at boot time
Index: installation.xml
===================================================================
RCS file: /cvsroot/asterisk/docs/installation.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** installation.xml	21 Jul 2004 02:34:22 -0000	1.21
--- installation.xml	23 Jul 2004 18:01:09 -0000	1.22
***************
*** 371,378 ****
  	<sect1>
  		<title>Compiling Asterisk</title>
! 		<sect2>
  			<title>Using "make"</title>
  			<para/>
  		</sect2>
  		
  		<sect2>
--- 371,380 ----
  	<sect1>
  		<title>Compiling Asterisk</title>
! <!-- We're assuming we already know what make does -->
! <!--		<sect2>
  			<title>Using "make"</title>
  			<para/>
  		</sect2>
+ -->
  		
  		<sect2>
***************
*** 523,542 ****
  		</sect2>
  		
! 		<sect2>
  			<title>Using "modprobe"</title>
  			<para/>
  		</sect2>
! 		
! 		<sect2>
  			<title>Adding zaptel modules to your startup file</title>
  			<para>
! 			[ This might have to be a bit distribution specific to actually be
  			useful.  Either that, or we can leave it to the users own device to learn
  			how to load modules at startup on their own systems.  Asterisk comes with
  			a bunch of information for RedHat based systems, we might have to talk 
  			about it, but we should probably not get too distribution specific or we
! 			are going to have to document the same thing multiple times... ]
  			</para>
  		</sect2>
  	</sect1>
  	
--- 525,547 ----
  		</sect2>
  		
! <!-- We're assuming we know what mobprobe does -->
! <!--		<sect2>
  			<title>Using "modprobe"</title>
  			<para/>
  		</sect2>
! -->		
! <!-- This will be covered in the next section -->
! <!--		<sect2>
  			<title>Adding zaptel modules to your startup file</title>
  			<para>
! 			[This might have to be a bit distribution specific to actually be
  			useful.  Either that, or we can leave it to the users own device to learn
  			how to load modules at startup on their own systems.  Asterisk comes with
  			a bunch of information for RedHat based systems, we might have to talk 
  			about it, but we should probably not get too distribution specific or we
! 			are going to have to document the same thing multiple times...]
  			</para>
  		</sect2>
+ -->
  	</sect1>
  	
***************
*** 545,597 ****
  		<sect2>
  			<title>Manually starting Asterisk and the CLI</title>
! 				<para>
! 				Asterisk can be started several ways from the command line.  By default
! 				Asterisk will run as a daemon if not passed any arguments.  You can do
! 				this by running <command>/usr/sbin/asterisk</command>.  We assume that
! 				<filename class='directory'>/usr/sbin/</filename> is the directory where
! 				the Asterisk binary has been installed.
! 				</para>
  
! 				<para>
! 				We can also pass arguments to Asterisk to allow us to do various things
! 				such as connect to the console, control the verbosity of the console,
! 				run Asterisk in debugging mode and dump cores upon crashing.  These can
! 				be very useful tools to help manage your system.
! 				</para>
  
! 				<para>
! 				Arguments that can be passed to the Asterisk binary include:
! 				<simplelist>
! 					<member>c - console</member>
! 					<member>v - level of verbosity</member>
! 					<member>d - enter debugging mode</member>
! 					<member>g - dump core upon crashing</member>
! 				</simplelist>
! 				</para>
  
! 				<para>
! 				If we wish to run Asterisk in console mode we simply attach the <command>
! 				-c</command> tag after the binary name.  If you need to perform multiple
! 				commands at the same time you can concatenate multiple arguments together.
! 				</para>
  
! 				<para>
! 				Lets say we want to start Asterisk in console mode with several levels of
! 				verbosity in debugging mode.  We can do that by running 
! 				<command>/usr/sbin/asterisk -cvvvd</command>.
! 				</para>
  
! 				<para>
! 				What if we've already started Asterisk previously as a daemon?  We can
! 				reconnect to the console by adding the <command>r</command> argument along
! 				with the <command>c</command> argument.
! 				</para>
! <!--				<literallayout>
! 				To start asterisk in the background; <command>/usr/sbin/asterisk</command>
! 				To start asterisk in console mode: <command>/usr/sbin/asterisk -c</command>
! 				To start asterisk in console mode with 3 levels of verbose: <command>/usr/sbin/asterisk -cvvv</command>
! 				To start asterisk in console mode, verbose and in debug mode: <command>/usr/sbin/asterisk -cvvvd</command>
! 				To start asterisk in console mode, verbose, debug and dump cores: <command>/usr/sbin/asterisk -cvvvgd</command>
! 				</literallayout> -->
  		</sect2>
  		
--- 550,606 ----
  		<sect2>
  			<title>Manually starting Asterisk and the CLI</title>
! 			<para>
! 			Asterisk can be started several ways from the command line.  By default
! 			Asterisk will run as a daemon if not passed any parameters.  You can do
! 			this by running <command>/usr/sbin/asterisk</command>.  We assume that
! 			<filename class='directory'>/usr/sbin/</filename> is the directory where
! 			the Asterisk binary has been installed.
! 			</para>
  
! 			<para>
! 			We can also pass parameters to Asterisk to allow us to do various things
! 			such as connect to the console, control the verbosity of the console,
! 			run Asterisk in debugging mode and dump cores upon crashing.  These can
! 			be very useful tools to help manage your system.
! 			</para>
  
! 			<para>
! 			Parameters that can be passed to the Asterisk binary include:
! 			<simplelist>
! 				<member>c - console.  Starts Asterisk in the foreground (implies -f), with
! 					a command line interface (CLI) which you can use to monitor the
! 					state of the system and issue commands</member>
! 				<member>v - level of verbosity.  Multiple v's give more verbosity</member>
! 				<member>d - enter debugging mode</member>
! 				<member>g - dump core upon crashing</member>
! 				<member>h - help</member>
! 				<member>C &lt;configufile&gt; - Start with a configuration file other than
! 					the default <filename>/etc/asterisk/asterisk.conf</filename></member>
! 				<member>f - Foreground.  Starts Asterisk but does not fork as a background daemon</member>
! 				<member>r - Remote console.  Starts a CLI console which connects to an instance of
! 					of Asterisk already running as a background daemon</member>
! 				<member>n - Disable console colorization (for use with -c or -r)</member>
! 				<member>i - Prompt for cryptographic initialization passcodes at startup</member>
! 				<member>q - Quiet mode for output supression</member>
! 				<member>x &lt;cmd&gt; - execute command &lt;cmd&gt; (only valid with -r)</member>
! 			</simplelist>
! 			</para>
  
! 			<para>
! 			If we wish to run Asterisk in console mode we simply append the <command>
! 			-c</command> command line paramater after the binary name.  If you need to perform multiple
! 			commands at the same time you can concatenate multiple parameters together.
! 			</para>
  
! 			<para>
! 			For example, lets say we want to start Asterisk in console mode with several levels of
! 			verbosity and debugging.  That can be done by running 
! 			<command>/usr/sbin/asterisk -cvvvd</command>.
! 			</para>
  
! 			<para>
! 			What if we've started Asterisk as a daemon and we wish to reconnect to the
! 			console?  To reconnect to the Asterisk console run <command>/usr/sbin/asterisk -r</command>.
! 			</para>
  		</sect2>
  		
***************
*** 599,655 ****
  			<title>Starting Asterisk using safe_asterisk</title>
  			<para>
! 			[Explain why you'd want to use safe_asterisk]
  			</para>
! 			
  			<para>
! 				You can start Asterisk as a daemon using the <filename>safe_asterisk </filename> script located 
! 			in <filename class='directory'>/usr/sbin/</filename>
  			</para>
  
! 				<literallayout>
! 				<command>/usr/sbin/safe_asterisk</command>
! 				</literallayout>	
  		</sect2>
  		
  <!--		<sect2>
! 			<title>Accessing the CLI when Asterisk is running</title>
  			<para>
- 			If you ever need to re-attach to the Asterisk CLI for any reason,
- 			we can use the <command>-r</command> switch.
  			
- 			<example>
- 			<title>Re-attach to the Asterisk CLI</title>
- 			<literallayout>
- 			<command>/usr/sbin/asterisk -r</command>
- 			</literallayout>
- 			</example>
  			</para>
- 			
- 			<para>
- 			[Please, let's be more specific here.  And maybe give an example.]
- 			</para>
- 		</sect2> -->
- 		
- 		<sect2>
- 			<title>Logging/Tracing and Verbosity</title>
- 			<para/>
  		</sect2>
  	</sect1>
  	
  	<sect1>
! 		<title>Configuring Autostart w/ safe_asterisk</title>
  		<sect2>
! 			<title>Linux Run-levels (the init sequence)</title>
  			<para>
! 			[I know with RedHat / Fedora systems that you can copy the startup script
! 			in the /usr/src/asterisk/redhat/ directory to /etc/rc.d/init.d/ and then run
! 			the chkconfig command to easily add Asterisk to your startup sequence. Maybe
! 			we can explain how to do that.  We could also explain how to do it manually
! 			by creating symlinks in the rcX.d directories ]
  			</para>
  		</sect2>
! 		
  		<sect2>
! 			<title>Modifying the startup manually</title>
  			<para/>
  		</sect2>
--- 608,689 ----
  			<title>Starting Asterisk using safe_asterisk</title>
  			<para>
! 			The safe_asterisk script is the preferred way to run Asterisk.  This script
! 			starts Asterisk and monitors it to make sure it is still running.  If the
! 			Asterisk process dies, the script will attempt to restart it.
  			</para>
! 
  			<para>
! 			You can find a copy of the script in <filename>/usr/src/asterisk/contrib/scripts/safe_asterisk</filename>.
! 			The script is copied to <filename class='directory'>/usr/sbin/</filename>
! 			during the installation process as well.  Inside the script there are several
! 			options we can set.
  			</para>
  
! 			<informalexample>
! 			<programlisting>
! 			TTY=9                   <lineannotation># TTY (if you want one) for Asterisk to run on</lineannotation>
! 			CONSOLE=yes             <lineannotation># Whether or not you want a console</lineannotation>
! 			#NOTIFY=ben@alkaloid.net        <lineannotation># Who to notify about crashes</lineannotation>
! 			ASTARGS=""
! 			</programlisting>
! 			</informalexample>
! 
! 			<para>
! 			The TTY variable allows you to set which TTY console you would like the Asterisk
! 			CLI to run on.  If you leave this variable blank then Asterisk will be started
! 			as a daemon.  When CONSOLE=yes then Asterisk is started in console mode.  NOTIFY
! 			is used to send an email to the address specified if Asterisk every crashes.  The
! 			email is sent using the 'mail' program.  ASTARGS is used to start Asterisk with
! 			any optional arguments which you specify.  The Asterisk script will start Asterisk
! 			with the -vvvg arguments plus those specified in ASTARGS.
! 			</para>
  		</sect2>
  		
+ <!-- I think this should be moved somewhere else -->
  <!--		<sect2>
! 			<title>Logging/Tracing and Verbosity</title>
  			<para>
  			
  			</para>
  		</sect2>
+ -->
  	</sect1>
  	
  	<sect1>
! 		<title>Starting Automatically at Boot Time</title>
! 		<para>
! 		Starting processes at boot time are different among the different operating 
! 		systems so it is best to consult your OS documentation for how to do this.
! 		However there are some sample scripts located in <filename class='directory'>
! 		/usr/src/asterisk/contrib/init.d/</filename>.
! 		</para>
  		<sect2>
! 			<title>Asterisk</title>
  			<para>
! 			You can either start Asterisk using the <command>/usr/sbin/asterisk</command>
! 			command, or ideally, use the <command>/usr/sbin/safe_asterisk</command>
! 			script which will attempt to reload Asterisk if it crashes.  In RedHat
! 			based systems you can add this to your <filename>/etc/rc.d/rc.local</filename>
! 			file, however this will not shutdown Asterisk very cleanly during a reboot
! 			or shutdown.
  			</para>
+ 			<para>
+ 			In a RedHat environment you may be able to get a working
+ 			rc.d/init.d script by running the following commands.  This will copy the
+ 			script from <filename>/usr/src/asterisk/contrib/init.d/rc.redhat.asterisk</filename>
+ 			to <filename>/etc/rc.d/init.d/asterisk</filename>.  It will then run the
+ 			<command>/sbin/chkconfig --add asterisk</command> command.
+ 			</para>
+ 
+ 			<informalexample>
+ 			<programlisting>
+ 			cd /usr/src/asterisk
+ 			make config
+ 			</programlisting>
+ 			</informalexample>
  		</sect2>
! 
  		<sect2>
! 			<title>Zaptel</title>
  			<para/>
  		</sect2>