Just to get something going here, and I was bored. I have written a fair
amount of this section now. It became evident that mixing of pieces of
the outline together was convenient to the writing of the section. So
this is submitted for review instead of the outline.
Let it be known that I am open to all constructive critique. Even to the
point of ripping this section apart, or not using it at all.
Anyways, I've been up too long and am ready to release this in it's
current form even though it needs several more paragraphs.
--
Steven Critchfield <critch@basesys.com>
<chapter>
<title>Components of Asterisk Configuration</title>
<sect1>
<title>The Asterisk Directory Structure</title>
<para>
Asterisk has a few directory trees that you will need to be aware of.
</para>
<sect2>
<title>/etc/asterisk</title>
<para>
This directory is for all your configuration files.
</para>
</sect2>
<sect2>
<title>/usr/src/asterisk</title>
<para>
This is where standard convention places the asterisk source code.
All examples will point you to this directory when pointing to the
source code.
</para>
</sect2>
<sect2>
<title>/usr/lib/asterisk/modules</title>
<para>
You will find the modules that asterisk loads in this directory.
</para>
</sect2>
<sect2>
<title>/var/lib/asterisk</title>
<para>
Outside of /etc/asterisk, this is the most important directory. In
this directory you will find a directory for your AGI applications,
directories for images and sounds to be served to clients, a
directory to place your music on hold files, and a directory for
your security keys for authentication. The asterisk DB1 file also
resides here.
</para>
</sect2>
<sect2>
<title>/var/spool/asterisk</title>
<para>
Transient files are found here. The directory outgoing is used for
queuing calls to be made. Voicemail is pretty self explanation.
<!-- qcall? Someone who knows this should fill in a sentence about
it. -->
</para>
</sect2>
<sect2>
<title>/var/log/asterisk</title>
<para>
Here is where you find the directory for the Call Detail
Records(CDR), and a few files containing the messages generated by
asterisk while running.
</para>
</sect2>
</sect1>
<sect1>
<title>Configuration</title>
<para>
This aim of this section is to give you a solid base on how the various
config files work and the conventions used in expressing the
configuration.
</para>
<para>
The config files have been modeled after the INI files commonly found
on Windows systems. Sections of the files are blocked off by a title
placed with in square braces. Due to the pound sign being a valid
key press within a dial plan, the comment character in asterisk config
files is the semicolon. Objects or interfaces accept the
configurations defined above it. Settings are usually defined by a
keyword and a equal sign followed by the new definition. Objects can
also be defined with the equal sign, but sometimes the equal sign is
replaced by an arrow made up by an equal sign followed by a greater
than symbol.
</para>
<programlisting>
[title]
attribute=value
attribute2=value2
object=>interface
<lineannotation>; object was defined with attribute and attribute2</lineannotation>
attribute2=""
object2=>interface2
<lineannotation>; object2 defined with attribute but not attribute2</lineannotation>
</programlisting>
<sect2>
<title>extensions.conf</title>
<para>
You will spend many hours in this file. It is the basis for how
every call made is dealt with. The concepts covered in this section
will be used the entire time you use asterisk.
</para>
<sect3>
<title>Contexts</title>
<para>
The first bit of information to learn about is contexts. Contexts
have a couple of functions within asterisk dial plan. Contexts
define scope. All calls that enter asterisk will begin in a
defined context. What is defined in this context will determine
what is possible for the call to do. Contexts can also help build
an IVR menu where you reuse extension numbers as options on you
menu.
</para>
<para>
Contexts are capable of including other contexts into themselves.
The include 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.
Contexts may contain extension definitions, and includes of other
contexts.
</para>
<programlisting>
[incoming_calls]
<lineannotation>; We always want callers to be able to get to the extensions.</lineannotation>
include => worker_extensions
<lineannotation>; Normal IVR menu</lineannotation>
include => day_menu|08:00-17:00|Mon-Fri|*|*
<lineannotation>; Tue-Fri mornings are normal after hours</lineannotation>
<lineannotation>; Mon-Thu nights are normal after hours</lineannotation>
include => night_menu|00:00-08:00|Tue-Fri|*|*
include => night_menu|17:00-24:00|Mon-Thu|*|*
<lineannotation>; Mon morning is part of a weekend menu.</lineannotation>
include => weekend_menu|00:00-08:00|Mon|*|*
<lineannotation>; Fri evening starts the weekend</lineannotation>
include => weekend_menu|17:00-24:00|Fri|*|*
<lineannotation>; and Sat-Sun are weekend times also.</lineannotation>
include => weekend_menu|*|sat-sun|*|*
[internal_restricted_callers]
<lineannotation>; our employees should be able to contact our other employees</lineannotation>
include => worker_extensions
<lineannotation>; only internal callers can call out, and this is restricted to</lineannotation>
<lineannotation>; local calls</lineannotation>
include => outbound_local_context
[internal_unrestricted_callers]
<lineannotation>; our employees should be able to contact our other employees</lineannotation>
include => worker_extensions
<lineannotation>; only internal callers can call out</lineannotation>
include => outbound_local_context
include => outbound_toll_context
</programlisting>
<para>
From this example you should be able to notice that contexts can be
used to reduce retyping sections as in the worker_extensions being
included in all the example contexts.
</para>
<para>
Also demonstrated here is the ability to separate privileges. Calls
coming from outside of our system are not given the ability to call
out to other phone numbers. Also you will notice the ability to
separate your internal users from having the same abilities to call
out. You may not want anyone but your executives to be able to call
long distance or even international.
</para>
</sect3>
<sect3>
<title>Extensions</title>
<para>
The extension definitions are very much like subroutines in
programming. You will define them as the steps a call will take as
it progresses though your dial plan. A single extension line will
contain the extension number or special letter you are defining, a
priority number that is very much like old basic programming,
the function you need to be applied, and any of the arguments to be
passed to the function. The priority numbers must be consecutive for
the call to progress from one to the next. Here is an example of a
extension definition.
</para>
<programlisting>
[sample_context]
exten => s,1,Wait(1)
exten => s,2,Answer()
exten => s,3,Background(hello_prompt)
</programlisting>
<para>
There are 4 special extensions to know about.
</para>
<simplelist>
<member>'s' - start</member>
<member>'i' - invalid</member>
<member>'t' - timeout</member>
<member>'h' - hangup</member>
</simplelist>
<para>
The start extension is for most calls that are initiated with no
other known information. This is true for calls on normal home
lines, or non digital lines.
</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>
<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>
<programlisting>
[My_home_incoming_context]
include => my_extensions
<lineannotation>; Make sure we wait long enough for the CallerID to be received.</lineannotation>
exten => s,1,wait(1)
<lineannotation>; Answer the line so that the line is available to play audio on.</lineannotation>
exten => s,2,Answer()
exten => s,3,DigitTimeout(15)
exten => s,4,ResponseTimeout(10)
<lineannotation>; Announce who we are, and what to do.</lineannotation>
exten => s,5,Background(Hello_prompt)
<lineannotation>; Here is where a caller is expected to enter an extension</lineannotation>
[my_extensions]
<lineannotation>; ring my extension for 25 seconds only</lineannotation>
exten => 1,1,Dial(Zap/2,25)
<lineannotation>; if dial falls through, I didn't answer, so play unavailable message</lineannotation>
exten => 1,2,Voicemail(u1)
<lineannotation>; If they left a message, hangup
now.</lineannotation>
exten => 1,3,hangup()
<lineannotation>; Now if dial failed due to the line being busy, play the busy message</lineannotation>
exten => 1,102,Voicemail(b1)
<lineannotation>; again, if the message is left,
hangup.</lineannotation>
exten => 1,103,hangup()
<lineannotation>; This wouldn't be a PBX without many more, but they look the same as above.</lineannotation>
</programlisting>
<para>
Here you should see the exception of the priority numbers just
incrementing by 1. Dial will jump to the next priority + 100 if the
dial failed.
</para>
</sect3>
<sect3>
<title>Variables</title>
<para>
There are 2 types of variables in Asterisk. The first kind is a
per call variable. They are either during call set up, or by
functions in extension definitions such as SetVar. The Second kind of
variables are global, and are defined either in the global
section of the extensions.conf file, or by the function
SetGlobalVar encountered in a extension definition.
</para>
<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>
<programlisting>
[global]
Lief=Zap/3
Critch=Zap/4
Wassim=Zap/5
ALL=${Lief}&${Critch}&${Wassim}
<lineannotation>; This is where the user can't decide who to call, so we ring everyone</lineannotation>
exten => t,1,Dial(${ALL)
</programlisting>
<para>
In this pretty simple example, You can see how it would be
easy to change how to dial to someone and have it propagate to
the ALL variable. You should also note that it was possible to
concatenate the variables just by placing them next to each
other.
</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, division, or to evaluate truth for
use with a GotoIf function for call flow.
</para>
</sect3>
<sect3>
<title>Macros</title>
<para>
When you combine variables with a special form of contexts, you
get macros. Macros, like in C, are expanded in the place they
are called. Macros are defined much like a normal context except
the name is prepended by "marcro-". The arguments you send to
this macro will be in variables such as ARG1 and ARG2. There is
also a special variable called MACRO_EXTEN so you know where
you are being called from.
</para>
<programlisting>
[globals]
Lief=Zap/3
Critch=Zap/4
Wassim=Zap/5
ALL=${Lief}&${Critch}&${Wassim}
[extensions]
<lineannotation>; Let the first to answer the phone be the operator</lineannotation>
exten => 0,1,Macro(stdexten,${ALL}
exten => 1,1,Macro(stdexten,${Lief}
exten => 2,1,Macro(stdexten,${Critch}
exten => 3,1,Macro(stdexten,${Wassim}
</programlisting>
<para>
It should come as no surprise that this is yet another way of
reducing typing. We defined the 5 steps that we want taken for
each of the extensions in one place only. This helps also in
reducing typing mistakes.
</para>
</sect3>
<sect3>
<title>Call flow</title>
<para>
This is where we put a few more pieces together to pull some of
these concepts into a more interesting example. We also need to
cover how to create menus.
</para>
<para>
Dial plans take time to develop due to the need to think about
how it affects other sections. Key presses will attempt to be
matched to an extension as long as there is a possibility for
the current pattern to be further matched. Any time you have
ambiguous matches where the digits type can match one extension
exactly and another partially, you will have to wait for the
timeout to go to the shorter extension match. So it is usually
important to designate certain digit ranges for certain
functions.
</para>
<para>
You may be used to noticing that 9 is associated with dialing
an outside line. This is due to the fact that in a local
calling area, the exchanges could over lap other sections of
your dialplan. Similarly you may have noticed that with in
certain companies, all the extensions will start with a
specific number. Like the 9, the specific number will denote
the type of function you are about to match against.
</para>
<para>
When you are choosing some of your dial plan, you should keep an
eye on expandability. Going through a change in dial plan can
cause a major headache to the users on your system. Something
as simple as choosing the range used for extensions, will
determine the maximum number of extensions you can expand to
before having to change things around.
</para>
<para>
For example, if you choose single digit extensions, there will
only be up to 9 options when you consider 1 entry will be used
for selecting an outgoing line. It isn't uncommon for a
moderately sized company to choose 4 digit extensions all
starting with the same digit. This will allow them 1000
extensions with only using a single leading digit.
</para>
<para>
Another part that makes the extensions file so versatile is the
pattern matching ability. Patterns are defined by placing an
underscore as the first character of the extension definition.
Exact matches can be typed as is, the letter 'X' matches all
digits, and the letter 'N' matches 2-9. This is especially
useful when defining outside phone number availability.
</para>
<programlisting>
[global]
Lief=Zap/2
Critch=Zap/3
Wassim=Zap/4
Jared=Zap/5
Brian=Zap/6
Support=${Wassim}&${Critch}&${Brian}
Sales=${Lief}&${Jared}
ALL=${Sales}&${Support}
[extensions]
<lineannotation>; Let the first to answer the phone be the operator</lineannotation>
exten => 0,1,Macro(stdexten,${ALL}
exten => 5001,1,Macro(stdexten,${Lief}
exten => 5002,1,Macro(stdexten,${Critch}
exten => 5003,1,Macro(stdexten,${Wassim}
exten => 5004,1,Macro(stdexten,${Jared}
exten => 5005,1,Macro(stdexten,${Brian}
Posted: Sun Jan 04, 2004 4:14 pm Post subject: [Asterisk-doc] extensions.conf section
Hi Steven!
Where can i find the stylesheet for displaying this?
<title>/usr/src/asterisk</title>
<para>
This is where standard convention places the asterisk source code.
All examples will point you to this directory when pointing to the
source code.
Unless I misunderstood the chapter structure I think you should shortly
mention /libpri /zaptel and /asterisk-addons as well.
<!-- qcall? Someone who knows this should fill in a sentence about
it. -->
Technical question: When rendered into PDF I guess that HTML comment will
drop out = not be shown? At least for the moment I'd suggest to use some
kind of "open question" tag that can be easily hidden when needed, but
shown while the documentation is still in the process of being written.
> From this example you should be able to notice
Hm... sounds a bit like newbie bashing to me. ;->
In general: Maybe it'd be nice to have a very minimal setup provided in
the book (see recent discussion on users-l) that just lists two SIP
devices and a minimalistic extensions.conf with the two devices, fwd
dialout (and maybe iaxtel dialout) and voicemail (so skip the demo).
<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>
On users-l I recently read comments of bkw stating that h has limitations
and should not be relied upon e.g. for billing purposes etc. It hink that
should be added here.
<lineannotation>; Make sure we wait long enough for the CallerID to
be received.</lineannotation>
This remark is only valid for analog calls, I assume?
> You may be used to noticing that 9 is associated with dialing
> an outside line.
In Europe that's typically 0 instead of 9.
> Exact matches can be typed as is, the letter 'X' matches all
> digits, and the letter 'N' matches 2-9. This is especially
> useful when defining outside phone number availability.
Add a remark on . as well
<title>/var/log/asterisk</title>
<para>
Here is where you find the directory for the Call Detail
Records(CDR), and a few files containing the messages generated by
asterisk while running.
</para>
Is there a chapter forseen for administration (and logging)? I have the
feeling that this should be added to the outline. Don't confuse this with
setup and configuration questions, I mean "regular boring admin work"
here including. The "clustering" sub-chapter should probably be moved
into this new admin chapter. This could also include info about the admin
tools astman, gastman etc.
Here's a quick draft:
Administrating Asterisk
- useful tools
-- astman
-- gastman
-- ...
- logfiles
-- log levels and what-goes-where
--- asterisk
--- agi and eagi logging
-- log rotation (disk full!)
- backup
-- configuration
-- voicemail
-- cdr data
- startup scripts and watchdogs
-- startup scripts
-- watchdogs
- distributed Asterisk & clustering
-- using multiple boxes for different tasks
-- T1 failvoer hardware
-- databases
--- sharing data among several * boxes
--- example: how to deal with remote DB unreachable
- tips for stable (and conservative) operation
-- example (to be discussed): don't use mpg123 for MOH
-- example (to be discussed): daily restart
- tips for rollout and transition (maybe in another chapter?)
-- seamlessly moving analog trained users to asterisk
-- devel box and production box
Wow, I didn't expect that I'd fill the outline that quickly! And here's
another one that devers a chapter (or big section under the admin
chapter): Billing and LCR. The Wiki pages on this have grown recently,
and the frequent calling card discussions on users-l indicate the
importance of the topic:
Billing and Least Cost Routing (LCR)
- billing
-- how reliable are CDR data? Pitfalls?
-- open source tools and how to integrate them
- least cost routing
-- intro (telco LCR, VoIP LCR)
-- for SOHO
-- for bigger installations (service provider)
- calling card applications
-- intro
-- considerations
Another addition: Add a "What Asterisk is not" section under
Introduction --> General concept, possibly describing integration
concepts with other tools like SER.
Posted: Sun Jan 04, 2004 6:08 pm Post subject: [Asterisk-doc] extensions.conf section
Boy, this was a much more friendly break down than I expected. Of course
it is the first to really break it down.
On Sun, 2004-01-04 at 10:14, Philipp von Klitzing wrote:
Quote:
Hi Steven!
Where can i find the stylesheet for displaying this?
Use db2html or db2pdf. I installed it as part of the docbook-utils
package in Debian.
Quote:
<title>/usr/src/asterisk</title>
<para>
This is where standard convention places the asterisk source code.
All examples will point you to this directory when pointing to the
source code.
Unless I misunderstood the chapter structure I think you should shortly
mention /libpri /zaptel and /asterisk-addons as well.
I could agree with some with addons here, but I was trying to hold this
to asterisk itself and figured those other source directories would be
covered in sections dedicated to the zaptel hardware.
Quote:
<!-- qcall? Someone who knows this should fill in a sentence about
it. -->
Technical question: When rendered into PDF I guess that HTML comment will
drop out = not be shown? At least for the moment I'd suggest to use some
kind of "open question" tag that can be easily hidden when needed, but
shown while the documentation is still in the process of being written.
Yes, it will be dropped in any rendering of the document. Similarly if
this is included in the current CVS, I would expect that this question
would also be mentioned from the NOTES file so as to attract a person to
fix it.
Quote:
> From this example you should be able to notice
Hm... sounds a bit like newbie bashing to me. ;->
Okay, not meant to be, but I can see what you are talking about. I guess
it could loose the "be able to" to reduce the feeling of "you may not be
able to".
Quote:
In general: Maybe it'd be nice to have a very minimal setup provided in
the book (see recent discussion on users-l) that just lists two SIP
devices and a minimalistic extensions.conf with the two devices, fwd
dialout (and maybe iaxtel dialout) and voicemail (so skip the demo).
My intention was to do a quick run through what was needed and reinforce
contexts in every example, but to keep examples simple and short enough
so you could pass through this section quickly. I think if you can get
the basics here quickly, cover the interface files, and then you can do
the simple installs.
Quote:
<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>
On users-l I recently read comments of bkw stating that h has limitations
and should not be relied upon e.g. for billing purposes etc. It hink that
should be added here.
That sounds good as it would also fill out that paragraph and make it
not look so puny.
Quote:
<lineannotation>; Make sure we wait long enough for the CallerID to
be received.</lineannotation>
This remark is only valid for analog calls, I assume?
Yes, an no. Depends on how you are receiving CallerID. If it is via the
FSK then it is valid. If it is on a VoIP or PRI line then no it isn't
valid. But for a quick run through it doesn't cause problems.
Quote:
> You may be used to noticing that 9 is associated with dialing
> an outside line.
In Europe that's typically 0 instead of 9.
Okay, I was concerned about specifying a digit, but I have also run into
a few systems here with an 8 also. Maybe specifying the two digits would
be bad.
Quote:
> Exact matches can be typed as is, the letter 'X' matches all
> digits, and the letter 'N' matches 2-9. This is especially
> useful when defining outside phone number availability.
Add a remark on . as well
Okay.
Quote:
<title>/var/log/asterisk</title>
<para>
Here is where you find the directory for the Call Detail
Records(CDR), and a few files containing the messages generated by
asterisk while running.
</para>
Is there a chapter forseen for administration (and logging)? I have the
feeling that this should be added to the outline. Don't confuse this with
setup and configuration questions, I mean "regular boring admin work"
here including. The "clustering" sub-chapter should probably be moved
into this new admin chapter. This could also include info about the admin
tools astman, gastman etc.
Posted: Sun Jan 04, 2004 6:37 pm Post subject: [Asterisk-doc] extensions.conf section
Hiya!
Quote:
Boy, this was a much more friendly break down than I expected. Of
course it is the first to really break it down.
:-))
Quote:
> In general: Maybe it'd be nice to have a very minimal setup provided in
> the book (see recent discussion on users-l) that just lists two SIP
> devices and a minimalistic extensions.conf with the two devices, fwd
> dialout (and maybe iaxtel dialout) and voicemail (so skip the demo).
My intention was to do a quick run through what was needed and reinforce
contexts in every example, but to keep examples simple and short
Agreed, wrong place. But that's something for the appendix then, I
believe. And a hint/link here (or from some other prominent place) to
that appendix might be nice. That has potential to greatly to lower the
volume on users-l.
Quote:
> <lineannotation>; Make sure we wait long enough for the CallerID to
> be received.</lineannotation>
>
> This remark is only valid for analog calls, I assume?
Yes, an no. Depends on how you are receiving CallerID. If it is via the
FSK then it is valid. If it is on a VoIP or PRI line then no it isn't
valid. But for a quick run through it doesn't cause problems.
If you leave it in like that then people might think this is always
necessary, so my suggestion would be to add the "via the
FSK then it is valid. If it is on a VoIP or PRI line then no it isn't
valid" part
Quote:
> In Europe that's typically 0 instead of 9.
Okay, I was concerned about specifying a digit, but I have also run into
a few systems here with an 8 also. Maybe specifying the two digits would
be bad.
I was actually driving at something else: There are many places where the
current Asterisk documentation is very US-centric (which is
understandable due to the headstart of VoIP there). Still, once a while
that makes understanding descriptions more difficult since the reader
first has to guess how things work in the US - not everyone is familiar
with those conventions. It'd be great to take a more global approach
whereever possible.
Another example is 911 - we use 110 and 112 over here, and I guess not
everyone will now what 911 is all about, including the "address
resolution" that is apparently connected to this service (that is news to
me, for example). On the other hand you might not know what "Call-By-
Call" and "Carrier Pre-selection" are (results of the EU commissions
efforts to liberalize the telco markets).
In short: If we want Asterisk to grow also on other continents then we'd
need to take that into account as well.
Posted: Mon Jan 05, 2004 8:37 am Post subject: [Asterisk-doc] extensions.conf section
On Sun, 2004-01-04 at 12:37, Philipp von Klitzing wrote:
Quote:
> > In Europe that's typically 0 instead of 9.
>
> Okay, I was concerned about specifying a digit, but I have also run into
> a few systems here with an 8 also. Maybe specifying the two digits would
> be bad.
I was actually driving at something else: There are many places where the
current Asterisk documentation is very US-centric (which is
understandable due to the headstart of VoIP there). Still, once a while
that makes understanding descriptions more difficult since the reader
first has to guess how things work in the US - not everyone is familiar
with those conventions. It'd be great to take a more global approach
whereever possible.
This is where sometimes having my font set small enough to squeeze more
onto my monitor backfires. on 3 different readings, I thought you had
said 8 was used over there.
I have modified the comments of that paragraph to point out the
differences.
Quote:
Another example is 911 - we use 110 and 112 over here, and I guess not
everyone will now what 911 is all about, including the "address
resolution" that is apparently connected to this service (that is news to
me, for example). On the other hand you might not know what "Call-By-
Call" and "Carrier Pre-selection" are (results of the EU commissions
efforts to liberalize the telco markets).
Yep, don't know about those terms.
Quote:
In short: If we want Asterisk to grow also on other continents then we'd
need to take that into account as well.
I think this important just to be inclusive.
Anyways, all changes I had agreed with in the last exchange have been
modified. If someone else has suggestions, I really would like to hear
them before I sit down next for more filling in. I know some have been
away through the weekend and therefore I don't mind waiting a bit.
Posted: Mon Jan 05, 2004 4:13 pm Post subject: [Asterisk-doc] extensions.conf section
On Mon, 2004-01-05 at 01:37, Steven Critchfield wrote:
Quote:
Anyways, all changes I had agreed with in the last exchange have been
modified. If someone else has suggestions, I really would like to hear
them before I sit down next for more filling in. I know some have been
away through the weekend and therefore I don't mind waiting a bit.
I re-read your stuff last night, and couldn't figure out which outline
you're using for that section. (I kinda figured you must have your own
outline, either in your head or on paper somewhere.) So I mapped an
outline of what you've written so far, and tried to merge your outline
with Nick Bachmann's from last week on the mailing list.
Unfortunately, it's on my laptop and I left the laptop down in my
truck. I'll try to remember to bring it up to the office today and post
what I've done so far to the list.
Thanks again Steven for taking the initiative to start writing... To
everyone else lurking in here, let's get busy and help Steven get this
chapter hammered out!
Posted: Mon Jan 05, 2004 5:35 pm Post subject: [Asterisk-doc] extensions.conf section
On Mon, 2004-01-05 at 10:13, Jared Smith wrote:
Quote:
On Mon, 2004-01-05 at 01:37, Steven Critchfield wrote:
> Anyways, all changes I had agreed with in the last exchange have been
> modified. If someone else has suggestions, I really would like to hear
> them before I sit down next for more filling in. I know some have been
> away through the weekend and therefore I don't mind waiting a bit.
>
I re-read your stuff last night, and couldn't figure out which outline
you're using for that section. (I kinda figured you must have your own
outline, either in your head or on paper somewhere.) So I mapped an
outline of what you've written so far, and tried to merge your outline
with Nick Bachmann's from last week on the mailing list.
Oddly enough, it was really from your outline from 12-29. I mentioned to
you on IRC that when writing it, it was found necessary to deviate a
bit. Like in the outline it has variables after macros. Since macros
have a prerequisite knowledge of variables, that was flip-flopped. I
added extensions on their own as they needed to be explained for
rudimentary knowledge. I skipped the getting started section as I still
don't fully agree with it, and therefore would not consider myself well
suited to write about at that point.
That should make it more clear that I tried to follow your outline.
Quote:
Unfortunately, it's on my laptop and I left the laptop down in my
truck. I'll try to remember to bring it up to the office today and post
what I've done so far to the list.
Thanks again Steven for taking the initiative to start writing... To
everyone else lurking in here, let's get busy and help Steven get this
chapter hammered out!
Thank you. I have enjoyed writing that so far.
--
Steven Critchfield <critch@basesys.com>
Posted: Mon Jan 05, 2004 7:59 pm Post subject: [Asterisk-doc] extensions.conf section
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
<lurk> <lurk>
:P
Pete (km-)
Jared Smith wrote:
|
| Thanks again Steven for taking the initiative to start writing... To
| everyone else lurking in here, let's get busy and help Steven get
| this chapter hammered out!
|
| Jared
|
| _______________________________________________ Asterisk-Doc mailing
| list Asterisk-Doc@lists.digium.com
| http://lists.digium.com/mailman/listinfo/asterisk-doc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Posted: Mon Jan 05, 2004 8:12 pm Post subject: [Asterisk-doc] extensions.conf section
More comments below:
On Mon, 2004-01-05 at 10:35, Steven Critchfield wrote:
Quote:
Oddly enough, it was really from your outline from 12-29. I mentioned to
you on IRC that when writing it, it was found necessary to deviate a
bit. Like in the outline it has variables after macros. Since macros
have a prerequisite knowledge of variables, that was flip-flopped. I
added extensions on their own as they needed to be explained for
rudimentary knowledge. I skipped the getting started section as I still
don't fully agree with it, and therefore would not consider myself well
suited to write about at that point.
Wow... that is odd... you'd think I'd recognize my own outline :-) And
here I am, making an outline of what you've written.
<thud> <-- That's me pounding my head on my desk
OK... here's the outline of your writing (based on my earlier
outline)... it's only about half fleshed-out, but it should give you a
pretty good idea of where I think the chapter should go. For the most
part, your writing was great. There are a few places I'd be a little
more verbose, but we'll work on those after we've got the major
framework in place.
1. Asterisk Directory Structure
1. /etc/asterisk
2. /usr/src/asterisk
3. /usr/lib/asterisk/modules
4. /var/lib/asterisk
5. /var/spool/asterisk
6. /var/log/asterisk
2. Config files (in general)
1. based on Windows .ini files
2. attribute=value
3. object => instance (to steal the OOP term)
3. Extensions.conf
1. The beginning..
1. Contexts
2. Extensions
3. Priorities
2. Example one...
1. A simple 1FXOx1FXS setup
2. The "s" special extension
2. Explain Playback() and Dial() (not in depth)
3. Explain only "Incoming calls" context
2. Example one... continued...
1. Add another FXS channel
2. Simple IVR (1 for Sales, 2 for Support)
2. Add an "Internal extensions" context and explain
3. Variables
1. Call variables
2. Global variables
3. Example: Calling all employees (with variables)
4. Macros
1. What are macros good for? To reduce copy/paste
2. Attributes of Macros
1. start with "macro-"
2. are expanded in place
3. use the "s" extension
4. variables are passed as ARG1, ARG2, etc.
5. Call flow
1. Extension matches (don't forget ambiguity)
2. Pattern matching
1. Patterns start with "_"
2. More specific patterns take priority
3. Example of a simple "outbound" context
3. Including contexts inside others
1. How to do it
2. Order of includes count! Explain why...
4. The other special extensions (i,t,o,h,fax,???)
5. Using the NoOp() application to debug and/or test
logic
6. VoiceMail
1. Configuring voicemail.conf
2. Calling VoiceMail()
3. Calling VoiceMailMain()
4. Add voicemail to example one
7. Other Stuff (Intro to IVR, AGI, Record(), Read(), etc.)
OK, now for some comments... I think sections 1 and 2 in the above
outline ought to be somewhere else... maybe at the end of the previous
chapter or something... I'm not sure. But logically, the chapter should
be just extensions.conf. Section 4 (the recipes) will be it's own
chapter as well.
I'd have done more on the outline, but I was too busy watching NASA-TV.
(I had to pay attention, because my name is burned on some kind of DVD
on the rover... #1783894. I'm serious.)
Posted: Tue Jan 06, 2004 10:45 am Post subject: [Asterisk-doc] extensions.conf section
Hi Steven,
just noticed we both forgot something:
Quote:
> > Exact matches can be typed as is, the letter 'X' matches all
> > digits, and the letter 'N' matches 2-9. This is especially
> > useful when defining outside phone number availability.
>
> Add a remark on . as well
Okay.
Add "[13-8]" syntax as well.
And explain why there is match M for 1-9, which I would love to have...
for me the N is pretty useless ;->
Hi everyone, I'm brand new to Asterisk, but I do have a lot of =
familiarity with both legacy and IP PBX systems. I've been using =
Asterisk (with enthusiasm!) for the just a couple months. I am =
interested in helping however I can to assist in the documentation =
effort to make Asterisk accessible to a wider audience. =20
My learning curve that allowed me to get a small system running in a =
basic fashion with a variety of phones (analog and IP) was based largely =
on previous experience in these areas. As you know, it's not easy for =
someone just starting. I think that the right "administrator" and then =
"phone user" documents could give Asterisk a big boost in usability. =
Here is an outline of the detailed notes I have compiled so far with the =
idea of getting our internal IT group to setup an Asterisk system in =
another office at some point in the near future. =20
I'm looking at Jared's recent outline and making comments relative to =
his outline where possible. You can see where my experience fizzles out. =
I would be very happy to contribute to these sections but am not =
currently setup with any of the documentation tools you seem to be using =
(I'm a PC/Windows developer).
Section 1 - Setting up Platform: PC and OS
1.1 PC requirements
1.2 Digium hardware requirements
1.3 Steps to setup Red Hat 9 (other section for other OS's)
1.4 Installing Zaptel Hardware
1.4.1 Brief intro to Asterisk .conf files
1.4.2 Using VI or some editor
1.4.3 Brief intro to signalling (FXS, FXO, etc.)
1.4.4 /etc/zaptel.conf
1.4.5 /etc/asterisk/zapata.conf
1.5 Basic PSTN Service Setup
1.5.1 Installing Asterisk behind CO Trunks
1.5.2 Installing Asterisk behind T1/E1
1.5.3 Installing Asterisk behind ISDN/PRI
1.5.4 Installing Asterisk behind Legacy PBXs
2.5 voicemail.conf
2.5.1 Intro to VM
2.5.2 Notification options
2.5.3 Example(s)
2.6 sip.conf
2.6.1 Intro to SIP
2.6.2 Brief description of SIP phone options
2.6.3 Snom200 Example
2.6.4 Cisco ATA-186 Example
2.6.5 Cisco 7960 Example
???? other examples
Section 3 - Basic Operation
3.1 Starting the system
3.1.1 Loading modules (modprobe, ztcfg)
3.2 Starting Asterisk
3.2.1 -v, -c, -d, -h, -q, -f, -C
3.2.2 Connect to a running asterisk (-r -x -n)
=20
3.3 Using Common Asterisk Commands
3.3.1 show applications
3.3.2 show application abcd
3.3.3 reload
3.3.4 show dialplan
3.3.5 sip show peers
3.3.6 sip show channels
3.3.7 stop gracefully
3.3.8 stop now
Section 4 Asterisk Commands and Applications
4.1 Asterisk Dialplan Applications
4.1.1 Intro =20
4.1.2 Common Useful Application Examples
4.1.7.1 StripMSD
4.1.7.2 Prefix
4.1.7.3 Dial
4.1.7.4 MeetMe (include meetme.conf description)
4.1.7.5 Background
4.1.7.6 Playback
4.1.7.7 VoiceMail2
4.1.7.8 VoiceMailMain2
4.1.7.9 Hangup
???? others =20
4.1.3 Complete list of apps with brief description
4.1.4 Getting syntax help for Asterisk apps
=20
4.2 Complete list of Asterisk Interactive commands
4.2.1 General Commands
4.2.2 Server Management
4.2.3 AGI Commands
4.2.4 Database Commands
4.2.5 IAX Channel Commands
4.2.6 SIP Channel Commands
4.2.7 ZAP Channel Commands
4.2.8 MGCP Channel Commands
4.2.9 Skinny Channel Commands
Section 10 - Useful Linux Commands and Apps
cd
pwd
ls -l
du -b -c
shutdown -h now
less
more
???
=20
Section 11 - CDR Setup and Access for 3rd Party Apps
Section 12 - Scale and Operation Issues
12.1 Load Testing and PC limits
12.2 Echo Issues
12.3 QOS Issues
12.4 Scalability
12.? ?????
Posted: Wed Jan 07, 2004 9:00 pm Post subject: [Asterisk-doc] extensions.conf section
On Tue, 2004-01-06 at 12:42, david wrote:
Quote:
I'm looking at Jared's recent outline and making comments relative to
his outline where possible. You can see where my experience fizzles
out. I would be very happy to contribute to these sections but am not
currently setup with any of the documentation tools you seem to be
using (I'm a PC/Windows developer).
Welcome to our little project!
It appears you've jumped into the channel recently, and didn't realize
that my outline was *only* for the extensions.conf chapter. The rest of
the outline is already in the book. (The original outline was done by
Steve Sokol and is still available somewhere on his website if I
remember correctly.) That's not to say it's perfect... but it does seem
to work quite well, except for the newly revised outlines for the
"extensions.conf" and "extensions.conf cookbook" chapters.
Posted: Wed Jan 07, 2004 10:19 pm Post subject: [Asterisk-doc] extensions.conf section
Quote:
It appears you've jumped into the channel recently, and didn't realize
that my outline was *only* for the extensions.conf chapter.
I didn't realize that - sorry - but I since I am very eager for any
documentation help in setting up these systems, I still offer whatever
assistance I might provide. Your suggestions to that end are very welcome.
In the meantime, I'll look for Steve's doc's online.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum