[Asterisk-doc] docs extensions.xml,1.11,1.12

blitzrage asterisk-doc@lists.digium.com
Mon, 24 May 2004 21:33:01 +0000


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

Modified Files:
	extensions.xml 
Log Message:
blitzrage
- just worked on some formatting changes.  File should mostly be 80 char.
wide now except for the examples.  This should make things a little bit
easier to work with hopefully.  Assuming your tabs are 3 chars wide.
Index: extensions.xml
===================================================================
RCS file: /cvsroot/asterisk/docs/extensions.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** extensions.xml	21 May 2004 19:41:22 -0000	1.11
--- extensions.xml	24 May 2004 21:32:54 -0000	1.12
***************
*** 2,47 ****
  	<title>Creating Dialplans</title>
  	<para>
! 	The dialplan is the central piece of any Asterisk system.  Simply put, the dialplan specifies what Asterisk should do when it answers a call or when an extension is dialed.  The dialplan consists of a list of instuctions or steps that Asterisk should follow.  It is <emphasis>absolutely vital</emphasis> that you understand dialplans if you want to setup an Asterisk system.  
  	</para>
  	<sect1>
  		<title>Introduction to <filename>extensions.conf</filename></title>
  		<para>
! 			The majority of the dialplan is specified in the file <filename>extension.conf</filename>.  This file is made up of three main parts: contexts, extensions, and priorities.
  		</para>
  		<sect2>
  			<title>Contexts</title>
  			<para>
! 			Contexts play a central role within the dialplan.  Contexts define scope. You can think of contexts as a way to keep different parts of a dialplan seperate.  As a simple example, contexts can be used to make Asterisk answer one phone line differently than another.  All calls that Asterisk handles will begin in a specified context. The instructions defined in this context will determine what things may happen to the call. 
  			</para>
  			<para>
! 			<emphasis>[Explain that this is called IVR and that IVR is one of the main reasons that people like Asterisk.]
  			Contexts can also be used to create "menus" for you callers to follow.  
! 			The menus are what you hear when you call a company that has a recording read things you are able to do.  Based on what the voice says, you make choices on your keypad by pressing different numbers.  This is referred to as an auto-attendant or interactive voice response (IVR) system.  The reason Asterisk is so popular is because of the way you are able to customize different menu systems based on different situations.</emphasis>
  			</para>
  <!--
  			<para>
! 			[I think this section should probably be later on... no sense in confusing them with conditional includes this early in the game.]
! 			Contexts are also capable of including other contexts inside themselves.  This functionality is even possible on a time of day, day of week, or day of month  basis. The normal use for this conditional include is for an automatic transition from business hours to after hours prompts to direct a caller. 
  			</para>
  -->
  			<para>
! 			Contexts are denoted by their name inside of square brackets.  For example, if we were to create a context called "incoming" for incoming calls, we would define it like this:
! 			<informalexample>
! 			<programlisting>
! 			[incoming]
! 			</programlisting>
! 			</informalexample>
  			</para>
  			<para>
