[Asterisk-doc] docs extensions.xml,1.12,1.13
blitzrage
asterisk-doc@lists.digium.com
Wed, 26 May 2004 02:57:19 +0000
Comments:
Update of /cvsroot/asterisk/docs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20759/docs
Modified Files:
extensions.xml
Log Message:
blitzrage
- explained how our first simple example works.
Index: extensions.xml
===================================================================
RCS file: /cvsroot/asterisk/docs/extensions.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** extensions.xml 24 May 2004 21:32:54 -0000 1.12
--- extensions.xml 26 May 2004 02:57:13 -0000 1.13
***************
*** 33,38 ****
[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
--- 33,40 ----
[Explain that this is called IVR and that IVR is one of the
main reasons that people like Asterisk.]
! </para>
!
! <para>
! Contexts can also be used to create "menus" for your 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
***************
*** 72,75 ****
--- 74,87 ----
[Let's not forget to explain the "global" context, either here or later on.]
</para>
+
+ <para>
+ Near the beginning of the <filename>extensions.conf</filename> there is a context
+ called [globals]. The globals context is where variables can be defined that can
+ be used through your dialplan. This may be any number of things which may contain
+ things like channels, usernames, passwords or extensions. Global variables are
+ handy so that if we need to change something like an extension number, we only
+ need to change it in one spot. Another advantage is it can make your dialplan
+ a bit easier to read.
+ </para>
</sect2>
***************
*** 80,85 ****
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
in a very linear fashion which makes them easy to understand and follow.
--- 92,99 ----
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?]
! </para>
+ <para>
The extension definations are how call flow are determined. These work
in a very linear fashion which makes them easy to understand and follow.
***************
*** 117,121 ****
--- 131,137 ----
function with certain arguments. (We'll probably have to explain
functions and arguments.)]
+ </para>
+ <para>
Priorities show which order functions are applied to a specified extension.
Each priority calls one specific function per line. The priority numbers
***************
*** 147,151 ****
--- 163,169 ----
Explain that when calls are answered, they almost always do to the 's'
extension in the context specified by zapata.conf/sip.conf/etc.]
+ </para>
+ <para>
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
***************
*** 167,171 ****
--- 185,191 ----
(Playback() and a few other functions answer the call automatically if it
hasn't already been answered.)]
+ </para>
+ <para>
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
***************
*** 181,185 ****
--- 201,207 ----
files (maybe we should gloss over the language-specific part for now, but
let's not forget to put it in somewhere.)]
+ </para>
+ <para>
The <function>Playback()</function> function is used for playing previously
recorded files over a channel to the remote end. When using the
***************
*** 197,201 ****
--- 219,225 ----
[A very brief explanation of the Hangup() function. This one should be
really simple. :-) ]
+ </para>
+ <para>
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
***************
*** 213,216 ****
--- 237,248 ----
extensions.conf work.]
</para>
+
+ <para>
+ The following example is not meant to be a complete working, usable example.
+ There are other configuration files in the <filename class='directory'>
+ /etc/asterisk </filename> directory which need to be configured to correctly
+ send the incoming call into the context. We are using this example to explain
+ how things work in <filename>extensions.conf</filename>
+ </para>
<informalexample>
***************
*** 229,232 ****
--- 261,292 ----
and priorities.]
</para>
+
+ <para>
+ When a call is sent into this context, it is going to execute the very first line
+ of the context. The first thing we notice is that all three lines start with
+ exten->. This means that we are referencing an extension of some sort.
+ Extensions can include specific numbers such as a persons extension number.
+ There are also several 'letter' extensions which have specific functions.
+ This allows us to make the call do different things based on what circumstance
+ we have. For now lets stick to the 's' extension in our example. As we learned
+ earlier, the 's' extension is going to answer the line for us without having to
+ specify any specific number; we just want to answer the phone. After our
+ 's' extension we have the priority number. We have three lines in this context,
+ hence we have the numbers 1, 2 and 3. As we moved to the next section of our
+ first line we have the application we wish to use. This will perform some
+ sort of action on the call, such as answering the line.
+ </para>
+
+ <para>
+ Back to looking at what each line does. Our first line is going to perform the
+ <function>Answer()</function> function. Asterisk will then take control of the
+ line. After this happens, Asterisk will perform the next priority. On our second
+ line we have the <function>Playback()</function> function. This will play a
+ sound file as specified by the filename. In our example we will play the file
+ <filename>vm-goodbye</filename>. The user will hear Allison saying "goodbye".
+ Notice that there is no filename extension. Asterisk will determine the type of
+ file. For our third and final line, we will perform the <function>Hangup()</function>
+ function and thus drop the line.
+ </para>
</sect2>