Posted: Wed Jan 14, 2004 2:02 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
Hey guys,
So, my plan of having MORE time when I was at school to work on docs has
pretty much gone down the tubes with all the work I've been assigned
even in the first week! What I figure is that I will wake up earlier on
Tuesday and Friday mornings (since this is "officially" my day off from
classes, but these are basically unofficial lab days) and work on some
documentation, submit it to CVS after testing, and hope that someone
will review it and make any changes or add comments to it so that I can
fix it the following day.
My initial game plan is to go chapter by chapter and start filling out
as much information as I know, or can at least research. I am by no
stretch of the imagination an Asterisk god... I simply am a home
hobbyist who knows some of the quirks, and how to get a simple system
setup. On that note, just review what I submit as I submit it (since it
won't be all that frequent, a couple times a week). Don't worry, I
won't be offended if you tell me I'm a fscking idiot :)
If there are housekeeping things you want done, feel free to post them
to the list with "blitzrage: Please do this" or something to that
affect. I really don't mind doing housekeeping stuff at all in docbook,
as I would rather leave the actual writing to someone more knowledgeable
than myself. I would rather see myself in an editor light than in an
author light, but I will try (I already know I need to go through and
re-write my NAT section since patch #104 has now been introduced into
CVS for example). Again, feel free to give me the dirty work no one
really wants to do :)
So again, assign me stuff for the week, and I will place it in my
timetable and attempt to work on it every Tuesday and Friday morning
before I go to the school.
Posted: Wed Jan 14, 2004 5:15 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
On Wed, 2004-01-14 at 07:02, Leif Madsen wrote:
Quote:
My initial game plan is to go chapter by chapter and start filling out
as much information as I know, or can at least research. I am by no
stretch of the imagination an Asterisk god... I simply am a home
hobbyist who knows some of the quirks, and how to get a simple system
setup. On that note, just review what I submit as I submit it (since it
won't be all that frequent, a couple times a week). Don't worry, I
won't be offended if you tell me I'm a fscking idiot :)
If there are housekeeping things you want done, feel free to post them
to the list with "blitzrage: Please do this" or something to that
affect. I really don't mind doing housekeeping stuff at all in docbook,
as I would rather leave the actual writing to someone more knowledgeable
than myself. I would rather see myself in an editor light than in an
author light, but I will try (I already know I need to go through and
re-write my NAT section since patch #104 has now been introduced into
CVS for example). Again, feel free to give me the dirty work no one
really wants to do :)
Just so everyone knows, I'm working on the extensions.conf chapter,
taking what Steve Critchfield wrote and mangling it... I'm trying to
make it so that the examples start out *VERY VERY* simple, and each
example builds on the last one to teach a new concept. (Where I can,
I'm just copying and pasting the writing that Steve did, because it's
pretty good writing, and there's no sense in rewriting it!)
I hope to have something preliminary to post to the mailing list
sometime today or tomorrow... Then I expect you guys to rip it to shreds
and tell me all the places I messed up. :-)
Posted: Wed Jan 14, 2004 7:37 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
On Wed, 2004-01-14 at 11:15, Jared Smith wrote:
Quote:
On Wed, 2004-01-14 at 07:02, Leif Madsen wrote:
> My initial game plan is to go chapter by chapter and start filling out
> as much information as I know, or can at least research. I am by no
> stretch of the imagination an Asterisk god... I simply am a home
> hobbyist who knows some of the quirks, and how to get a simple system
> setup. On that note, just review what I submit as I submit it (since it
> won't be all that frequent, a couple times a week). Don't worry, I
> won't be offended if you tell me I'm a fscking idiot :)
>
> If there are housekeeping things you want done, feel free to post them
> to the list with "blitzrage: Please do this" or something to that
> affect. I really don't mind doing housekeeping stuff at all in docbook,
> as I would rather leave the actual writing to someone more knowledgeable
> than myself. I would rather see myself in an editor light than in an
> author light, but I will try (I already know I need to go through and
> re-write my NAT section since patch #104 has now been introduced into
> CVS for example). Again, feel free to give me the dirty work no one
> really wants to do :)
Just so everyone knows, I'm working on the extensions.conf chapter,
taking what Steve Critchfield wrote and mangling it... I'm trying to
make it so that the examples start out *VERY VERY* simple, and each
example builds on the last one to teach a new concept. (Where I can,
I'm just copying and pasting the writing that Steve did, because it's
pretty good writing, and there's no sense in rewriting it!)
I hope to have something preliminary to post to the mailing list
sometime today or tomorrow... Then I expect you guys to rip it to shreds
and tell me all the places I messed up. :-)
hmm, I thought I had started simple and built on the previous example as
I went.
--
Steven Critchfield <critch@basesys.com>
On Wed, 2004-01-14 at 12:37, Steven Critchfield wrote:
Quote:
hmm, I thought I had started simple and built on the previous example as
I went.
Don't get me wrong, I really appreciate the writing you've done. I'm
just trying to make it *PAINFULLY* simple in order to help out the
absolutely clueless newbie. For someone with previous programming
experience, you're examples work well. But I don't think they're simple
enough for the majority of the people trying out Asterisk these days.
Hopefully the attached file will be clearer on what I'm trying to
accomplish... It's by no means done, but it's as far as I got last night
before I fell asleep. It's mostly just a fleshed-out outline with some
examples, because I was too lazy to actually write out paragraphs. I
copied and pasted the text right out of your file when there was a good
fit.
Again, I'm not trying to offend anyone (especially not Steven) by
changing what's already been written... I'm just trying to make this
particular chapter as newbie-friendly as possible. After all, this
chapter is *the vital* chapter of the whole book. If readers get lost
in this chapter, they'll probably never use Asterisk or read any further
chapters in the book.
(Not only that, but maybe this will help reduce the signal to noise
ratio on the -users list, so that I can actually enjoy reading it
again.)
<chapter>
<!-- Chapter outline and examples written by Jared Smith -->
<title>Creating Dialplans</title>
<sect1>
<title>Introduction to <filename>extensions.conf</filename></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>
<sect2>
<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>
</sect2>
<sect2>
<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>
</sect2>
<sect2>
<title>Priorities</title>
<para/>
</sect2>
</sect1>
<sect1>
<title>A simple example</title>
<para/>
<sect2>
<title>A simple 1FXOx1FXS setup</title>
<para/>
</sect2>
<sect2>
<title>The special 's' extension</title>
<para/>
</sect2>
<sect2>
<title>The <function>Playback()</function> and <function>Dial()</function> functions</title>
<para/>
</sect2>
<sect2>
<title>Handling Incoming Calls</title>
<informalexample>
<programlisting>
[incoming]
exten=>s,1,Answer()<lineannotation> ; Answer the line</lineannotation>
exten=>s,2,Playback(welcome)<lineannotation> ; Play back the 'welcome' sound file</lineannotation>
exten=>s,3,Dial(Zap/2)<lineannotation> ; Dial the receptionist at channel Zap/2</lineannotation>
</programlisting>
</informalexample>
</sect2>
</sect1>
<sect1>
<title>Adding Additional Functionality</title>
<para/>
<sect2>
<title>Adding another FXS port</title>
<informalexample>
<programlisting>
[incoming]
exten=>s,1,Answer()<lineannotation> ; Answer the line</lineannotation>
exten=>s,2,Playback(welcome)<lineannotation> ; Play back the 'welcome' sound file</lineannotation>
exten=>s,3,Dial(Zap/2&Zap/3)<lineannotation> ; Dial both channels Zap/2 and Zap/3</lineannotation>
</programlisting>
</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>
<para>
[Now that we understand IVR and the Background() app,
let's use them in our example.]
</para>
<informalexample>
<programlisting>
[incoming]
exten=>s,1,Answer()<lineannotation> ; Answer the line</lineannotation>
exten=>s,2,Playback(welcome)<lineannotation> ; Play back the 'welcome' sound file</lineannotation>
exten=>s,3,Background(menu)<lineannotation> ; Play 'menu' file and accept input from caller</lineannotation>
exten=>1,1,Dial(Zap/2)<lineannotation> ; Dial channels Zap/2 if the user dials 1</lineannotation>
exten=>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>
<para>
[Explain that we're going to add a second context,
and use it for calling between internal extensions.]
</para>
<informalexample>
<programlisting>
[incoming]
exten=>s,1,Answer()<lineannotation> ; Answer the line</lineannotation>
exten=>s,2,Playback(welcome)<lineannotation> ; Play back the 'welcome' sound file</lineannotation>
exten=>s,3,Background(menu)<lineannotation> ; Play 'menu' file and accept input from caller</lineannotation>
exten=>1,1,Dial(Zap/2)<lineannotation> ; Dial channels Zap/2 if the user dials 1</lineannotation>
exten=>2,1,Dial(Zap/3)<lineannotation> ; Dial channels Zap/3 if the user dials 2</lineannotation>
[internal]
exten=>>1001,1,Dial(Zap/2)<lineannotation> ; Dialing extension 1001 calls channel Zap/2</lineannotation>
exten=>>1002,1,Dial(Zap/3)<lineannotation> ; Dialing extension 1002 calls channel Zap/3</lineannotation>
</programlisting>
</informalexample>
</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>
<para>
[Take our Widgets Inc. example and add variables for
${RECEPTIONIST}, etc.]
</para>
<informalexample>
<programlisting>
[global]
RECEPTIONIST=Zap/2<lineannotation> ; Assign 'Zap/2' to the global variable ${RECEPTIONIST}</lineannotation>
JOHN=Zap/3<lineannotation> ; Assign 'Zap/3' to the global variable ${JOHN}</lineannotation>
[incoming]
exten=>s,1,Answer()
exten=>s,2,Playback(welcome)
exten=>s,3,Background(menu)
exten=>1,1,Dial(${RECEPTIONIST})<lineannotation> ; Dial the channel assigned to ${RECEPTIONIST}</lineannotation>
exten=>2,1,Dial(${JOHN})<lineannotation> ; Dial channel assigned to ${JOHN}</lineannotation>
[internal]
exten=>>1001,1,Dial(Zap/2)<lineannotation> ; Dialing extension 1001 calls channel Zap/2</lineannotation>
exten=>>1002,1,Dial(Zap/3)<lineannotation> ; Dialing extension 1002 calls channel Zap/3</lineannotation>
</programlisting>
</informalexample>
<sidebar>
<title>A Useful Debugging Tip</title>
<para>
[As a sidebar, explain how you can use the NoOp() application to debug variables]
</para>
</sidebar>
</sect2>
</sect1>
<sect1>
<title>Macros</title>
<para/>
<sect2>
<title>What are Macros?</title>
<para/>
</sect2>
<sect2>
<title>Attributes of Macros</title>
<para>
[Macros start with "macro-"]
[Macros are expanded in place]
[Macros use the "s" extension]
[Variables are passed in as <replaceable>ARG1</replaceable>, <replaceable>ARG2</replaceable>, etc.]
</para>
</sect2>
<sect2>
<title>Adding Macros to our Dial Plan</title>
<para/>
</sect2>
</sect1>
<sect1>
<title>Call Flow</title>
<para/>
<sect2>
<title>Pattern Matching</title>
<para>
[Patterns start with "_"]
[More specific patterns take priority, don't they?]
[Explain the ${EXTEN} variable, along with the ${EXTEN:i:j} syntax]
[Example of a simple "outbound" context]
</para>
</sect2>
<sect2>
<title>Linking Contexts with Includes</title>
<para>
[How to do it]
[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>
<simplelist>
<member>'s' - start</member>
<member>'i' - invalid</member>
<member>'t' - timeout</member>
<member>'h' - hangup</member>
<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>
<para/>
</sect2>
</sect1>
</chapter>
Posted: Thu Jan 15, 2004 3:11 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
On Thu, 2004-01-15 at 08:26, Jared Smith wrote:
Quote:
On Wed, 2004-01-14 at 12:37, Steven Critchfield wrote:
>
> hmm, I thought I had started simple and built on the previous example as
> I went.
Don't get me wrong, I really appreciate the writing you've done. I'm
just trying to make it *PAINFULLY* simple in order to help out the
absolutely clueless newbie. For someone with previous programming
experience, you're examples work well. But I don't think they're simple
enough for the majority of the people trying out Asterisk these days.
Hopefully the attached file will be clearer on what I'm trying to
accomplish... It's by no means done, but it's as far as I got last night
before I fell asleep. It's mostly just a fleshed-out outline with some
examples, because I was too lazy to actually write out paragraphs. I
copied and pasted the text right out of your file when there was a good
fit.
Again, I'm not trying to offend anyone (especially not Steven) by
changing what's already been written... I'm just trying to make this
particular chapter as newbie-friendly as possible. After all, this
chapter is *the vital* chapter of the whole book. If readers get lost
in this chapter, they'll probably never use Asterisk or read any further
chapters in the book.
(Not only that, but maybe this will help reduce the signal to noise
ratio on the -users list, so that I can actually enjoy reading it
again.)
Don't ever worry about offending me.
I'm not sure where you seem to be headed makes it simpler. I'm going to
reread it again to make sure that is my opinion and hopefully to have
constructive critique.
--
Steven Critchfield <critch@basesys.com>
Posted: Thu Jan 15, 2004 3:30 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
| (Not only that, but maybe this will help reduce the signal to noise
| ratio on the -users list, so that I can actually enjoy reading it
| again.)
|
| Jared
Amen to that. I've been an asterisk-user refugee for months now. I'd
love to help people there, but, it's so annoying to read all of the
latest bull and flaming..
pete
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Posted: Fri Jan 23, 2004 2:08 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
Hey Jared,
Just wondering if you have anything done for the Extentions.conf
chapter. Below you said you were going to condense it, but I haven't
heard anything more.
Just checking up on the status of a few things. The list and project
has gone quite and we need to kick start it again. :)
--Greg
On Thu, 15 Jan 2004 07:26:56 -0700, Jared Smith wrote:
Quote:
On Wed, 2004-01-14 at 12:37, Steven Critchfield wrote:
>
> hmm, I thought I had started simple and built on the previous example as
> I went.
Don't get me wrong, I really appreciate the writing you've done. I'm
just trying to make it *PAINFULLY* simple in order to help out the
absolutely clueless newbie. For someone with previous programming
experience, you're examples work well. But I don't think they're simple
enough for the majority of the people trying out Asterisk these days.
Hopefully the attached file will be clearer on what I'm trying to
accomplish... It's by no means done, but it's as far as I got last night
before I fell asleep. It's mostly just a fleshed-out outline with some
examples, because I was too lazy to actually write out paragraphs. I
copied and pasted the text right out of your file when there was a good
fit.
Again, I'm not trying to offend anyone (especially not Steven) by
changing what's already been written... I'm just trying to make this
particular chapter as newbie-friendly as possible. After all, this
chapter is *the vital* chapter of the whole book. If readers get lost
in this chapter, they'll probably never use Asterisk or read any further
chapters in the book.
(Not only that, but maybe this will help reduce the signal to noise
ratio on the -users list, so that I can actually enjoy reading it
again.)
Jared
-------------------------------------
Greg Varga
Author for RocketryNews
http://www.rocketrynews.com
CAR # 677
-------------------------------------
Posted: Fri Jan 23, 2004 5:25 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
Ya seems it has pretty well died. Unfortunately the asterisk-user list
still has the flood of emails on a regular basis. Glad I was able to
selectively enable the new mail sound in Evolution.
Just started college semester here so I'm trying to juggle that + my
paying consult work but I do hope to contribute when time permits just
wouldn't been for a while.
Just wondering if you have anything done for the Extentions.conf
chapter. Below you said you were going to condense it, but I haven't
heard anything more.
Just checking up on the status of a few things. The list and project
has gone quite and we need to kick start it again. :)
--Greg
On Thu, 15 Jan 2004 07:26:56 -0700, Jared Smith wrote:
>On Wed, 2004-01-14 at 12:37, Steven Critchfield wrote:
>>
>> hmm, I thought I had started simple and built on the previous example as
>> I went.
>
>Don't get me wrong, I really appreciate the writing you've done. I'm
>just trying to make it *PAINFULLY* simple in order to help out the
>absolutely clueless newbie. For someone with previous programming
>experience, you're examples work well. But I don't think they're simple
>enough for the majority of the people trying out Asterisk these days.
>
>Hopefully the attached file will be clearer on what I'm trying to
>accomplish... It's by no means done, but it's as far as I got last night
>before I fell asleep. It's mostly just a fleshed-out outline with some
>examples, because I was too lazy to actually write out paragraphs. I
>copied and pasted the text right out of your file when there was a good
>fit.
>
>Again, I'm not trying to offend anyone (especially not Steven) by
>changing what's already been written... I'm just trying to make this
>particular chapter as newbie-friendly as possible. After all, this
>chapter is *the vital* chapter of the whole book. If readers get lost
>in this chapter, they'll probably never use Asterisk or read any further
>chapters in the book.
>
>(Not only that, but maybe this will help reduce the signal to noise
>ratio on the -users list, so that I can actually enjoy reading it
>again.)
>
>Jared
>
-------------------------------------
Greg Varga
Author for RocketryNews
http://www.rocketrynews.com
CAR # 677
-------------------------------------
Posted: Fri Jan 23, 2004 6:37 pm Post subject: [Asterisk-doc] Updating my time situation, please read!
On Fri, 2004-01-23 at 12:25, William Suffill wrote:
Quote:
Ya seems it has pretty well died. Unfortunately the asterisk-user list
still has the flood of emails on a regular basis. Glad I was able to
selectively enable the new mail sound in Evolution.
Just started college semester here so I'm trying to juggle that + my
paying consult work but I do hope to contribute when time permits just
wouldn't been for a while.
I'm in the exact same boat. I just started my third year, and things
are NUTTY here. I haven't been this busy with school EVER. I have
multiple tests and papers and labs due, and I simply just don't have the
time to work on the documentation right now unfortunately. I really
wish I did, but it's just not going to happen until at least summer.
And I know Jared started a new job, so I'm sure he's been busy with
that. Just seems like January hit, and everyone who had time to work on
docs before, had their life change around.
It's quite sad because I think we have a REALLY good group of people,
and a very good start on the documentation. I really just wish I had
more hours to work on it...
Posted: Sat Jan 24, 2004 6:59 am Post subject: [Asterisk-doc] Updating my time situation, please read!
On Fri, 2004-01-23 at 12:37, Leif Madsen wrote:
Quote:
On Fri, 2004-01-23 at 12:25, William Suffill wrote:
> Ya seems it has pretty well died. Unfortunately the asterisk-user list
> still has the flood of emails on a regular basis. Glad I was able to
> selectively enable the new mail sound in Evolution.
>
> Just started college semester here so I'm trying to juggle that + my
> paying consult work but I do hope to contribute when time permits just
> wouldn't been for a while.
I'm in the exact same boat. I just started my third year, and things
are NUTTY here. I haven't been this busy with school EVER. I have
multiple tests and papers and labs due, and I simply just don't have the
time to work on the documentation right now unfortunately. I really
wish I did, but it's just not going to happen until at least summer.
And I know Jared started a new job, so I'm sure he's been busy with
that. Just seems like January hit, and everyone who had time to work on
docs before, had their life change around.
It's quite sad because I think we have a REALLY good group of people,
and a very good start on the documentation. I really just wish I had
more hours to work on it...
I guess I'll devote some time either tomorrow night or Sunday to do some
more writing. I just spent ~4 hours making the frame of my Cadilac
Couch. I'll get some pictures up on my website tomorrow. Of course I
still have quite a bit more work to finish it too.
--
Steven Critchfield <critch@basesys.com>
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