! 			All of the instructions placed after a context definition are considered part of that context, until another context is defined.
  			</para>
  			<para>
  			[Let's not forget to explain the "global" context, either here or later on.]
  			</para>
  		</sect2>
  		<sect2>
  			<title>Extensions</title>
  			<para>
! 			[C'mon... we've got to change this.  Odds are that the reader won't have any idea what a "subroutine" is, and I'd be willing to be they have no idea what "old BASIC programming" is like.  Can't we explain this in plain english, and not programmer-speak?] 
  
  			The extension definations are how call flow are determined.  These work
--- 2,84 ----
  	<title>Creating Dialplans</title>
  	<para>
! 	The dialplan is the central piece of any Asterisk system.  Simply put, the 
! 	dialplan specifies what Asterisk should do when it answers a call or when an 
! 	extension is dialed.  The dialplan consists of a list of instuctions or steps 
! 	that Asterisk should follow.  It is <emphasis>absolutely vital</emphasis> that
! 	 you understand dialplans if you want to setup an Asterisk system.  
  	</para>
+ 	
  	<sect1>
  		<title>Introduction to <filename>extensions.conf</filename></title>
  		<para>
! 		The majority of the dialplan is specified in the file 
! 		<filename>extension.conf</filename>.  This file is made up of three main 
! 		parts: contexts, extensions, and priorities.
  		</para>
+ 		
  		<sect2>
  			<title>Contexts</title>
  			<para>
! 			Contexts play a central role within the dialplan.  Contexts define scope. 
! 			You can think of contexts as a way to keep different parts of a dialplan 
! 			seperate.  As a simple example, contexts can be used to make Asterisk answer 
! 			one phone line differently than another.  All calls that Asterisk handles 
! 			will begin in a specified context. The instructions defined in this context 
! 			will determine what things may happen to the call. 
  			</para>
+ 			
  			<para>
! 			<!-- I've left this in here because the outline is good, and don't want
! 			to screw with it too much yet -blitzrage -->
! 			[Explain that this is called IVR and that IVR is one of the 
! 			main reasons that people like Asterisk.]
! 			
  			Contexts can also be used to create "menus" for you callers to follow.  
! 			The menus are what you hear when you call a company that has a recording read 
! 			things you are able to do.  Based on what the voice says, you make choices on 
! 			your keypad by pressing different numbers.  This is referred to as an 
! 			auto-attendant or interactive voice response (IVR) system.  The reason 
! 			Asterisk is so popular is because of the way you are able to customize 
! 			different menu systems based on different situations.
  			</para>
  <!--
  			<para>
! 			[I think this section should probably be later on... no sense in confusing 
! 			them with conditional includes this early in the game.] Contexts are also 
! 			capable of including other contexts inside themselves.  This functionality
! 			is even possible on a time of day, day of week, or day of month  basis. The
! 			normal use for this conditional include is for an automatic transition from
! 			business hours to after hours prompts to direct a caller. 
  			</para>
  -->
  			<para>
! 			Contexts are denoted by their name inside of square brackets.  For example, 
! 			if we were to create a context called "incoming" for incoming calls, we 
! 			would define it like this:
! 			
! 				<informalexample>
! 				<programlisting>
! 				[incoming]
! 				</programlisting>
! 				</informalexample>
  			</para>
+ 			
  			<para>
! 			All of the instructions placed after a context definition are considered 
! 			part of that context, until another context is defined.
  			</para>
+ 			
  			<para>
  			[Let's not forget to explain the "global" context, either here or later on.]
  			</para>
  		</sect2>
+ 
  		<sect2>
  			<title>Extensions</title>
  			<para>
! 			[C'mon... we've got to change this.  Odds are that the reader won't have any
! 			idea what a "subroutine" is, and I'd be willing to be they have no idea what 
! 			"old BASIC programming" is like.  Can't we explain this in plain english, 
! 			and not programmer-speak?] 
  
  			The extension definations are how call flow are determined.  These work
***************
*** 52,61 ****
  			to be applied and any arguments to be passed to the function.
  			</para>
  			<para>
! 			Functions allow us to perform various actions within our dial plan.  These functions
! 			or "commands" can be passed information also referred to as "arguments".  With this
! 			information our function is able to manipulate the call somehow so that something
! 			happens.  To see a listing of the possible functions you are able to use in Asterisk, see
! 			Appendix C.
  
  <!--			The extension definitions are very much like subroutines in
--- 89,99 ----
  			to be applied and any arguments to be passed to the function.
  			</para>
+ 			
  			<para>
! 			Functions allow us to perform various actions within our dial plan.  These 
! 			functions or "commands" can be passed information also referred to as 
! 			"arguments".  With this information our function is able to manipulate the 
! 			call somehow so that something happens.  To see a listing of the possible 
! 			functions you are able to use in Asterisk, see Appendix C.
  
  <!--			The extension definitions are very much like subroutines in
***************
*** 70,73 ****
--- 108,112 ----
  			</para>
  		</sect2>
+ 
  		<sect2>
  			<title>Priorities</title>
***************
*** 75,136 ****
  			[Priorities show which order functions are applied to a specified
           extension.  Priority <emphasis>1</emphasis> is executed before
!          priority <emphasis>2</emphasis>, and so on.  Each priority calls a function with certain arguments.  (We'll probably have to explain functions and arguments.)]
! 			Priorities show which order functions are applied to a specified extension.  Each priority calls one specific function
! 			per line.  The priority numbers are the order in which the functions are applied.  Typically
!                         these priority numbers simply start at 1 and increment consecutively for each line in the context.  However there are 
! 			exceptions to this rule.  For instance, if you use the Dial() function and the channel you are attempting 
! 			to call	is busy, then the next priority the context is going to attempt is the current priority number + 101.  This allows
! 			you to perform a different set of functions when the line is busy, ie. go to voicemail.
  			</para>
  		</sect2>
  	</sect1>
  	<sect1>
  		<title>A simple example</title>
  		<para>
! 		Let's create our first <filename>extensions.conf file</filename>.  Because this is our first step, we'll start with a very simple example.  We'll assume for this example that all Asterisk needs to do is to answer the phone, say "Goodbye", and then hangup.  We'll use this simple example to point out the fundamentals of creating a dialplan.
  		</para>
  		<sect2>
  			<title>The special 's' extension</title>
  			<para>
! 			[Before we get too far into our example, we should explain the 's' extension.  Explain that when calls are answered, they almost always do to the 's' extension in the context specified by zapata.conf/sip.conf/etc.]
  
! 			The 's' extension is used when we do not have a specific extension we wish to call.  This is used in a context which
! 			will be directed to when we answer a call.  Incoming calls get directed to either a specified context or the default context.
! 			We use the 's' extension because there is no specific number we wish to use at this point.  It can almost be thought about
! 			like an automatically executed extension.  We use the 's' extension in contexts which get referenced in files like zapata.conf
! 			and sip.conf.
  			</para>
  		</sect2>
  		<sect2>
! 			<title>The <function>Answer()</function>, <function>Playback()</function>, and <function>Hangup</function> functions</title>
  			<para>
! 			[A brief explanation of the Answer() function.  Explain that although you don't always need to call Answer(), it's a good habit to get into.  (Playback() and a few other functions answer the call automatically if it hasn't already been answered.)]
  
! 			The <function>Answer()</function> function is used to answer a channel which is ringing.  This does the initial establishing of
! 			the call so that we can perform other functions.  A few functions don't necessarily require that we <function>Answer()</function>
! 			the line first, such as <function>Playback()</function> and <function>Background()</function>, but it is a very good habit to
! 			properly <function>Answer()</function> the channel before doing anything else.
  			</para>
  			<para>
! 			[A brief explanation of the Playback() function.  Explain where it looks for files (maybe we should gloss over the language-specific part for now, but let's not forget to put it in somewhere.)]
  
! 			The <function>Playback()</function> function is used for playing previously recorded files over a channel to the remote end.  When using
! 			the <function>Playback()</function> function, input from the user while the file is being played is simply ignored.  If you need to
! 			accept input during playback, use the <function>Background()</function> function.  Asterisk comes with many professionally recorded
! 			sound files which can be found in <filename class='directory'>/var/lib/asterisk/sounds/</filename>.  <function>Playback()</function>
! 			is used by specifying the filename without an extension as the argument.  For example, <function>Playback(filename)</function>.
  			</para>
  			<para>
! 			[A very brief explanation of the Hangup() function.  This one should be really simple. :-) ]
  
! 			The <function>Hangup()</function> does exactly as it's name implies; it hangs up an active channel.  You would use this
! 			at the end of a context once you want to drop a caller who no longer needs to be conected to the system.
  			</para>
  		</sect2>
  		<sect2>
  			<title>Our First Dialplan</title>
  			<para>
! 			[We should probably explain that this example won't work without the other configuration files setup correctly to send the incoming call into the "incoming" context.  Again, this isn't meant to be a complete example that people can actually use -- it is meant to explain how things in extensions.conf work.[
  			</para>
  			<informalexample>
  			<programlisting>
--- 114,217 ----
  			[Priorities show which order functions are applied to a specified
           extension.  Priority <emphasis>1</emphasis> is executed before
!          priority <emphasis>2</emphasis>, and so on.  Each priority calls a 
! 			function with certain arguments.  (We'll probably have to explain 
! 			functions and arguments.)]
! 			
! 			Priorities show which order functions are applied to a specified extension. 
! 			Each priority calls one specific function per line.  The priority numbers 
! 			are the order in which the functions are applied.  Typically these priority 
! 			numbers simply start at 1 and increment consecutively for each line in the 
! 			context.  However there are exceptions to this rule.  For instance, if you 
! 			use the Dial() function and the channel you are attempting to call is busy, 
! 			then the next priority the context is going to attempt is the current 
! 			priority number + 101.  This allows	you to perform a different set of 
! 			functions when the line is busy, ie. go to voicemail.
  			</para>
  		</sect2>
  	</sect1>
+ 	
  	<sect1>
  		<title>A simple example</title>
  		<para>
! 		Let's create our first <filename>extensions.conf file</filename>.  Because 
! 		this is our first step, we'll start with a very simple example.  We'll 
! 		assume for this example that all Asterisk needs to do is to answer the phone,
! 		say "Goodbye", and then hangup.  We'll use this simple example to point out 
! 		the fundamentals of creating a dialplan.
  		</para>
+ 		
  		<sect2>
  			<title>The special 's' extension</title>
  			<para>
! 			[Before we get too far into our example, we should explain the 's' extension.  
! 			Explain that when calls are answered, they almost always do to the 's' 
! 			extension in the context specified by zapata.conf/sip.conf/etc.]
  
! 			The 's' extension is used when we do not have a specific extension we wish 
! 			to call.  This is used in a context which	will be directed to when we answer 
! 			a call.  Incoming calls get directed to either a specified context or the 
! 			default context.  We use the 's' extension because there is no specific 
! 			number we wish to use at this point.  It can almost be thought about	like 
! 			an automatically executed extension.  We use the 's' extension in contexts 
! 			which get referenced in files like zapata.conf and sip.conf.
  			</para>
  		</sect2>
+ 		
  		<sect2>
! 			<title>The <function>Answer()</function>, <function>Playback()</function>, 
! 			and <function>Hangup</function> functions</title>
! 			
  			<para>
! 			[A brief explanation of the Answer() function.  Explain that although you 
! 			don't always need to call Answer(), it's a good habit to get into.  
! 			(Playback() and a few other functions answer the call automatically if it 
! 			hasn't already been answered.)]
  
! 			The <function>Answer()</function> function is used to answer a channel 
! 			which is ringing.  This does the initial establishing of the call so that we
! 			can perform other functions.  A few functions don't necessarily require that
! 			we <function>Answer()</function>	the line first, such as <function>Playback()
! 			</function> and <function>Background()</function>, but it is a very good 
! 			habit to	properly <function>Answer()</function> the channel before doing 
! 			anything else.
  			</para>
+ 			
  			<para>
! 			[A brief explanation of the Playback() function.  Explain where it looks for
! 			files (maybe we should gloss over the language-specific part for now, but 
! 			let's not forget to put it in somewhere.)]
  
! 			The <function>Playback()</function> function is used for playing previously 
! 			recorded files over a channel to the remote end.  When using the 
! 			<function>Playback()</function> function, input from the user while the file 
! 			is being played is simply ignored.  If you need to	accept input during 
! 			playback, use the <function>Background()</function> function.  Asterisk 
! 			comes with many professionally recorded sound files which can be found in 
! 			<filename class='directory'>/var/lib/asterisk/sounds/</filename>.  
! 			<function>Playback()</function> is used by specifying the filename without 
! 			an extension as the argument.  For example, 
! 			<function>Playback(filename)</function>.
  			</para>
+ 			
  			<para>
! 			[A very brief explanation of the Hangup() function.  This one should be 
! 			really simple. :-) ]
  
! 			The <function>Hangup()</function> does exactly as it's name implies; it 
! 			hangs up an active channel.  You would use this	at the end of a context once
! 			you want to drop a caller who no longer needs to be conected to the system.
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Our First Dialplan</title>
  			<para>
! 			[We should probably explain that this example won't work without the other 
! 			configuration files setup correctly to send the incoming call into the 
! 			"incoming" context.  Again, this isn't meant to be a complete example that 
! 			people can actually use -- it is meant to explain how things in 
! 			extensions.conf work.]
  			</para>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 140,153 ****
  			exten=&gt;s,3,Hangup()<lineannotation> ; Now hangup the line</lineannotation>
  			</programlisting>
! 			</informalexample>	
  			<para>
! 			[This is where we will go through and explain each line in our silly little example above.  Again, let's err on the side of making this as self-evident as possible, so readers get a good solid foundation in contexts, extensions, and priorities.]
  			</para>
  		</sect2>
  		<sect2>
  			<title>A more useful example</title>
  			<para>
! 			[Here we'll build upon our first example, by explaining the <function>Background()</function> and <function>Goto()</function> functions.]
  			</para>
  			<informalexample>
  			<programlisting>
--- 221,241 ----
  			exten=&gt;s,3,Hangup()<lineannotation> ; Now hangup the line</lineannotation>
  			</programlisting>
! 			</informalexample>
! 			
  			<para>
! 			[This is where we will go through and explain each line in our silly little 
! 			example above.  Again, let's err on the side of making this as self-evident 
! 			as possible, so readers get a good solid foundation in contexts, extensions, 
! 			and priorities.]
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>A more useful example</title>
  			<para>
! 			[Here we'll build upon our first example, by explaining the 
! 			<function>Background()</function> and <function>Goto()</function> functions.]
  			</para>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 161,176 ****
  			exten=&gt;2,2,Goto(incoming,s,1)<lineannotation> ; Now go back to the beginning</lineannotation>
  			</programlisting>
! 			</informalexample>	
  			<para>
! 			[Don't get too worried about the complexity of this example.  We'll go through it and explain each item.  Imagine that you've been asked to setup an Asterisk system for a small two-screen movie theater.  When you call into the system, it will tell you which movies are playing.  If you press 1, you get the times that the movie in theater 1 is playing.  Pressing 2 gets the times for the other movie.  When the call enters the context, it goes to the "s" extension.  Background() is just like Playback(), only it lets the caller interrupt the playback and jump to another extension *in this context*.  So when the caller presses 1 or 2, it takes them to the first priority in that extension.  Also explain that Goto() is a simple way to jump to a different context, extension, and/or priority.  We should probably mention that we won't go into detail right now on how to actually record the details about the movies, but that those will come shortly.]
  			</para>
  		</sect2>
  		<sect2>
  			<title>The <function>Dial()</function> function</title>
  			<para>
! 			[Add to our movie theater example, and make it so that if someone presses 0 during the playback, it will ring the ticket office.  Tell the reader that we're assuming that the channel for the ticket office has already been setup, and we'll show them how to do that in a different section of the book.]
  			</para>
  			<para>
! 			[By this section of the chapter, the reader should understand Answer(), Playback(), Background(), Hangup(), GoTo(), and the basics of Dial().  Not too bad so far.]
  			</para>
  		</sect2>
--- 249,284 ----
  			exten=&gt;2,2,Goto(incoming,s,1)<lineannotation> ; Now go back to the beginning</lineannotation>
  			</programlisting>
! 			</informalexample>
! 			
  			<para>
! 			[Don't get too worried about the complexity of this example.  We'll go 
! 			through it and explain each item.  Imagine that you've been asked to setup 
! 			an Asterisk system for a small two-screen movie theater.  When you call into
! 			the system, it will tell you which movies are playing.  If you press 1, you 
! 			get the times that the movie in theater 1 is playing.  Pressing 2 gets the 
! 			times for the other movie.  When the call enters the context, it goes to the 
! 			"s" extension.  Background() is just like Playback(), only it lets the caller
! 			interrupt the playback and jump to another extension *in this context*.  So
! 			when the caller presses 1 or 2, it takes them to the first priority in that
! 			extension.  Also explain that Goto() is a simple way to jump to a different
! 			context, extension, and/or priority.  We should probably mention that we 
! 			won't go into detail right now on how to actually record the details about 
! 			the movies, but that those will come shortly.]
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>The <function>Dial()</function> function</title>
  			<para>
! 			[Add to our movie theater example, and make it so that if someone presses 0 
! 			during the playback, it will ring the ticket office.  Tell the reader that 
! 			we're assuming that the channel for the ticket office has already been setup,
! 			and we'll show them how to do that in a different section of the book.]
  			</para>
+ 			
  			<para>
! 			[By this section of the chapter, the reader should understand Answer(), 
! 			Playback(), Background(), Hangup(), GoTo(), and the basics of Dial().  
! 			Not too bad so far.]
  			</para>
  		</sect2>
***************
*** 182,185 ****
--- 290,294 ----
  		<sect2>
  			<title>Adding another FXS port</title>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 191,208 ****
  			</informalexample>	
  		</sect2>
  		<sect2>
  			<title>Creating Voice Menus</title>
  			<para>
  			[Explain what IVR is, and why we want it in our dial plan]
! 			[The <filename>menu</filename> file is a voice recording saying 
! 			"Press 1 for the Operator or 2 to speak with John"]
  			</para>
  		</sect2>
  		<sect2>
! 			<title>Accepting User Input with the <function>Background()</function> Function</title>
  			<para>
  			[Explain the Background() application, and how it's different than Playback()]
  			</para>
  		</sect2>
  		<sect2>
  			<title>Adding a Voice Menu</title>
--- 300,321 ----
  			</informalexample>	
  		</sect2>
+ 		
  		<sect2>
  			<title>Creating Voice Menus</title>
  			<para>
  			[Explain what IVR is, and why we want it in our dial plan]
! 			[The <filename>menu</filename> file is a voice recording saying "Press 1 for
! 			the Operator or 2 to speak with John"]
  			</para>
  		</sect2>
+ 		
  		<sect2>
! 			<title>Accepting User Input with the <function>Background()</function> 
! 			Function</title>
  			<para>
  			[Explain the Background() application, and how it's different than Playback()]
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Adding a Voice Menu</title>
***************
*** 211,214 ****
--- 324,328 ----
  			let's use them in our example.]
  			</para>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 220,225 ****
  			exten=&gt;2,1,Dial(Zap/3)<lineannotation> ; Dial channels Zap/3 if the user dials 2</lineannotation>
  			</programlisting>
! 			</informalexample>	
  		</sect2>
  		<sect2>
  			<title>Handling Calls Between Internal Users</title>
--- 334,341 ----
  			exten=&gt;2,1,Dial(Zap/3)<lineannotation> ; Dial channels Zap/3 if the user dials 2</lineannotation>
  			</programlisting>
! 			</informalexample>
! 			
  		</sect2>
+ 		
  		<sect2>
  			<title>Handling Calls Between Internal Users</title>
***************
*** 228,231 ****
--- 344,348 ----
  			and use it for calling between internal extensions.]
  			</para>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 244,287 ****
  		</sect2>
  	</sect1>
  	<sect1>
  		<title>Variables</title>
  		<para>
! 		Variables can be used for many things. They can be used to help
! 		reduce typing, or they can be used to limit looping in an error
! 		condition too long. When using the value of a variable, you
! 		denote it with a dollar sign and the variable name surrounded
! 		by curly braces.
  		</para>
  		<para>
! 		There are two types of variables, namely global variables and 
! 		call variables.  As their names imply, global variables apply
! 		to all extensions, while call variables only apply to the
! 		current call in progress.
  		</para>
  		<sect2>
  			<title>Global Variables</title>
! 			<para>
! 			</para>
  		</sect2>
  		<sect2>
  			<title>Call Variables</title>
  			<para>
  			</para>
! 			<para>
! 			It is also possible to do simple expressions. These 
! 			expressions are evaluated when placed within square 
! 			brackets. Expressions are used to either combine 
! 			values together via addition, subtraction, 
! 			multiplication, or division.
! 			</para>
  			<para>
  			[example of some simple variable expressions]
  			</para>
  			<para>
! 			For more information on using expressions with variables, see
! 			the <filename>README.variables</filename> file that comes with
! 			the Asterisk source code.
  			</para>
  		</sect2>
  		<sect2>
  			<title>Adding Variables</title>
--- 361,404 ----
  		</sect2>
  	</sect1>
+ 	
  	<sect1>
  		<title>Variables</title>
  		<para>
! 		Variables can be used for many things. They can be used to help reduce typing,
! 		or they can be used to limit looping in an error condition too long. When 
! 		using the value of a variable, you denote it with a dollar sign and the 
! 		variable name surrounded by curly braces.
  		</para>
+ 		
  		<para>
! 		There are two types of variables, namely global variables and call variables.
! 		As their names imply, global variables apply	to all extensions, while call 
! 		variables only apply to the current call in progress.
  		</para>
+ 		
  		<sect2>
  			<title>Global Variables</title>
! 			<para/>
  		</sect2>
+ 		
  		<sect2>
  			<title>Call Variables</title>
  			<para>
+ 			It is also possible to do simple expressions. These expressions are evaluated
+ 			when placed within square brackets. Expressions are used to either combine 
+ 			values together via addition, subtraction, multiplication, or division.
  			</para>
! 			
  			<para>
  			[example of some simple variable expressions]
  			</para>
+ 			
  			<para>
! 			For more information on using expressions with variables, see the 
! 			<filename>README.variables</filename> file that comes with the Asterisk 
! 			source code.
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Adding Variables</title>
***************
*** 290,293 ****
--- 407,411 ----
  			${RECEPTIONIST}, etc.]
  			</para>
+ 			
  			<informalexample>
  			<programlisting>
***************
*** 307,311 ****
  			exten=&gt;>1002,1,Dial(Zap/3)<lineannotation> ; Dialing extension 1002 calls channel Zap/3</lineannotation>
  			</programlisting>
! 			</informalexample>	
  			<sidebar>
  			<title>A Useful Debugging Tip</title>
--- 425,430 ----
  			exten=&gt;>1002,1,Dial(Zap/3)<lineannotation> ; Dialing extension 1002 calls channel Zap/3</lineannotation>
  			</programlisting>
! 			</informalexample>
! 			
  			<sidebar>
  			<title>A Useful Debugging Tip</title>
***************
*** 316,319 ****
--- 435,439 ----
  		</sect2>
  	</sect1>
+ 	
  	<sect1>
  		<title>Macros</title>
***************
*** 323,326 ****
--- 443,447 ----
  			<para/>
  		</sect2>
+ 		
  		<sect2>
  			<title>Attributes of Macros</title>
***************
*** 332,335 ****
--- 453,457 ----
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Adding Macros to our Dial Plan</title>
***************
*** 337,340 ****
--- 459,463 ----
  		</sect2>
  	</sect1>
+ 	
  	<sect1>
  		<title>Call Flow</title>
***************
*** 349,352 ****
--- 472,476 ----
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Linking Contexts with Includes</title>
***************
*** 355,361 ****
  			[Order of includes count! Explain why...]
  			[Time-sensitive includes]
! 			[OK, now let's "include" the "outbound" context inside of the "internal" context]
  			</para>
  		</sect2>
  		<sect2>
  			<title>The other special extensions (i,t,o,h,fax,???)</title>
--- 479,487 ----
  			[Order of includes count! Explain why...]
  			[Time-sensitive includes]
! 			[OK, now let's "include" the "outbound" context inside of the "internal" 
! 			context]
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>The other special extensions (i,t,o,h,fax,???)</title>
***************
*** 367,409 ****
  			<member>'T' - Absolute Timeout</member>
  			</simplelist>
  			<para>
! 			The start extension is for most calls that are initiated with no
! 			other known information.  
  			</para>
  			<para>
! 			Hangup is where calls will go to when hangup is detected, or where
! 			you can send calls that you want to hangup on. 
  			</para>
  			<warning>
  				<para>
! 				There are currently some problems to be aware of when
! 				using the 'h' extension. Specifically, the
! 				variables about the call are lost as the information is
! 				destroyed with the channel. 
  				</para>
  			</warning>
  			<para>
! 			Timeout is for when a user is presented with a menu and they do not
! 			respond. In the timeout extension you will want to decide if you
! 			wish to repeat your menu, or just send the call to a hangup so as
! 			to free up the line.
  			</para>
  			<para>
! 			Invalid is for when Asterisk has determined that the input from the
! 			call is not valid for the current context. You may wish to play a
! 			prompt explaining the extension was invalid, and then send the call
! 			back to the extension that contains the menu prompts.
  			</para>
  			<para>
! 			Absolute Timeout is a used when a call is being terminated for
! 			exceeding a Absolute Timeout variable set. Be aware of the case
! 			difference from the normal timeout. This can be used to warn
! 			a user that they exceeded some allowable limit. Or it could be used
! 			to request someone to try calling back later if they waited in a
! 			queue too long. Essentially it should notify the caller that they
! 			are being disconnected so as not to leave them with the impression
! 			they had been cut off unintendedly.
  			</para>
  		</sect2>
  		<sect2>
  			<title>Using Goto and GotoIf</title>
--- 493,539 ----
  			<member>'T' - Absolute Timeout</member>
  			</simplelist>
+ 			
  			<para>
! 			The start extension is for most calls that are initiated with no other known
! 			information.  
  			</para>
+ 			
  			<para>
! 			Hangup is where calls will go to when hangup is detected, or where you can 
! 			send calls that you want to hangup on. 
  			</para>
+ 			
  			<warning>
  				<para>
! 				There are currently some problems to be aware of when	using the 'h' 
! 				extension. Specifically, the variables about the call are lost as 
! 				the information is destroyed with the channel. 
  				</para>
  			</warning>
+ 			
  			<para>
! 			Timeout is for when a user is presented with a menu and they do not respond.
! 			In the timeout extension you will want to decide if you wish to repeat your 
! 			menu, or just send the call to a hangup so as to free up the line.
  			</para>
+ 			
  			<para>
! 			Invalid is for when Asterisk has determined that the input from the call is 
! 			not valid for the current context. You may wish to play a prompt explaining 
! 			the extension was invalid, and then send the call back to the extension that 
! 			contains the menu prompts.
  			</para>
+ 			
  			<para>
! 			Absolute Timeout is a used when a call is being terminated for	exceeding a 
! 			Absolute Timeout variable set. Be aware of the case difference from the 
! 			normal timeout. This can be used to warn a user that they exceeded some 
! 			allowable limit. Or it could be used to request someone to try calling back 
! 			later if they waited in a queue too long. Essentially it should notify the 
! 			caller that they are being disconnected so as not to leave them with the 
! 			impression they had been cut off unintentially.
  			</para>
  		</sect2>
+ 		
  		<sect2>
  			<title>Using Goto and GotoIf</title>